ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_matrixDet::getMatDet Interface Reference

Generate and return the determinant of the input general square matrix.
More...

Detailed Description

Generate and return the determinant of the input general square matrix.

This generic interface uses the pivoted LU (LUP) factorization to compute the determinant.
If the matrix is already known to be positive-definite, use the other more appropriate faster generic interfaces of this module (e.g., getMatDetSqrt).

Parameters
[in]mat: The input contiguous square matrix of shape (ndim,ndim) of type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128).
Returns
det : The output scalar of the same type and kind as the input mat containing the determinant of the input square matrix.


Possible calling interfaces

det = getMatDet(mat)
Generate and return the determinant of the input general square matrix.
This module contains procedures and generic interfaces relevant to the computation of the determinant...
Warning
The condition size(mat, 1) == size(mat, 2) must hold for the corresponding input arguments.
This condition is verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
The procedures under this generic interface call error stop if the Pivoted LU factorization of mat fails.
See setMatDet for the fault-tolerant potentially faster subroutine version of this interface.
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
Remarks
The procedures under this generic interface are computationally demanding since the LU factorization requires creating a copy of the input mat to avoid the direct manipulation of the input intent(in) :: mat.
See setMatDet for the performant subroutine versions of these procedures where mat has intent(inout).
See also
getMatDet
setMatDet
getMatDetSqrtLog
setMatDetSqrtLog
getMatDetSqrt
setMatDetSqrt


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_matrixDet, only: getMatDet
5 use pm_matrixInv, only: getMatInv
6 use pm_distUnif, only: getUnifRand
7 use pm_io, only: display_type
8
9 implicit none
10
11 integer(IK) :: ndim, itry, ntry = 10
12 type(display_type) :: disp
13
14 disp = display_type(file = "main.out.F90")
15
16 call disp%skip()
17 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
18 call disp%show("! Compute the determinant of the square matrix.")
19 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
20 call disp%skip()
21
22 block
23 use pm_kind, only: TKG => RKH
24 real(TKG), allocatable :: mat(:,:)
25 real(TKG) :: det
26 do itry = 1, ntry
27 call disp%skip()
28 call disp%show("ndim = getUnifRand(1, 9)")
29 ndim = getUnifRand(1, 9)
30 call disp%show("ndim")
31 call disp%show( ndim )
32 call disp%show("mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)")
33 mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
34 call disp%show("mat")
35 call disp%show( mat )
36 call disp%show("det = getMatDet(mat)")
37 det = getMatDet(mat)
38 call disp%show("det")
39 call disp%show( det )
40 call disp%show("det * getMatDet(getMatInv(mat)) ! must be one.")
41 call disp%show( det * getMatDet(getMatInv(mat)) )
42 call disp%skip()
43 end do
44 end block
45
46 block
47 use pm_kind, only: TKG => CKH
48 complex(TKG), allocatable :: mat(:,:)
49 real(TKG) :: det
50 do itry = 1, ntry
51 call disp%skip()
52 call disp%show("ndim = getUnifRand(1, 9)")
53 ndim = getUnifRand(1, 9)
54 call disp%show("mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)")
55 mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
56 call disp%show("mat")
57 call disp%show( mat )
58 call disp%show("det = getMatDet(mat)")
59 det = getMatDet(mat)
60 call disp%show("det")
61 call disp%show( det )
62 call disp%show("det * getMatDet(getMatInv(mat)) ! must be one.")
63 call disp%show( det * getMatDet(getMatInv(mat)) )
64 call disp%skip()
65 end do
66 end block
67
68end program example
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
Generate and return the full inverse of an input matrix of general or triangular form directly or thr...
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter CKH
The scalar integer constant of intrinsic default kind, representing the highest-precision complex kin...
Definition: pm_kind.F90:843
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
Definition: pm_kind.F90:858
This module contains abstract and concrete derived types and procedures related to the inversion of s...
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3! Compute the determinant of the square matrix.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6
7ndim = getUnifRand(1, 9)
8ndim
9+2
10mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
11mat
12+1.40554047594670722562059272609521101, +1.60060475648769804822800545255684951
13+1.95515656379963798142954812862514136, +1.11184348217265581099271543638285185
14det = getMatDet(mat)
15det
16-1.56669187858464508537340627011563869
17det * getMatDet(getMatInv(mat)) ! must be one.
18+1.00000000000000000000000000000000000
19
20
21ndim = getUnifRand(1, 9)
22ndim
23+8
24mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
25mat
26+1.21173396395534330032783873530504978, +1.31128173374868112696701104272931404, +1.29416026047214541109957107632946689, +1.78200346315868836850662535636236535, +1.86997862837913857334200667290348974, +1.51518219932052646297224458290767655, +1.63687688148007061388898841448572967, +1.92779268807229144908877900335028965
27+1.48169468513071338798774539516632006, +1.36329367765646211209477034346175107, +1.53964304819085283720087616211802242, +1.82314230055107470328581788259759937, +1.08747199226062232696367004053001916, +1.92477526071705017203151135553808612, +1.65241132541106950516711012487576627, +1.19044942400913044980236181971692390
28+1.18201130570430964321517401038261846, +1.48257261890009171849941907946609839, +1.97016397420284270933819197352068162, +1.71657297319407958767872658340422515, +1.27502262549527435927340521048274753, +1.36406169730580904394832227262047767, +1.96350287332988796429056141187907416, +1.42079462315719012555849367789437159
29+1.58611860598208610781624517055351169, +1.77626792266646391076005321242519886, +1.81700886728091705139525504741807283, +1.24409632193257568170078021614335355, +1.35245458152547999340870066066849616, +1.35890211243076236756197110819215361, +1.22620021978089248523741908853181517, +1.41083574385586248426148547709719638
30+1.87171217414560586815794500429192151, +1.27348803206104805790506961462093758, +1.27511811618088442707844250102477953, +1.27994882000672783142478154502671460, +1.84742646611482810741856964023940652, +1.68214395137431262333125356222804041, +1.20560658017098547396606695742583397, +1.41029394163351391842224202151827898
31+1.48597838692766856608668019727935670, +1.98511809502417452851035681403484870, +1.97416100401800569869252748087849614, +1.03145561380317223790291770725425441, +1.73024768237526407278227771446470537, +1.55382624391763965057699146114133782, +1.68774845519163674346014229610098684, +1.81315827101461865934755192576497551
32+1.47239945186951858509665687649498753, +1.15047868172781800960780803199030271, +1.70225151228590357910758870871058640, +1.67052461496329102378031584726329335, +1.54533916665828440897241546170882880, +1.97416319921375190951919690437604248, +1.12114767218119441934550540093502583, +1.65357196706898701852955119068494658
33+1.95846102039307004552704903625515341, +1.78371971444741256698791267562020572, +1.81795917720485185727938022342134133, +1.13165102824681485607011658124655162, +1.41616104524065579674808465869400500, +1.02065550140008529380146564804735269, +1.60461856863333759760805617622838940, +1.31279043227158367268556471314206412
34det = getMatDet(mat)
35det
36-0.121911716195875301855180264145392307
37det * getMatDet(getMatInv(mat)) ! must be one.
38+1.00000000000000000000000000000000000
39
40
41ndim = getUnifRand(1, 9)
42ndim
43+3
44mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
45mat
46+1.03958022738714803351069965204964158, +1.34858688067629373587672055708913005, +1.22778109319801807718973247932769512
47+1.01681046941890715030350084272593245, +1.04493572238961255799881521136238672, +1.40730198365155735165966404863495370
48+1.54050771283349594700466016829334077, +1.96929514150309075942425358934304072, +1.87990594860127422989726822271504895
49det = getMatDet(mat)
50det
51-0.109958484208580053740407658866379481E-1
52det * getMatDet(getMatInv(mat)) ! must be one.
53+1.00000000000000000000000000000000559
54
55
56ndim = getUnifRand(1, 9)
57ndim
58+6
59mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
60mat
61+1.44044759890686133824388877135052015, +1.89414663693399018143085807465976492, +1.82934650132743367634984125641501210, +1.76006657320935445892730520666057611, +1.98774016754164858810291583034386077, +1.47045792104435428747253432202070825
62+1.41654710271179381330297979614170426, +1.66401369156674264337663147092129980, +1.66291614605615012825979322098716536, +1.49590951729693275241164846944402004, +1.86701800006543002063515866763428734, +1.05402201793366247680345254778515907
63+1.61888736706022759831409447031310843, +1.30503340658280938570938667390655155, +1.94807102330453681076713787184598719, +1.56496771572031849850631265738133372, +1.35945596792995730493477779436619246, +1.26247052467745220089955199432348136
64+1.31575584141917026893845736653606992, +1.73654658607994855286362657498908007, +1.88153093361815985066109887132383626, +1.05076821711888320735252692652359448, +1.01504017841902515643151960718146756, +1.30091187567410641159868234976023643
65+1.73539111236887078885676879741607032, +1.77323722368910869640504174849346643, +1.14213354521175655694466524008734794, +1.69441264822062217465276117587415148, +1.71752394316638643501176354897714278, +1.22210971107075260372745374635727108
66+1.65207700042882863465089227295278581, +1.72778072997801933222481593793810365, +1.12171676906939275095606841523059933, +1.16836758266979165616403111294849354, +1.74243267806113781678769202882319661, +1.14196639627281925833226500275415789
67det = getMatDet(mat)
68det
69-0.130772459435393803263506710908144782
70det * getMatDet(getMatInv(mat)) ! must be one.
71+1.00000000000000000000000000000000019
72
73
74ndim = getUnifRand(1, 9)
75ndim
76+6
77mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
78mat
79+1.46207011445920540884683429418206241, +1.41733623523443685303039685738087454, +1.15226358820132256718412530472002987, +1.94582625039011957321565900792074742, +1.46357031878164323367068235021906865, +1.33601234474882187679578019155299907
80+1.45349213264976708407667898890412420, +1.77066659439542923971146419889934813, +1.34556546400070068880123450702864120, +1.73582609453282281013451131203137174, +1.05276802504596500748929065336645702, +1.02386176934827640929610077516739318
81+1.01309596607816362710360309518733968, +1.43333414629903015172423863872463969, +1.77184104179704964185225300152162823, +1.43168311064981778567328825155130566, +1.21347277961277223560444644182374088, +1.23539579109004129899731452876543447
82+1.99548613486040017145923780429060934, +1.26175320386568893181129084572087233, +1.06323090283292246490379700329628304, +1.14311405689621816332353803559566236, +1.23573098514992439337623400233609448, +1.62211576672292700534102349202933030
83+1.12782835245605655400440447853736059, +1.11160919092572230710862765074838342, +1.87989340858409270053025974602769574, +1.26242187375885968516741313720001661, +1.07568886181096335050272737272264539, +1.50337244906636047162481705102629627
84+1.59631532525524179950286633103229227, +1.41280414187892883125181777241388585, +1.68828793784850176561813385774933898, +1.45410977063809847905243685949592128, +1.68715491134711298061281610700039825, +1.86343371150005022057984195743045674
85det = getMatDet(mat)
86det
87+0.223466795658657367836759676922781845E-1
88det * getMatDet(getMatInv(mat)) ! must be one.
89+0.999999999999999999999999999999998459
90
91
92ndim = getUnifRand(1, 9)
93ndim
94+1
95mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
96mat
97+1.44920653809491297165314869499228904
98det = getMatDet(mat)
99det
100+1.44920653809491297165314869499228904
101det * getMatDet(getMatInv(mat)) ! must be one.
102+1.00000000000000000000000000000000000
103
104
105ndim = getUnifRand(1, 9)
106ndim
107+9
108mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
109mat
110+1.87818006051502843778364463926571288, +1.40116882991386070423306420546588759, +1.57036452468509207575331473003551046, +1.07247479560715600454871126893830548, +1.70825450119300767327563105833103169, +1.68311621204433099567059646819123093, +1.02466418137331816026282515892645085, +1.46185400998213287271749294386761453, +1.84848004884270016170713966503936895
111+1.58550001357588006196448784783163359, +1.01061787520553169461105094824005642, +1.46721668741625964957509243280059650, +1.74563769967717500655384494547213944, +1.31339491572829372476228901775346816, +1.92455029168020051752654326025481342, +1.74115254436995273370693398730531320, +1.74456830818873821228856533013970046, +1.25931231169215446451643580542119442
112+1.23023324755756068190287761257875847, +1.20968600888650659347971391988576574, +1.62445685002467600280847530365809897, +1.30832196351870487196234374114270465, +1.52953198639079452145379404351730767, +1.09861582916926503289064772884471925, +1.40609746362991690384607935577874060, +1.27686776423012497450026729535026968, +1.86155525476639052360055620378629509
113+1.66440580443747657651822702909998599, +1.71871614006584680627719249754110756, +1.59398707643677936383354388370106336, +1.90898370009137991967688217132060844, +1.36808644607230136808962755303082536, +1.61632013440191555055766064331439751, +1.51699850800705697662747102979546612, +1.41828835198426097300808391486731777, +1.24318124112065238390156564839105837
114+1.28630404139978738148644970094481747, +1.94923658396195107336363750995677803, +1.61351212197075814925692514893348973, +1.82588053518142969312087401670050261, +1.52459901896618391940171776133199702, +1.38920339428380843529736162092698024, +1.89697646340191453860159206243745870, +1.58641948310304038811517447097582393, +1.37160210461167744795133249633107406
115+1.85992114547571858735359881879952502, +1.13039206083353352958034290543892346, +1.06035921259073862687020258052922410, +1.86120963030955462787121219009009061, +1.49335425187656631316434866872453754, +1.43102716525174771404605645203607145, +1.76180750243130119706460791777822587, +1.92086095179256533649729917036163632, +1.39999795234161470235493434102726431
116+1.88097099422279153186261994741718969, +1.18803684028012321173188853662056304, +1.15108922485309156214352419231089032, +1.20592766511542274439130173501343725, +1.20533437758437406859868067719370519, +1.83996906785788446054100264690413191, +1.50148141410604550396546544994896332, +1.70092063390250784036571793673833455, +1.16533264156270300069198089762024556
117+1.84406608900022992617928559168424279, +1.62733003280728302235802139632742458, +1.08740739222451872313309719296872154, +1.38264520963571405811175241307289116, +1.97394893551038607666685293662739517, +1.10267953150687134789020490311993068, +1.94491499767220442973371685813107251, +1.73528168777940503302206010653263439, +1.62985551972552157638517128746072227
118+1.93694060555946033529926965051305342, +1.27732469127421445841359366701126411, +1.81867433450878598182328884686282557, +1.16999218903411672073571373695013110, +1.44072497508982255101837465262990527, +1.72854483565220753600703879991110393, +1.71353898515438380877726255027526932, +1.97417021769004466927692545515271249, +1.96667043117337164108567528425403019
119det = getMatDet(mat)
120det
121+0.238894772398963280949792614231387820E-1
122det * getMatDet(getMatInv(mat)) ! must be one.
123+1.00000000000000000000000000000000308
124
125
126ndim = getUnifRand(1, 9)
127ndim
128+5
129mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
130mat
131+1.62002290006321517746107164702438589, +1.43477164808990149604749221199698137, +1.04861067736363366255616452960226375, +1.89199966216704523212831579733633331, +1.41619875301459723036767107608215488
132+1.44577067767092207884436967882391943, +1.17793039935451250504995012292094192, +1.80606732291841482365175707270164514, +1.13393992294973597832799327100361921, +1.01299151487393084209019323272996939
133+1.26619308316360011808041674232038992, +1.82736912448878762905405543053115226, +1.42444195459004362171035388925132857, +1.73706305655754606422806044746737333, +1.54986151896173441793267528166705377
134+1.98181138315158508527169878369469423, +1.31327440637079140452613770722375766, +1.13250464334923588487301960365575427, +1.62648534657092992738981261718837346, +1.20434270172593940306287333211790906
135+1.17847528461617458196581403503861751, +1.04379782364631528787167487112116338, +1.42733231604874608095131812818366072, +1.65042257860284362454769603973779021, +1.40690156836767412359660711788539070
136det = getMatDet(mat)
137det
138+0.804588465932224025804629107377340811E-1
139det * getMatDet(getMatInv(mat)) ! must be one.
140+0.999999999999999999999999999999995089
141
142
143ndim = getUnifRand(1, 9)
144ndim
145+3
146mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
147mat
148+1.29310586413265213184815585960119259, +1.92830575736374148475020229895674605, +1.48007325345494641909568376528576050
149+1.77460473119297617099957097601270798, +1.09206149080866740625903839917448080, +1.18206575802520322457103705898546169
150+1.79744810845637888909336890420013124, +1.01537781752432391184553040759937200, +1.55090531993455533824458612915451764
151det = getMatDet(mat)
152det
153-0.810357572582312406776382280884544448
154det * getMatDet(getMatInv(mat)) ! must be one.
155+1.00000000000000000000000000000000000
156
157
158ndim = getUnifRand(1, 9)
159ndim
160+2
161mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
162mat
163+1.22563179089741654578507813579380008, +1.96802699463824654565337654927601629
164+1.13352781356085534005527222393895265, +1.38660532349169597708119482651018598
165det = getMatDet(mat)
166det
167-0.531345770362013832064123295152485324
168det * getMatDet(getMatInv(mat)) ! must be one.
169+1.00000000000000000000000000000000019
170
171
172ndim = getUnifRand(1, 9)
173mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
174mat
175(+1.60386173050316749823809398670720240, +1.86028112537483729673253928986370842), (+1.36904505314319914472586663758701210, +1.59089723977262188128257091679040863), (+1.59615641024770142436817363851908100, +1.04931937093446008239200422579422065), (+1.83689011640161967190855413190342991, +1.38724081991067007324088627857752770), (+1.21284412707886333093010605886176948, +1.27347663822873242524388838658224289), (+1.14085766852410593018221973040263457, +1.27158358914273964316100290094602933), (+1.94632822951723870831717057177279330, +1.69250328448747105114355535351899430), (+1.10597911885734352267806362427673122, +1.83954632915142490837921563061066363), (+1.09046715977162294904917000083364603, +1.91381231297206298434458836259728618)
176(+1.07099156105955468073168696616109666, +1.80512830022648605458990837699669011), (+1.34895165866727504194594260624937976, +1.65544083689202629702917757843538843), (+1.23140259003053821328240697887392283, +1.73541009915948699128346733693659197), (+1.76376978473060216806934487713638147, +1.65104706430155967231511792793178024), (+1.93755376569797125713255184591304727, +1.30558737669925713341576797672590731), (+1.74241724021260429906755842206386638, +1.62424853708076640986912620969786814), (+1.95996878020411562922940922087502746, +1.75561541017476439953548493175147356), (+1.71940352151837880767697854248807149, +1.66761947577419531981992076915737297), (+1.67276244853863026974976500621739180, +1.04866277625268723884682431542417678)
177(+1.84775627228324662234272371830245048, +1.76168063068742955636401180591429048), (+1.26849773680274525473847257616039432, +1.63731640077296304981099062171783661), (+1.26845150398216272154615418335024607, +1.45387163382603500420637598973161692), (+1.30070337444594504079686873686135813, +1.08540658189379190638679912180376765), (+1.03231392427892948887066741396013385, +1.69001486953487138594294168781382438), (+1.68003358404053313009862676101755189, +1.02350262445620336395377332034190800), (+1.23003866115307340590868654314927886, +1.81817727077379142335753536381209633), (+1.78007731475863584785873851365043163, +1.13816786748862491369431572650953391), (+1.57142510343822087493309605713755085, +1.93940487645595865926195113613514210)
178(+1.10306915586204449817509694955223745, +1.20208249306472381830564699308348682), (+1.26249897362301123469742821892826778, +1.92854338489147026489489622755725714), (+1.71455723312502749211954340359034542, +1.97706289240786083307030425406445597), (+1.24410716988052373188584484381589598, +1.19761127353496395638751516247510730), (+1.64922062739747100544391213902334421, +1.07062030225624652002649860758777783), (+1.27016008310883237421073997898516494, +1.08150395064072759797557867236429912), (+1.43631155274083602390838733728602312, +1.71006302548025645874500718686806378), (+1.56040770460216540362566278661943206, +1.53967308717881037568350038734489492), (+1.26012677273822966092444517113268290, +1.16749404765930545982259365748994923)
179(+1.55704832398902056410102956351890623, +1.57132490016408497305925571460996914), (+1.87635826287509134912121818632776757, +1.71533511361142406099229945643501425), (+1.99759033169594386794925397081675161, +1.10114775272237499194699904569383030), (+1.92552058713890509489054956662625304, +1.63959534202517880032168288498836434), (+1.36777401744780657052811744646473087, +1.69907794733720620909075250910767308), (+1.67815454920769117477143899487933567, +1.07429992433352258152236569573363325), (+1.52483429020416274837164716152105091, +1.87573795238389381609988416890789141), (+1.07503955637694580950365956165313530, +1.31400419007909185080132524220436893), (+1.50758855458558439800764519895812867, +1.73439133772333295879828709742529352)
180(+1.89514409434283311772513964256401546, +1.34557722013793105803010920258236473), (+1.94693574058097953870905497421158527, +1.20417935618526942275004621169729903), (+1.20777981590529090222742913640037702, +1.08705388068984592318490119257492339), (+1.71938525117599156704319419865722577, +1.71258534012120034450097558205533748), (+1.19994223900717044013281031536807598, +1.80064454495812458064541269077710926), (+1.90594828882612166772838231589324592, +1.17699709678855389578411917742099704), (+1.02060289254348763768137309295508707, +1.68053380842266808864151648781361559), (+1.72806584766187387528334943808306437, +1.66455403280733962448430696458197276), (+1.71011619382606621248818282751972959, +1.17764705686112905665384260768449501)
181(+1.28307954460998100903852731034424102, +1.02538357331300900136769362129191925), (+1.52097312450859717646591084093701806, +1.03605198297295831262295237014029180), (+1.24978122905666095236634122255423943, +1.35077237726146242908360315898893619), (+1.21655911973842863293654219438285261, +1.97378135701018893936915362258991485), (+1.82588907736220276222168970478076260, +1.95982082783163850075420815626492184), (+1.16097206078846878503986303832285687, +1.55962333645274785684230961054489086), (+1.61082979250535785984345017818691287, +1.88641444207224145494640299972575314), (+1.40503563323352510128967455024313701, +1.71137927778536280509350347189989195), (+1.35251310887830013761024312933038310, +1.27286578456604997109029878992674881)
182(+1.79445620040758622809067585017767977, +1.18776370596625104813448822985220450), (+1.90392874090618359549016838893995034, +1.97321053768330777884007660637969374), (+1.18455537541775845039395444571290883, +1.70739104211034192732394895097228747), (+1.44684798999706799317894895811926087, +1.92950292164959122366180515104177825), (+1.89156716944785511309608923100324407, +1.52149213318055048508969831164786376), (+1.29787903650890613202882532664708630, +1.96909698681248389144988909165433735), (+1.01737986881447605019489628546044975, +1.80024763229188062004611664008325819), (+1.45794316970309842880723172987439737, +1.24423309408008158019716900863917548), (+1.73316063887667313081055467140963453, +1.73549954176949993851490235094305052)
183(+1.49119094710864638808311661153404531, +1.95690520848694310441919972492782406), (+1.68213833207239370573198915622995231, +1.97674547140528194721012016841510642), (+1.82509713426442160615676848181798525, +1.05112341381939536062602965553921933), (+1.90357610577610536700792810695336774, +1.33497814978821971964436957712601758), (+1.50671304205800318990427115952221338, +1.49337131872613642657854604718960363), (+1.97881534721427617394260674786819652, +1.80001768325876292175314940963379473), (+1.84892181133233694139790202500048109, +1.40168562437723724756495939275308040), (+1.56775094507593927377539021712062352, +1.10196960872925888091907810267301664), (+1.21874619074209720009255741709819370, +1.81195929223756051736172792628503237)
184det = getMatDet(mat)
185det
186+1.37843830885890967468157356892923626
187det * getMatDet(getMatInv(mat)) ! must be one.
188(+0.139425615310034134588087405850367720, -0.346390116928085160574775839580526880)
189
190
191ndim = getUnifRand(1, 9)
192mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
193mat
194(+1.75920481866356893419757249696319988, +1.05087464878500068396054280443796416), (+1.32220695243676929157127743214345549, +1.33950093811234952772675064864483858), (+1.86886510440104674701228484631130712, +1.73038220970996301000738210707894233), (+1.71157615946707668977738213886071593, +1.60407895640813143232514339728107913), (+1.13740555488747251080772146490994822, +1.42224927806292103190260498200121809)
195(+1.22538175635385353453768813484298683, +1.44570597341568206871920066559997500), (+1.21981190521817298442033530584685470, +1.49221693093324970479214220493733736), (+1.65658749859414131671706413072851062, +1.54567044985998757720557154090834948), (+1.40472559473916777971392288253180408, +1.19000550453873194962755732617394859), (+1.52694462609582725298022119546078041, +1.35349074576827520883448515901687077)
196(+1.81594562060481344860727558413017498, +1.28153284216571599886918560882859633), (+1.35473251854657430321532524679268454, +1.97338809160670705951124715915947659), (+1.49191071263073752156842558806227145, +1.18174715186240977203869665803198736), (+1.88771123800497297864565955531090825, +1.09038150162872766607517677546021714), (+1.68453106856922256856056525829606295, +1.91591416886739160418673855840228721)
197(+1.43105349685407241849590409036990055, +1.59054422806665812458664883049434320), (+1.70183143219204400730773819448065765, +1.67135491728564409401572110835142325), (+1.11124339446142825371211035037665040, +1.27155751183194372064488808128257599), (+1.46329270127207282332217893689373063, +1.69537019577000686852814436738266950), (+1.16186689161378584771865583432327928, +1.98739420526024248109952646064417159)
198(+1.67420473130369608829521053244702136, +1.22084651782187734178337514752548394), (+1.53156585966857310590366008912314331, +1.10178564743826310176373513335573474), (+1.38172682504854424973033905735308299, +1.52971429537760704204941148693135041), (+1.22481320049569496216963387845269253, +1.38876169940925511395408744786001785), (+1.07591985473472430292805321373525379, +1.74557421855427769077362433145696831)
199det = getMatDet(mat)
200det
201+0.440154961508526636254664537111098749
202det * getMatDet(getMatInv(mat)) ! must be one.
203(+0.949550388779854370443461125388704274E-1, -0.293152826132830776770097867003010934)
204
205
206ndim = getUnifRand(1, 9)
207mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
208mat
209(+1.53353712039320428047945095696031701, +1.26557592158149904431689127351210720), (+1.34915316154439891679848228832562207, +1.23873395035182750182634811273673028), (+1.18413470702281853905363909636890233, +1.42532173485642021630041443726684868), (+1.51997333362202446457698738301188971, +1.98708423304565445666539938393482397), (+1.96075197448681744442986156837967821, +1.02098721600363616816938465757867357), (+1.92912484927431858097389966645744628, +1.03929422265520955945992365183231118), (+1.99583637256180202585063792540471031, +1.80099444813835960838320012565997355)
210(+1.33648100896664050696795799515594733, +1.89937943495823235929168342935487623), (+1.55851354411142488852642217131574089, +1.58353230928310373594479108276554991), (+1.65005926592611448362941785902739147, +1.91944983075184473203926318804879108), (+1.81859775241049972352276118830435768, +1.04644161888315929537320448562184827), (+1.43780087067516146816809032036733552, +1.26296855195994893323392840711320510), (+1.36509719123254101469976536443842536, +1.47514218781140801899557537093762640), (+1.41554177746542976386583418448077209, +1.80385135339712335043961529721805858)
211(+1.14718678779696835001078438676913790, +1.90717836986391484918881100231926283), (+1.75250891732216751471786966700722933, +1.95115387731310382642586969593065036), (+1.71742146025153215372088400492309899, +1.13223940913003102849974426551833209), (+1.10184759031842577006868554960139713, +1.34779038232747915224859667447101745), (+1.14634801979514734910374698529530290, +1.43492614094197058461207720131640554), (+1.81376766947931789588951819713216203, +1.71604794151499043281465573669995351), (+1.73615699464699099561449961821674376, +1.26401895297009570737565637015105766)
212(+1.89433608992596355274880355591086548, +1.76320568556076608752363780881280174), (+1.91125588589814539230840382288282027, +1.65104268162093267692105096077095204), (+1.91035700025433128720548961541294612, +1.93669713773947765591772013547793997), (+1.97741187151079901854774079848688089, +1.14310345893745692809017377900629197), (+1.54938454283633331012706947289689627, +1.18489928661016169106421658566117389), (+1.88556398462893023809523305422283971, +1.66591217018874716092925039665926792), (+1.07221386535284895397117494054192725, +1.78651177814584392210767009341307548)
213(+1.52485407873876547004908291867389155, +1.24055882777317440768258349905986184), (+1.24618049868012923607172046024428145, +1.08034496867495250163313669465271345), (+1.78138635213612394682312668868061780, +1.47536572565076853226450732729600534), (+1.53130151268852930161983984783919253, +1.8485404293421