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+9
10mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
11mat
12+1.49402272699495955229968775346136775, +1.85237859119052848993428623004310583, +1.59489728699916983445865862359433522, +1.93658818799610192464743346780798548, +1.81851967447870033398198584424662113, +1.02510588460616795213269813095252423, +1.92107084625127376423261551257252226, +1.16935554870566144873085922744295611, +1.50653656165577174144493849606245770
13+1.94910385368816601100604329999531410, +1.10900538620702539375600446403730221, +1.75115739896550289923339469421091949, +1.66700273789256997737671367842785779, +1.28653975576022225524092921502559754, +1.91084292610287752425950255891319612, +1.09959050459096343005292445000894733, +1.07520707555084741847715945280574046, +1.35041877050326302274694067755651219
14+1.73628509429831731194580962783870552, +1.72617137000275159495580901305968628, +1.31690247620684536201050162069941299, +1.31481071647990743940026843009048375, +1.21936741289044879340958013234744695, +1.63422218934515603877616470227566096, +1.50354141048215485501346040396057462, +1.41367681453036919564715351807178214, +1.86538914658007091786611610185211739
15+1.20571703667906907595842337738863478, +1.32910856021534916504782623435891903, +1.13586542293268578165677633487674690, +1.09581420885105751688064640196691259, +1.55287724754859887435067450424926084, +1.99100462856035206026910550068809563, +1.42205015441976430803559907612724183, +1.23367864551498290524680351737066279, +1.01540296172634488168466320750798092
16+1.37022057017961127143429219144238202, +1.24524331858503539985706542164274871, +1.72943312112610664246432932345478839, +1.55303166578794574789135712430431617, +1.75799713746101806862021047509304061, +1.72425049876420401906599487292017892, +1.93290629246226979854346233652419816, +1.37922722786235467664691080500019316, +1.75177954425251237005618181208882097
17+1.94881843562449333965809146829395033, +1.16499575000018091065927234432881184, +1.10425283609488807097917500181457648, +1.82307157758049403366740893839272469, +1.28140125496685711142004437385900865, +1.87548308679940348205837224570248194, +1.38267277265784025537611475507036557, +1.29377868031281650203536566405624491, +1.69091257285227413487797073773976701
18+1.62229802713976577359938748725710689, +1.29314249011570573121150381817749367, +1.31094645797093657886901034114757573, +1.97745165473330343709479750649538730, +1.01792341546566074045980039323035594, +1.18512771296780952612828100719259259, +1.95143763098583021413635778796290127, +1.58968919573004566475631043116911505, +1.87101395015098579114454791538859052
19+1.32280911625412560936755934971457940, +1.27448769231685373711596585840053627, +1.93294986242146200704766964186452230, +1.61882478864143899376609321109564946, +1.07297791474644594876651255837406627, +1.20256116248010243912574904235601016, +1.16122521248699632836529341081077427, +1.63617033224710813799161311091865429, +1.18861491080196340992406956050104999
20+1.76476994117808388757893381536740285, +1.70553202520638216677482644902068293, +1.17617918845810318720035153949871538, +1.72008499777548860090542344406581309, +1.26334385706709138524514788227367137, +1.16269025733283316062830031045647551, +1.20238658016550898022547189742924917, +1.16040329209635799725384869745558736, +1.04670786752624214872450610064660428
21det = getMatDet(mat)
22det
23+0.700562546885857398778122954709650247E-1
24det * getMatDet(getMatInv(mat)) ! must be one.
25+1.00000000000000000000000000000000096
26
27
28ndim = getUnifRand(1, 9)
29ndim
30+5
31mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
32mat
33+1.23628321006451491424024824364077714, +1.84564118143214438874265858541717766, +1.37224075357606449198863660046821652, +1.70901418995622989563344925962301498, +1.53803492122739706157749617579171243
34+1.04068772105846838870366678069776326, +1.41361414960964293722946740851887823, +1.48040296032698150151233551752666894, +1.47900539669768120797759630589630084, +1.83860374735656624556907913738304227
35+1.09597194752290804434366224650854273, +1.01895939544080508364105825577573706, +1.07395862568612990418172644417418630, +1.87428831780212705101319816316388340, +1.76372183426906124558799982120800557
36+1.97340939837643406580666587462972107, +1.19898128769320963299795623747479212, +1.31744836887910296841994937915735759, +1.09317287664291150353135251631174046, +1.80677908897636311646299862040134433
37+1.71530789234513759257461551664970883, +1.13600577517119037479142984717083108, +1.94004099746720844927539973436868659, +1.01875097310141377571417499785111112, +1.10757250517436206898587017783743247
38det = getMatDet(mat)
39det
40+1.08881967688509821976451643585285958
41det * getMatDet(getMatInv(mat)) ! must be one.
42+1.00000000000000000000000000000000039
43
44
45ndim = getUnifRand(1, 9)
46ndim
47+7
48mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
49mat
50+1.47527565792525574667017148352325835, +1.21419205551870990028448565880994422, +1.72435042098148928149422949795493562, +1.79696534083779717684110587867641691, +1.07858384785475723151343860935150938, +1.98155654372547836517837417844227146, +1.56042489063917376975867551593182734
51+1.75057181475874590286368197545039594, +1.82031583134333053373045131320528679, +1.25170085550157780901983011681940305, +1.80659455292972744199141350955166976, +1.41086109424444556966598101436130105, +1.94584308234005666673493040578709408, +1.77256202480427362666847666761647609
52+1.35429786743591557746981173054130295, +1.22006772252613200021623407883123473, +1.76603172218536132344374290043900830, +1.69782697212912788560991950639670472, +1.48413600722401515290840052980668251, +1.88933018993906925781390102521567303, +1.60913149444224036167395287237948344
53+1.87688679056718594963787862287071023, +1.91597431470881347689070874879192412, +1.12232358344368709750114733506195237, +1.43875957270364912033002978973779409, +1.44844380754626351918478984459957015, +1.81194226359468811376518013049763476, +1.94212557706730664369089630208773686
54+1.45689785992368720245008322242812153, +1.76037626673364314242695395947767973, +1.87109316762600837604357631149627941, +1.28410517646925737238442764216233170, +1.37803913486648113693908150615793871, +1.01308318563294080200589575679728806, +1.84107909536913841382778015968089453
55+1.80528953622066551657997338273072821, +1.46945158760877306483415751042032869, +1.10361958251621305798427518120635463, +1.59753617241573416011644864377008627, +1.74201191075276731418565910577111203, +1.24222360748065840745226539674912607, +1.61874521243065617709387909666007392
56+1.14366788816464848300234706426329719, +1.23290487011265288516232261102352114, +1.76429681254086053455592117261892161, +1.23359440132908005930680588090422791, +1.08257015463123199938914708250987616, +1.40126496940344288214404806063185123, +1.00174284295301334099727318261505196
57det = getMatDet(mat)
58det
59+0.110424511713007174716850546635810066
60det * getMatDet(getMatInv(mat)) ! must be one.
61+1.00000000000000000000000000000000212
62
63
64ndim = getUnifRand(1, 9)
65ndim
66+2
67mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
68mat
69+1.88468741031064195061527280926085988, +1.90933812281065576987472268757493805
70+1.88494738962611675285928622008173685, +1.65807775142198677197725058462545178
71det = getMatDet(mat)
72det
73-0.474043647084378947062219844005107912
74det * getMatDet(getMatInv(mat)) ! must be one.
75+0.999999999999999999999999999999999615
76
77
78ndim = getUnifRand(1, 9)
79ndim
80+6
81mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
82mat
83+1.81293055620438891001481559242059200, +1.49007730173726118588558701019122316, +1.70966001702866118901945676640664402, +1.21027724568738326461884867217913328, +1.52356527427679350120032689074562121, +1.15746047138956993309345324405246725
84+1.00151251833628660226030226178904099, +1.59392166260873014506599392942146161, +1.23082826553472245368912761044096415, +1.50392605142046166537861260824736470, +1.79868133072827766696406467063738492, +1.98021207277300276586929365507408374
85+1.87211074392861866807561487284325977, +1.40842562147537729625073403085469667, +1.46179160086059216258268712125986253, +1.70438052035864933019318468044427395, +1.00757235219674104234482347334728885, +1.83186686596344942791447568319973019
86+1.86430802455765189249892848182982996, +1.15599678494655389688335165497534711, +1.65275883737122493676452571994840251, +1.35793041029692814676025802046909605, +1.07290980816270909987151865436386958, +1.07411373293010131707397585822052459
87+1.52843074300684833121669083573336032, +1.75986021640685617244804314365561630, +1.50041296266782693787677156420085328, +1.61990588029672362314222661890584722, +1.89615135962545904329345461170779851, +1.46672908803170194833703567066288523
88+1.15430894964600821989779197310838242, +1.88879109869998822376796313716395725, +1.82141932442100425871397448894263294, +1.88952415566039455049546287108493899, +1.89422906556484697994609086400578578, +1.98488145844739048046429993570108872
89det = getMatDet(mat)
90det
91+0.905189558588608556314311073158766797E-1
92det * getMatDet(getMatInv(mat)) ! must be one.
93+1.00000000000000000000000000000000077
94
95
96ndim = getUnifRand(1, 9)
97ndim
98+4
99mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
100mat
101+1.86559456936248834255673093831364183, +1.75476368714460352177828079228086916, +1.07003209423701922329460032284313780, +1.42546658708880837154822497991362323
102+1.35801607670792111265320019509967099, +1.91908215319550306930897304042086610, +1.94270227299446275650293933257168133, +1.91759872833595806187451461753861460
103+1.75104336381645529428245054446538434, +1.01907734992091147410982121675371167, +1.71528826569417497851499891448324421, +1.10841050570674471367813097605239152
104+1.48678359068235510494531164532874052, +1.84290097213465622126555392431494796, +1.04850639953056002130060433110318841, +1.60496011024375950637472028112372489
105det = getMatDet(mat)
106det
107+0.150266533305688629329157149336841886
108det * getMatDet(getMatInv(mat)) ! must be one.
109+0.999999999999999999999999999999996533
110
111
112ndim = getUnifRand(1, 9)
113ndim
114+2
115mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
116mat
117+1.99757713786968863752969967051320807, +1.33958468740009192952524589497147777
118+1.78460885591087350517180469990237456, +1.08798329800989520490351191226111259
119det = getMatDet(mat)
120det
121-0.217304133888172211748907133914927470
122det * getMatDet(getMatInv(mat)) ! must be one.
123+0.999999999999999999999999999999999904
124
125
126ndim = getUnifRand(1, 9)
127ndim
128+8
129mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
130mat
131+1.60269983323099500570846048802758953, +1.62605304523476135966038240944529508, +1.05022987743180314151714321272729531, +1.08900708002345482222660109762003156, +1.53634482076540808743621690019305291, +1.84167662070769746107044904019642088, +1.65593889186301863286351660006002563, +1.08055412010872429658888459550900420
132+1.22115412354344771817675231785067815, +1.08317810205078653726832785675409255, +1.52887383436064778156697273546619648, +1.51516390508645130531832137844585966, +1.99576206921663285391311896185007710, +1.79531574618682160518763462742437298, +1.14133966996429009584131465573974551, +1.88539486745994435270371864925095638
133+1.69764014873453629913820309426782221, +1.20453217645677274024584343787090621, +1.66765883971482309347417880185827803, +1.80369755338428181324056702181468934, +1.54847880343360366243954668151449927, +1.45696822285245721813699504129759351, +1.10869501096545274203437834086263193, +1.31954535027185258552332496491655088
134+1.34263623858029472886974338822018266, +1.02145069480617944913692359675946319, +1.46643090928428249785317197103700874, +1.58877543730618735820908642187942634, +1.18191612490851928633204076957102206, +1.57480352274292405466219172061764241, +1.49343113771888871634959705705554982, +1.21850248883643327212565577766298202
135+1.47086278442947895411993392701443361, +1.35777923908711141721314001305186820, +1.01655159283145072867309526953331423, +1.53870330103500862828815896387620252, +1.50454917446560033255200119420487211, +1.05942676672727537320701802584856586, +1.27653221508844736030828598944158321, +1.11603982363155022646822273858837539
136+1.74031255621943012603660145137724168, +1.71649682447799306596663050698330714, +1.53089619729045209024148667930494682, +1.42975217947975862317221088010884003, +1.28081948487323861939168888336240113, +1.56295593572043292012079592117577020, +1.60652591583781463515272823447387364, +1.12085872961580197086398452826508153
137+1.64332364058743872005356661007275084, +1.78592790670253758147817310927057316, +1.01970646830484670542223416410462339, +1.85781019558278594188371282778868332, +1.91221640907958754701687422910988019, +1.45150143064013894480752612824737849, +1.84667524529797815045135889921254245, +1.06029720583604871504972961538912628
138+1.02852054627682343446246457006503420, +1.09227250595424578896353189518680036, +1.20115741991838601618438097246241245, +1.57455041662602953181116306478246176, +1.90512324109672623399983438587608513, +1.28488815793589217006470523514919480, +1.78428484839273336135210642262005188, +1.85954485027202267428411774825665883
139det = getMatDet(mat)
140det
141-0.268467422128554905869938763845753700E-1
142det * getMatDet(getMatInv(mat)) ! must be one.
143+0.999999999999999999999999999999999519
144
145
146ndim = getUnifRand(1, 9)
147ndim
148+3
149mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
150mat
151+1.14790522786343246643465110126513324, +1.57126836941055412725025774889943759, +1.95731625754478066726984501998275719
152+1.21310362335246663877465282291482305, +1.16503835442665402298715813168970849, +1.41299128532707752200348933868498512
153+1.15383206876649788711257255351213541, +1.39455327035131978923930336099648064, +1.14523197485734820391873822969113459
154det = getMatDet(mat)
155det
156+0.328553848201798241432649896895990211
157det * getMatDet(getMatInv(mat)) ! must be one.
158+1.00000000000000000000000000000000077
159
160
161ndim = getUnifRand(1, 9)
162ndim
163+5
164mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
165mat
166+1.75571710613527834119994960928349205, +1.50783385627270486931830478935720769, +1.90212632398114560450235556520201743, +1.23915050245782621028885933597950763, +1.89353926923229995331242446173799277
167+1.87876068567007193633886960549990256, +1.84869256021181684545075341247889814, +1.42406538656046392709920729147999937, +1.35782137028737440668590302452781664, +1.92495649828840898346925834219764296
168+1.67938791926268679870245694647940605, +1.27494273963575576326522659146057983, +1.21116091803017584602791895811822360, +1.29172724437231936392634699684168920, +1.80158291102987095790071646209911745
169+1.08654435590444428833755876398765491, +1.43025761680209612672344565838438054, +1.04496635968775443228631418288105220, +1.60921006110457382424790864144744309, +1.76272904937242836794142074926537224
170+1.77190293722902740327867258664836626, +1.29630735154871431808492253980180035, +1.31093905452671343854248611214451437, +1.24303975958450343692437005559245200, +1.50969525888793072828267122964822106
171det = getMatDet(mat)
172det
173+0.121786965454092241529072773292377479
174det * getMatDet(getMatInv(mat)) ! must be one.
175+0.999999999999999999999999999999999133
176
177
178ndim = getUnifRand(1, 9)
179mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
180mat
181(+1.20707850960389843998120110654120468, +1.02050693443003742580992094967893223), (+1.22297492272994639207581835712234290, +1.17576541498844453569941118055873125), (+1.41607902894809750924945669330589076, +1.92429902182844620910981913527982019), (+1.74458810286163165210426881464950725, +1.52873371921086710526745376489958838)
182(+1.76961398813810651825733087405318131, +1.83953242475030836236312374177812312), (+1.58542589586188076296094162911026772, +1.94682279964190602809837520132273744), (+1.76996342810911639196102945026401702, +1.01103954558947755303940519460243369), (+1.40721457769363294901632365879260670, +1.75826989093689732327289432846527901)
183(+1.57840577123474554740497750351386693, +1.92278427685307777846364217342382703), (+1.20338908011089784085557492562415930, +1.57778887160788508076424330259417516), (+1.27938062500195494048593896722946110, +1.33644998883371742144492730299177240), (+1.25954654041150771430037490750405139, +1.97106041130941220242839194015011083)
184(+1.98748552944362033449326879555796323, +1.83770812546567443572273777198096130), (+1.04546598934871812321753864825681759, +1.83978357563200149281393249043626326), (+1.38060404782833860572602967062069486, +1.42854866600487292246928339606505030), (+1.71627556390745559674276294064309990, +1.78828808709852570980740522332924227)
185det = getMatDet(mat)
186det
187+0.507220704467218365775744149531454406
188det * getMatDet(getMatInv(mat)) ! must be one.
189(+0.705804614838700766631101242390287292, +0.455680217379572039964673677461129913)
190
191
192ndim = getUnifRand(1, 9)
193mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
194mat
195(+1.97748598421393153280157914183232854, +1.71767092627039753764424209127714231), (+1.87474308310767480516423945794550155, +1.89410210904297308475404858591917165), (+1.62090498520067496300153991746945154, +1.49016925145638431099369136570781806), (+1.63007243041324414092218321033975108, +1.94529292188401842992591404867297216)
196(+1.29290680985654570915349233843108584, +1.92611632931753627462645668067859941), (+1.68729390007332759874435133047014683, +1.44015285650387973106079437635476534), (+1.26710504794451909415396229036790958, +1.88849459836338446072022401333363815), (+1.17437732155022577585422091452754573, +1.23610266212384388094351409469590369)
197(+1.33299561904211138237551696562031810, +1.34807333956249440446310431726041578), (+1.66052753592048811653276375785969946, +1.01443222227950335427439353109952394), (+1.05734643227877642834572816012245780, +1.62934155933155601363244880977382091), (+1.75619292442578145000850630341914158, +1.20202405453105740640182253214596899)
198(+1.34294792835065059740908092628642087, +1.84429948268273750108356017826586733), (+1.93756801850549091863538717928101346, +1.89043648985658425134755241178699139), (+1.15318415176520422591420021740077005, +1.53582013514531108069938361357911228), (+1.83111510978812272362176186676647877, +1.72640978849183631983744109027570136)
199det = getMatDet(mat)
200det
201-0.398875188878261928666590201784560301
202det * getMatDet(getMatInv(mat)) ! must be one.
203(+0.469545180283952262105374588860601237, +0.499071642107686809792529418165774628)
204
205
206ndim = getUnifRand(1, 9)
207mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
208mat
209(+1.30207803872331615372243050108015355, +1.84722132841251073650217840030155274), (+1.51844647458436711522327537816129510, +1.27743118706545433132664534919122027), (+1.21179807927738505934047126132264737, +1.99721162848284068390349833001438938), (+1.77409294730113762131531733331281227, +1.95874049415849800199520942789552477), (+1.52838927609664797351703157480524520, +1.84787337305397383423155397127184877), (+1.70527958750887746116730074722052216, +1.83205386067314882443054540082489585), (+1.74601672567646814851177310982080947, +1.65352891979249530139089902856142072), (+1.08489980990638755072423008235269198, +1.87118876369478039526454266256953862), (+1.38196978769012870003076930672119083, +1.00657642485850128781223911525458241)
210(+1.66406369963884232782584612955629088, +1.08089097408354867928673840415885992), (+1.10105384083480200911680768331595941, +1.73674030764226863581862889219855294), (+1.63421412991366636174843321459194917, +1.56112652232331625318617264833103834), (+1.69832581967562096611395941294505798, +1.79900377084754869389412036922081202), (+1.41298666489759178598414269785669620, +1.89239554126757321124999429410815350), (+1.11712824955107448345706371500331598, +1.22971608817368503193796949772291038), (+1.00911879849401049564863893875443125, +1.97101806291571936215292255477731819), (+1.78572005658089816685383222626927894, +1.71037542498432640884272134432725154), (+1.48596666469699226983777919861780060, +1.65740586084632489198030869428504634)
211(+1.36026764498284347249175580379893137, +1.70401947235145237658322028200210778), (+1.40461028365915680935530958175333840, +1.63507584839228621745804821172546214), (+1.61124034494867976464317979116882304, +1.78550044566404134913840336797866161), (+1.93690968532578361068496582130637855, +1.87472521923937082413042160990528973), (+1.69438148922664249911715510069473311, +1.70486228769972106771916756315311450), (+1.71196692677333696387787557282509366, +1.03489029599566732352527723945427164), (+1.16596286598214812753671776439042007, +1.57390388330659840645909433839083183), (+1.76137963640653862002862131548347405, +1.79353578978374428524577635264198697), (+1.21783780898631728219311389014020729, +1.50714343060348773887480847568491972)
212(+1.53964082860682838260967660983847561, +1.35981489433667542049117893237790569), (+1.46296224760651941344671775695064678, +1.85798981183886944500581415554836269), (+1.21980408608144304782355318062589921, +1.11894275726421486598930419433070128), (+1.60495171564514121996546762950743483, +1.51421454689565681881121323372631638), (+1.01541924513000051321518768838862148, +1.17954483944108911908950403217874870), (+1.69848392343589262809225597920342923, +1.39647005854797790451876312866564006), (+1.70167581902383716752621406740945247, +1.67104455141727648048047537816498221), (+1.07644923614379805789080126377990943, +1.18508634754614549273858604836433135), (+1.74859744873104850925924176969046180, +1.63178813938915152471132336667023388)
213(+1.37307938480156771525035364207533540, +1.77402070128317939871306297065835929), (+1.59214403441636854587188706250090059, +1.97793792733644431745451110399621457), (+1.65591837447100096477532321967623369, +1.38648608538987052683857994287697217), (+1.17890338251861831393823224035265362, +1.60569854732749711477805100768627248), (+1.98034661900404106396291036915127833, +1.38868551355655356297601277183863915), (+1.79361441685347859274552799998396794, +1.16583047949112620718920922769239860), (+1.40994636569754454237018867751658355, +1.83202557180262915167931327630787679), (+1.43331803081566708999256896779460216, +1.29216109514668335337745414038899193), (+1.25011961467554133898315063037067941, +1.02931826746318697909512757239200126)
214(+1.73366873467149039459503683066205153, +1.95381854253945354901878129074838683), (+1.99798128555593097999486279891761772, +1.50640795207089697756913373725474420), (+1.76728391290101965837086833342167979, +1.63679555276936757773044638746240678), (+1.39307528139361310732896247029044107, +1.20963691185552658417783496274629460), (+1.67443642419532898242150099242627305, +1.38255973963375844927141980911404135), (+1.96881229302076751089806943002749327, +1.14551202353690982294315377488479728), (+1.13031410102217213646878399097030420, +1.56505661300639680840803996164569385), (+1.91359621738914716063545002325222636, +1.97157789631157267431501619489440429), (+1.88099667649566421931369344530067800, +1.77818892496428480705331464900948316)
215(+1.35481600585037608522112079156519145, +1.51536967562618570443329206525877227), (+1.41499308782045465593961663925465037, +1.09304576855813618466503008432371840), (+1.12638681502884000577551789341460233, +1.45292880371961817202041574683061202), (+1.54903235677872169705052024883992249, +1.87469090072727297688447556488906733), (+1.04433802283209702127383414600005242, +1.75780875697652070775484406834188052), (+1.53976750462980717328644854104697915, +1.37709148745376314484157278948464486), (+1.03361265910734897518406985053034462, +1.46297074421621765559339869643888843), (+1.12263485046985256410253406393675991, +1.40060886071634019564874543507780201), (+1.07167112245719915715197035915651634, +1.42819812520772059597213757782826050)
216(+1.55449028716365428781148444599858238, +1.56865414782221571534601976790975859), (+1.90650477468281391768445455938525365, +1.61963436176064954731279394393157519), (+1.78900857377034936544419636630828854, +1.59739729451208801710642626664865284), (+1.78901344599632086165463396095931738, +1.67365528794873830073933837173596875), (+1.05958157414770646515464416948655515, +1.54859508035354083288767175912870063), (+1.88304131581130248563721248849900506, +1.81568790680715331515776926268721445), (+1.39175993970052167734128797970729752, +1.69150717890762628171212793062343565), (+1.17730098864905455610238700764657013, +1.93624486859930733945938463981183255), (+1.85285503176602848927062477803743763, +1.06741835959765334879040547675106065)
217(+1.47853166244849858246401176005747891, +1.62040024830904031405267253157396728), (+1.89276434544984154978070355382037745, +1.26989776267908478127866394376500579), (+1.88382111674231839731728571331536735, +1.11947224404721267983282654133467886), (+1.57099860680684644220814923212264716, +1.96779558357084381315020297129376505), (+1.29800446132867683247717624515807785, +1.06012286887517704325135386939556421), (+1.43264057243239047545871314736315044, +1.40520765216348999112862300190751277), (+1.59386698624812153560912215762737308, +1.94783572093682563039491246410994265), (+1.82199071289727141529134936650862931, +1.00114300817680588964722268228925347), (+1.63360773461433494332882099929709832, +1.92798654697872380425178983679558635)
218det = getMatDet(mat)
219det
220+1.23619850600300303900879252007315528
221det * getMatDet(getMatInv(mat)) ! must be one.
222(+0.438549949253286386558873967385021776, +0.496209523551519838903785924797996017)
223
224
225ndim = getUnifRand(1, 9)
226mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
227mat
228(+1.54955842774115145448683046738593702, +1.74465342656027980173336158802661263), (+1.72548056685990962673066161062439592, +1.42260121145015867849996646986331565), (+1.04979861365467585328742294472595085, +1.21791446800168017082101208696823954), (+1.98495698107768848712879162046998461, +1.54863627369627560653427553366769674), (+1.64978366752093311045298560403431759, +1.08882731434545538767888819576935563), (+1.39647108457501725746590254726215871, +1.13424239241254335108004240402195428)
229(+1.77819881040069919316326246325350725, +1.24233978485410341559705247090218826), (+1.79225443180755946010869917915491854, +1.25229244941914417192479124513889302), (+1.84576366793101192889205764503956624, +1.35626466655005092808379692115282438), (+1.07142307342073358447722477577059476, +1.48396609574200379924482047648415481), (+1.71577226864992527919986589771602389, +1.24048874000327796978346768379381214), (+1.88761620488969619481395146149179708, +1.18917296327052438399589747088310176)
230(+1.93930872919297942949865811232473077, +1.89317590708054477723831893335264633), (+1.05509016134710617282959024699268602, +1.63245821127321351967229849533844537), (+1.81265889994836671556357584793745363, +1.68575692266863729068662410149468249), (+1.11966607628005457045350894762159147, +1.95942781982778490367195154605699013), (+1.63670210523877561235165755127073125, +1.08477932713035769794562218089666397), (+1.53151561588609425739137033926772227, +1.93289708581033138807955897187478361)
231(+1.93090660551181321636755333488698727, +1.58603423225364729344291992321104305), (+1.19229105931779142152957061107728050, +1.75626919960245138522960973501938071), (+1.71150184253085231768925086131979428, +1.73575290476943202675544569456258810), (+1.45381909275848119675547641903086172, +1.40285764388921621157650993957519160), (+1.12387050983329458138014243266463827, +1.07227948457427350539495245787979381), (+1.76966663859745070453484688956288642, +1.23127569128862426341657500313605773)
232(+1.63802911695712004266245712260468886, +1.11482500081113506174328111584410256), (+1.26056399547458674754596381740752724, +1.60716537620179181656388909011423686), (+1.48088400198368299254508103798431192, +1.52138307871086821774166761910349549), (+1.10951081460379884891385543562072748, +1.07699994609350035354399864257283816), (+1.67973626254179015863775709877338056, +1.76993555019789768832153536369746528), (+1.30327282947160519909261380634437656, +1.31016991075312462812327135004205056)
233(+1.72583118722598551982057872647324152, +1.71405236139560166920897930634341167), (+1.58715515632145629755412099198309071, +1.15919150501418892202935340222099841), (+1.89645670380034029215519649574603326, +1.10227564622032814547328056943248470), (+1.85738385183124090429311677181830815, +1.92364211423200523363128721645792800), (+1.48678371725029334775263622052147749, +1.93268612454518468762922997448909329), (+1.61359978386598798690385954962481939, +1.99698600612101769679564442525076370)
234det = getMatDet(mat)
235det
236-2.11316593362098571930925518602715363
237det * getMatDet(getMatInv(mat)) ! must be one.
238(+0.969985558061137535560872381350647096, -0.170627006109704446357056273856460688)
239
240
241ndim = getUnifRand(1, 9)
242mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
243mat
244(+1.11875491720500375039047958666881500, +1.68363309595735620512651252116656670), (+1.61734229341886642930041302197347830, +1.26463219264193457645606544233429503), (+1.20197494052475197329708052482546770, +1.36345632838032965072039873931644414), (+1.99454759693642951076772650843523148, +1.29300506772015364067083058328789224), (+1.50423376828842529443157809228732342, +1.05613014268206212973881349512824059), (+1.00242716770115717992890433097765101, +1.48231908264589197619884362209196634), (+1.96914010305704890948679498271329131, +1.43402531195478935098189351057682797), (+1.26143733466779142832554157304178957, +1.51014611703136140456375705018126117)
245(+1.54494947051492435215501448314640962, +1.94248947765020044286784139350753254), (+1.33590807968769953952205089767868645, +1.90256542151450629299353896129512715), (+1.24824324769844107166216137350627771, +1.54552304664975007466075242652345597), (+1.91339150724366595986794099390745243, +1.65948727639692487501403670717384448), (+1.35872788510017192548406958383251413, +1.40982055461537253704046344534325618), (+1.92095807183358859187540614975952791, +1.66854008825443673471889416528714986), (+1.86383140000852305127333648551729382, +1.01106285874247451769199788821712889), (+1.26007823800348391983036472408856851, +1.06013326844684071578002738302748409)
246(+1.38309524208604036088146148974713370, +1.02536814226917215512250428310879062), (+1.07660168288561875225003285784575006, +1.86401926712667171037015217655337680), (+1.40236836369122704670301093854541453, +1.97326456995819880337515765135489336), (+1.76329634492038574899606760941774409, +1.38280024067240666583385193063383170), (+1.28920938492553671651788371322158461, +1.81159491011068282594620355207549077), (+1.48013986147167212434926291013063206, +1.39545518534456664531322643055989355), (+1.27172184541376052012746662706262478, +1.24692585942649869343622668963258354), (+1.84973531155829943935895636352571332, +1.25945917991547805158875008218380945)
247(+1.17884806967925293966076972151768480, +1.75859478815824249257004426943518714), (+1.68382809961116777082054529139114439, +1.53422881919510882100276965214713934), (+1.96869539306194027319449365696948863, +1.90961344176479158830333613626271225), (+1.71908348421525048682108635051283693, +1.79375758565382313344805440313488842), (+1.21659031578305744161502740925132656, +1.37570787764766541600469007945869606), (+1.18833361738515618075059112129741845, +1.74112739555342772756947718316454718), (+1.77748056363629535684674215948234433, +1.08938403865033019283553996495874817), (+1.37710477160122293811697514067967990, +1.15076328392884449233751787192546206)
248(+1.46403747769479383338104839809820141, +1.20865601941165485919154615527390564), (+1.26700425457536206665609359681491596, +1.67696511468206090811852928159836589), (+1.91008427546506397464062898143434717, +1.73248468355321432975148177651675773), (+1.29836069947641758449994690612956708, +1.27313314121395817773425413528263054), (+1.87565935944715996518499930987264216, +1.58326649524470642393263957153110806), (+1.92036532966435752675147336780790659, +1.79679915707858424211934916762186985), (+1.68220487786200522799926189116403865, +1.03783006329928892048179235964196844), (+1.57119943977271473239837016971579294, +1.92886432390870730173668457623222305)
249(+1.39628072981324569542970732863323542, +1.31283793865823489442001074593422564), (+1.46514042225502276308908110317086935, +1.90051344322372961745926025821644221), (+1.98124567105687081992133778281827930, +1.77130176567695500169080652741166570), (+1.49340730780563907617860324506974419, +1.88385550362054287723884585976746817), (+1.48395187529201861209853460727942822, +1.48013015910326296313079584070206899), (+1.12385946597769600482282079552697449, +1.12090606564590183577694087824504723), (+1.53127678201325028246611964493703431, +1.56137475132930757262406461565925550), (+1.20036270802441090143719925918452351, +1.13745571972087692724324601282196943)
250(+1.36416197850110618181521441738369378, +1.02520106840167450415433008985649884), (+1.96834804649237638716472680161013610, +1.51285176977238976234441576731577003), (+1.61523546073902201082607123527843568, +1.32664410375996571051744278568747917), (+1.33258130588464602792142030015784440, +1.89948471670806766492060184503393563), (+1.54688596078108790709077157831688901, +1.59582845798994700032531919021608707), (+1.65282471378001085847872434850279752, +1.03684752444280158807695059389322505), (+1.46461298707890798629595224551712905, +1.54261696602530274771769572193482080), (+1.67325039603506138082668227683868473, +1.57568432714043582470604877299912655)
251(+1.70469296610665706612410556579006184, +1.03484578849383981062989514768637697), (+1.06018191059317661882551956832436178, +1.78107858714398470903505728318023172), (+1.26133868235604838669926587449480542, +1.26821853075971917737782368227550827), (+1.37569500462706721557177190133149749, +1.47689238784561907883027811864004562), (+1.47690720937597314402563818545488083, +1.73280929063980982024229943751601443), (+1.90792072971379677677442873285704587, +1.36065181635981399067331110309970713), (+1.10047423188815849333351923488774904, +1.61800378360614448199233725732120252), (+1.22678673278633052083521029710600895, +1.61309500537066992112558467865974315)
252det = getMatDet(mat)
253det
254-1.40832478210538459299748053873297820
255det * getMatDet(getMatInv(mat)) ! must be one.
256(+0.996071555587536680488005533702719122, +0.625540705067344537259902879471645170E-1)
257
258
259ndim = getUnifRand(1, 9)
260mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
261mat
262(+1.25267239574612790913892036720513476, +1.46815078754452930890439780404063249), (+1.27666559994773743638507648165072159, +1.00863350011243740274003226893641036), (+1.55474907760249492784566634198584017, +1.99057180796337613154758984174485458)
263(+1.08122519811931624409386008326608788, +1.81458934963900846897579523042727395), (+1.07499460921328658993108387933553348, +1.17419895746976226169222876081828092), (+1.09064976521772819510832551688914831, +1.32615636299622793789780838413644333)
264(+1.33477007020945269890644364869044937, +1.31027616501933064630114800416868699), (+1.16824756735261259188122828673919722, +1.86002898127295298081728359329492221), (+1.91201689280654938356266360368981550, +1.38205572453477562646758211365554446)
265det = getMatDet(mat)
266det
267-1.62819255123497802831213448709592238
268det * getMatDet(getMatInv(mat)) ! must be one.
269(+0.473398263246648132101833629321385701, -0.499291846119787308131048639828298352)
270
271
272ndim = getUnifRand(1, 9)
273mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
274mat
275(+1.07637938051456183359417166924681186, +1.82804495417634457404242265193078553), (+1.24526335381848456849984257037185199, +1.21468855421669474917027879003617568), (+1.84748773277655642054801246415667692, +1.49633382509259815012546011166987263), (+1.07367397538087543158965249545880486, +1.90533862964655907122411429176673633), (+1.04530439303137007609052378461852717, +1.24610887433454530533234621759546213), (+1.70294123258501984364944539456262219, +1.63988396160360249052656759740827195), (+1.40205302000883780784913417484607051, +1.69285563005052469385786237113979455)
276(+1.99328037739040801102907465245410610, +1.89510884214615568158167686954691305), (+1.81595373789167857868647127390332916, +1.58374197705284008515454119798272665), (+1.66893435918398536563824458084052587, +1.20676861184648273693442836866789594), (+1.82629532698096595712167518126020624, +1.15262315680609053124397572933105830), (+1.16541210604846629516160233238667856, +1.82508987194037925569031251590219639), (+1.70119840898430233943438724038141076, +1.54481489364811258142414182433395484), (+1.77937291356672201308937545086836466, +1.36970444602626653486485690051109859)
277(+1.35147473164136686356972975736234501, +1.33542897136855299243006587039799716), (+1.65963916751057904153622909307971793, +1.69998097380421590431579123628944901), (+1.13360207674599042295128439033673108, +1.92415623836444720446317290477137641), (+1.47378115565851557334147122470881816, +1.68671611228494316448446201011887613), (+1.69328416870352483418638918549370535, +1.60691497140180416686717053754394744), (+1.95529942422249832445097607104174579, +1.66456341758331667616718482531064042), (+1.29586589527687921751606415101840882, +1.31629562473260951115936154121903844)
278(+1.30608705987281534801891747921034171, +1.81585294295926018879450208926012207), (+1.50340673168502336746128827898749893, +1.05112604851620197149279530835286864), (+1.91414009983392034877712465686588232, +1.24128419822682242722467398051039972), (+1.71726068544426017574787661643563409, +1.49818990091196678428708127433135949), (+1.26561845814880956182398121432849740, +1.41154804241831142869438265253720507), (+1.98306603739867148685873873765725699, +1.39284903598715399516299542920347200), (+1.32336898638223017938954943989511635, +1.35136044625347738138059304484913784)
279(+1.61686560131207313759100831490155726, +1.13882960315004146150713833418333845), (+1.75912313681676211900974635613949148, +1.36141389289512459262312853804785931), (+1.24873509616684682939057520661016955, +1.53860051697298502628759329016837008), (+1.22413507191871141979078478601181699, +1.86719568375371648200971708438740051), (+1.23530667340823393351032031450787277, +1.31170902867988528248532368283871408), (+1.21060156016203801490755984813424602, +1.55616433253294116478150478462739361), (+1.25766426298851490912502495275970886, +1.94638096301340974740013540369586956)
280(+1.46539631868679456479910171592782545, +1.31740799326068103021325401297838194), (+1.00491742524087322701067588848019005, +1.50604275598658005368981478379452861), (+1.47584806717726384541436538073872011, +1.27063802458263306769745539994288893), (+1.97077510349766452267593634016778802, +1.57386244928970086414010762862757705), (+1.18818893716146671793363231659574480, +1.68647163823463294735329882654081521), (+1.79659300010456173652213498433798487, +1.64945358218677091619766122889229462), (+1.27732556409308612125683606361625276, +1.79142620392925470375816089240361503)
281(+1.50869314881970947115256930454809987, +1.10580363474657904262414574260631715), (+1.07519000860011288387503204689611505, +1.68178164927350817002847257464847945), (+1.26641072689965266623044723309328686, +1.66130344730066834334060905512927526), (+1.32413733543110507115605750621447160, +1.44105396692119755218053907563574076), (+1.57337220095823639555958620942204190, +1.06607851709643459972453285345827019), (+1.26300412480243771699845435148519202, +1.90320766861097641083033763418879181), (+1.13751255434861548946383699016382330, +1.11829471077114679111485966986369519)
282det = getMatDet(mat)
283det
284-1.30087387279669735392057173046625931
285det * getMatDet(getMatInv(mat)) ! must be one.
286(+0.965238182508372266275985136217914395, -0.183175963314804210308798753216280193)
287
288
289ndim = getUnifRand(1, 9)
290mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
291mat
292(+1.71451789092775882288811456147596802, +1.61429413346254774970940308008917735), (+1.44584586002201030853369615538979530, +1.44070856432777351442621852257791543), (+1.82836563402139994413972914774554460, +1.31365196583403494960949222586461509), (+1.06109854876037877130927324250201778, +1.78157253503954751449540962642901949), (+1.21805446675885153027840060285409834, +1.58133109093811861575014258210825858)
293(+1.19610209005374509618337382516296796, +1.19969659984222703640046457902684905), (+1.11880355987276998075137545425451806, +1.98363788562503401851713296523431991), (+1.55285653033260844394085644816042090, +1.56528195728216835341093985395318395), (+1.32008971163130062336084676438840025, +1.61639372145836541254674234595769162), (+1.46326249988688486881226243900675487, +1.99641953413640984365549516306029610)
294(+1.00961306211039967436980971160270002, +1.46481168763436696628045883898690672), (+1.04723470901870991190602949862171118, +1.71576568250770808886546931091334937), (+1.72096773431531669657062431594557460, +1.34781561075969207144533179679328695), (+1.77217201270747823238421452521086907, +1.32271747419456204324172476893838929), (+1.23199383646653288817425714491482102, +1.88820648278807417124453018075467487)
295(+1.06831530783399163443440940420174032, +1.74362782612757156040288259188927928), (+1.26174985008024947095971185824788865, +1.07477307380017550784998494928699832), (+1.18553174865331643642861611877029289, +1.11178182437787935558133359214159484), (+1.49697809212527956706614065102181944, +1.06533368656750263464538121148213396), (+1.26169003164573291554350262182102225, +1.43619879022701369881860082430600463)
296(+1.09913191701373685037372343761231766, +1.17050446788992151119432376301476969), (+1.01096320166771308900038169153176864, +1.34510293758627538314331134598058927), (+1.89986948292383074032141969285810875, +1.12994552604359200785280415566930773), (+1.69690302328559454310948718915313147, +1.25248779754070106108619763100549116), (+1.49053557212958092801753100933722747, +1.35179349482363812629338620295556837)
297det = getMatDet(mat)
298det
299+0.260419736502192860905767393788832323E-1
300det * getMatDet(getMatInv(mat)) ! must be one.
301(+0.176703705571384749185459733927141794E-2, -0.419989837467239393784010716627429994E-1)
302
303
304ndim = getUnifRand(1, 9)
305mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
306mat
307(+1.79071029132262462105987878714305824, +1.24876605969933320896962581106429512), (+1.05952887534920250705558564715616252, +1.36862351578957397090842593377903480), (+1.51506166366701353123069017704680546, +1.64366095687662123816507722658798000), (+1.69008767944350227168575016115130207, +1.53666034185958673831902051826842890), (+1.77457931010636722182124527323578681, +1.20106611288736644206952857778855511)
308(+1.14886976938242052146518005888128293, +1.99619024247197331082563238992110976), (+1.79758668270625102313017766194670073, +1.67730320405191139419405371912890013), (+1.71084802476098981392019674893821350, +1.86152775159804063274922106029176630), (+1.27675570800269654652144406475343790, +1.66302343414131858111098533735920315), (+1.25173323913204347994737166893269394, +1.64081879317796869970477446984508274)
309(+1.89048327604071160960291729048110364, +1.02515660563752227140429959129375227), (+1.03505902852539549209965678322206185, +1.21344037260162222526060706833205735), (+1.35983798934595712451943904672835551, +1.18658488875596237013326235531950420), (+1.70524605907448158311438450968155208, +1.27665147397232533679968712904025117), (+1.30574188273158566857273096474295016, +1.16612491167416898782021319529102359)
310(+1.87913122446300636562772382523030805, +1.27191229016373741872113743985587928), (+1.89433087332978056238358976467824703, +1.32002985950323441023208321780244909), (+1.65212212576661707404750586326854098, +1.39753309979904383050008283461312678), (+1.88828048394724740694583066043714974, +1.97053453376338333929144815183700296), (+1.83559081121334363711790430575694050, +1.80976542354764012008547450370799256)
311(+1.16807311065086028610529638264645665, +1.31212407908680086846162030888366915), (+1.36974970878190970003802440827729178, +1.75109504417917870501337023993901609), (+1.08362002678953007187309899422567398, +1.22452950779003552007554961444096339), (+1.39385303869849543199898533026146656, +1.73843917031048160647340932651937006), (+1.88180792891925055704954321223312621, +1.39461999409445656760671955314853887)
312det = getMatDet(mat)
313det
314+1.03382574497047033260332666432988549
315det * getMatDet(getMatInv(mat)) ! must be one.
316(+0.877492449892455682146738732442503967, +0.327871087890030090174272260613547373)
317
318
319ndim = getUnifRand(1, 9)
320mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
321mat
322(+1.45433103351622737975024302633435279, +1.96167420093126855120205570972336016), (+1.67886893726511480743697038394480436, +1.99703734005751237586105764099244481), (+1.96161188591653500071647828598051434, +1.20987068317899544654014233212992192), (+1.58332055482237487546093475537301285, +1.88944436604047646053348793849559032), (+1.97348976283938683528428120003274640, +1.50874297780029741069679819108438330), (+1.50318470161048472424376657031564253, +1.44713852334704040859489903456227776), (+1.52334794736279387497975553721889154, +1.29026030842749774902603022955883862), (+1.52213800272141001292765125679825574, +1.11917038271302538450890674111208503)
323(+1.13944213286680464711835497958124227, +1.82060259419930505660989374133408118), (+1.99461393418662889718627290136947771, +1.42220293388516852034254935951165098), (+1.24914053777632989986119199763468868, +1.44086718249094883615384548223827684), (+1.28927684312568586155523179858555577, +1.08957707952516436796409820858068625), (+1.16244582333779528364845953172350775, +1.65481361208564846970150546527029860), (+1.52142125601204489210002973957302836, +1.49565910090371094460718885276069475), (+1.92020496322269154318980907978497087, +1.79094311649494993424117813125553019), (+1.47328835362600499374561582745442308, +1.92298583532750807672590354647450860)
324(+1.20545970024662935350674834448594198, +1.85047305314265330587415480321223539), (+1.45751765725610953448911248195094697, +1.65993523846001585710263717126682175), (+1.80426485775658887252744355181760757, +1.77930290184779663332634593454376020), (+1.43291138768640200649291998326362465, +1.92765670462987462929089487958255700), (+1.75936821472529647448333912210443396, +1.24860635706449865409641472256416661), (+1.13262788766481863812118823820223165, +1.50909421896607260418104057156400646), (+1.52933368077238448620860740556923676, +1.29369983480271755602114755845785893), (+1.21761180089099689810911110209989676, +1.52450135491711145903561513119195012)
325(+1.82004209939985366653962927303192256, +1.08501692672420750657951822402975672), (+1.92511181730440661472980731500683112, +1.82147542577250647280792138131795021), (+1.79349544447586960165653430895730125, +1.67678697035870160694791907966180215), (+1.49798761978504375180798672255350393, +1.82922989222581021041193397093403058), (+1.36530039899955080497494225349175960, +1.60464127023186881382868571259514760), (+1.42593247642154185203217353954129785, +1.88048295556475707416003743612651558), (+1.72012559931989335031540306724585947, +1.94372346704713625056246341382421783), (+1.02766107291597456562527640721225596, +1.66473791704819582905542164524684594)
326(+1.29448010116214862977152218510426301, +1.42209978383191246578701549620569706), (+1.35323638868103217468710733273238229, +1.77549010961172250659304871738683604), (+1.45405159926759997538619570195020632, +1.07134793210013567400223137080367077), (+1.50121690011526952794745389905485591, +1.20175477002367738648412158573716558), (+1.16151372049876580655723594310821063, +1.05959487300493111588363707490334858), (+1.23388694495955072251142328350457326, +1.12967829109289852820355674893315083), (+1.97120480450181046486202774194901588, +1.53896032648780989776600518791366018), (+1.95150773286275386935046895195983884, +1.56265626211491445151517817643713813)
327(+1.32286504857168912486573816457104972, +1.41135230974453292437537262837644470), (+1.25157031755128018238960604300978579, +1.79455330607605637092605890809868511), (+1.76392919208005486043510700089835675, +1.89903049110575588211241055505269575), (+1.65588634517281180778543315537346793, +1.93213307513294190122671733985797983), (+1.10230051302150640188474049869511597, +1.69440150925879980888927481398015476), (+1.79001974875576499049480798400843426, +1.83945473776280653970808203892748682), (+1.44304571764637918955021090101643473, +1.43227168875035189603118445522037301), (+1.46738068950167890910323992390573684, +1.88470832241579825732607560117847546)
328(+1.50731081214868602004683537348562804, +1.55680850798563583631927240208878037), (+1.49097179565739760399727634577260642, +1.15225318432062705791673358863968336), (+1.55177427836127567846921162797591121, +1.23839146116184171366122576959606213), (+1.43105125159279318137504090653172035, +1.55251072814815096287837297557809729), (+1.94569677654248577463410453399492692, +1.91729455416640403824975850097039724), (+1.92928173387579642202150225602111170, +1.86190996250397832590403714913542945), (+1.46869585968346388866449441370410405, +1.39293490146200368520964462962440504), (+1.04062680641685504976952650044111984, +1.27326094700835445976470149541001572)
329(+1.62943749135387718987176464664616133, +1.94805399084656367937490446962073346), (+1.02542655454675841075558917907628687, +1.39001030781984488966136025832798783), (+1.48521747858131561777442038914418164, +1.16262198622034623880639152899937166), (+1.48699692637968745339203666259326942, +1.28169102749850034670383772894440838), (+1.83029670956955764818629420884240230, +1.41413363441978259847846657238882998), (+1.81414961619105219872731929863675602, +1.94415739782160531661711562319308585), (+1.11945576937972748264951640064076787, +1.73024606280092619134389223553164378), (+1.94507572809505970309803877702349293, +1.69106849600382252675585088095896949)
330det = getMatDet(mat)
331det
332-2.14177964864417656767470995705969837
333det * getMatDet(getMatInv(mat)) ! must be one.
334(+0.975197992696582001322687464871253796, +0.155521277441831729994711215952724046)
335
336
Test:
test_pm_matrixDet
Bug:

Status: Unresolved
Source: GNU Fortran Compiler gfortran version 11.2
Description: The GNU Fortran Compiler gfortran version 11.2 cannot compile the following code,
interface
function test(mat) result(res)
real, value :: mat(:,:)
real :: res
end function
end interface
end

yielding the following error message,

Error: VALUE attribute conflicts with DIMENSION attribute at (1)

This error appears to conform with the Fortran 2003 standard but not with the newer standards.
The Intel Classic Fortran Compiler ifort has no problem compiling this code.

Remedy (as of ParaMonte Library version 2.0.0): Avoid such interfaces until the GNU Fortran Compiler gfortran bug is resolved.

Todo:
Critical Priority: As soon as the Gfortran bug described above is resolved, the mat argument of the procedures under this generic interface can be changed to have the value attribute instead of the intent(in).
This will obviate the need for creating an additional copy of the array inside the routine, which has to be also modified subsequently.
Todo:
Low Priority: This generic interface could be extended to accept different classes of matrices , for example,
  1. posdefmat_type,
  2. upperDiag_type,
  3. lowerDiag_type,
  4. upperUnit_type,
  5. lowerUnit_type,

and other types to facilitate runtime dispatch to the appropriate routines.
However, class-specific routines were deemed unnecessary of this version of the library as the task of computing the determinant of such matrices is either trivially explained in the module documentation or already implemented by other generic interfaces of this module.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Apr 21, 2017, 1:43 PM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 216 of file pm_matrixDet.F90.


The documentation for this interface was generated from the following file: