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

Return the determinant of the input square matrix. More...

Detailed Description

Return the determinant of the input 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., setMatDetSqrt).

Parameters
[in,out]mat: The input/output contiguous square matrix of shape (1:ndim, 1:ndim) of,
  1. type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128),
  2. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
On input, it represents the general matrix whose determinant must be computed.
On output, it is completely overwritten by its LUP factorization.
[out]det: The output scalar of the same type and kind as the input mat representing its determinant.
[out]info: The output scalar of type integer of default kind IK that is non-zero if and only if the Pivoted LU-factorization of the input mat fails.
See the corresponding info argument of setMatLUP for possible meanings of the output non-zero error code.


Possible calling interfaces

call setMatDet(mat, det, info)
Return the determinant of the input 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 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.
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_matrixDet, only: setMatDet
6 use pm_matrixInv, only: getMatInv
7 use pm_distUnif, only: getUnifRand
8 use pm_io, only: display_type
9
10 implicit none
11
12 integer(IK) :: info, ndim, itry, ntry = 10
13 type(display_type) :: disp
14
15 disp = display_type(file = "main.out.F90")
16
17 call disp%skip()
18 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
19 call disp%show("! Compute the determinant of the square matrix.")
20 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
21 call disp%skip()
22
23 block
24 use pm_kind, only: TKG => RKH
25 real(TKG), allocatable :: mat(:,:), lup(:,:)
26 real(TKG) :: det
27 do itry = 1, ntry
28 call disp%skip()
29 call disp%show("ndim = getUnifRand(1, 9)")
30 ndim = getUnifRand(1, 9)
31 call disp%show("mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)")
32 mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
33 call disp%show("lup = mat")
34 lup = mat
35 call disp%show("lup ! matrix.")
36 call disp%show( lup )
37 call disp%show("call setMatDet(lup, det, info)")
38 call setMatDet(lup, det, info)
39 call disp%show("lup ! lup factorization.")
40 call disp%show( lup )
41 call disp%show("if (info /= 0) error stop 'determinant computation failed.'")
42 if (info /= 0) error stop 'determinant computation failed.'
43 call disp%show("det * getMatDet(getMatInv(mat)) ! must be one.")
44 call disp%show( det * getMatDet(getMatInv(mat)) )
45 call disp%skip()
46 end do
47 end block
48
49 block
50 use pm_kind, only: TKG => CKH
51 complex(TKG), allocatable :: mat(:,:), lup(:,:)
52 complex(TKG) :: det
53 do itry = 1, ntry
54 call disp%skip()
55 call disp%show("ndim = getUnifRand(1, 9)")
56 ndim = getUnifRand(1, 9)
57 call disp%show("mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)")
58 mat = getUnifRand((1._TKG, 1._TKG), (2._TKG, 2._TKG), ndim, ndim)
59 call disp%show("lup = mat")
60 lup = mat
61 call disp%show("lup ! matrix.")
62 call disp%show( lup )
63 call disp%show("call setMatDet(lup, det, info)")
64 call setMatDet(lup, det, info)
65 call disp%show("if (info /= 0) error stop 'determinant computation failed.'")
66 if (info /= 0) error stop 'determinant computation failed.'
67 call disp%show("lup ! lup factorization.")
68 call disp%show( lup )
69 call disp%show("det * getMatDet(getMatInv(mat)) ! must be one.")
70 call disp%show( det * getMatDet(getMatInv(mat)) )
71 call disp%skip()
72 end do
73 end block
74
75end 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 determinant of the input general square matrix.
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)
8mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
9lup = mat
10lup ! matrix.
11+1.82299531713424301723195946926271165, +1.25321359533214518020879419361294697, +1.74664806330286039405155787971819054, +1.85092089587151419375318511960539098, +1.97304504441604288044541025634464131, +1.70438743841965354746378087194404323
12+1.48015964585839319113065472979799770, +1.46197525775722790645881584724207164, +1.56099240257506532728168600404322505, +1.48115057841515096641031197402216012, +1.17962357142164361124198693664341453, +1.92213944162410819368237235081887701
13+1.07631084888959809475495463388513969, +1.61365710012812191644911208377303408, +1.48091409853663104545557821040536327, +1.66377190811311366808857287098573701, +1.70681083994788720469562424423524551, +1.49791008614169995714566060753543323
14+1.04006373907321772291959637574092673, +1.69733234688794108808706195534382468, +1.99931443588935724203245963724172312, +1.27250972935002679402220929662395781, +1.83585430447435341686522542846878832, +1.30062658669927680093125137971344807
15+1.89420948049867318591824543988521537, +1.59462898995340308055620845753323980, +1.51401227646931917189833312898835209, +1.61481228712768320332372224433214529, +1.62659792230123095434726153415496181, +1.77231928738111713447585078846198602
16+1.22810230777795443966271817221461107, +1.53401800297850415453661149311295577, +1.01101593950302453786429807725762819, +1.57725887708295201962658801193797264, +1.25213605711632087831373301802872628, +1.95235242703978976324172116277985774
17call setMatDet(lup, det, info)
18lup ! lup factorization.
19+1.82299531713424301723195946926271165, +1.25321359533214518020879419361294697, +1.74664806330286039405155787971819054, +1.85092089587151419375318511960539098, +1.97304504441604288044541025634464131, +1.70438743841965354746378087194404323
20+0.570524635635489553167471989818848892, +0.982343117037627107660404422662379668, +1.00280868599005932397107332462233132, +0.216513759642817258668128570323404964, +0.710183499416482250699513088828845435, +0.328231564413198572272464807000578518
21+0.673672771528857731117072216420348890, +0.702160085341172389822588551529444223, -0.869785534723374167849595607762751414, +0.178316547332174114494567592106196488, -0.575713172864882560653051229255864939, +0.573681914360613391559988865454415059
22+1.03906436988350532872315597191074424, +0.297716134126446184414906573608130842, +0.689158182294596452146552556745644783, -0.495761614383796470985426297345177497, -0.238198525758746515222408162129994213, -0.491726390129179680470265582132437807
23+0.811938260041836492165037901189338101, +0.452431725732189426800209488065132040, +0.357421960724015212783353789806465495, +0.369885146067096459889167802267654511, -0.449798107599959423469167894343281001, +0.366615470284552893485310905985949171
24+0.590407906577381490869952736106014408, +0.889454885629629506857957517356899373, +0.508486052589729615858502966436189544, -0.580365380878054955440381621098431705, -0.143916130182513637334634272168991587, -0.324649247979674166368304098313860357
25if (info /= 0) error stop 'determinant computation failed.'
26det * getMatDet(getMatInv(mat)) ! must be one.
27+0.999999999999999999999999999999999326
28
29
30ndim = getUnifRand(1, 9)
31mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
32lup = mat
33lup ! matrix.
34+1.62631656185463933066161956323415397
35call setMatDet(lup, det, info)
36lup ! lup factorization.
37+1.62631656185463933066161956323415397
38if (info /= 0) error stop 'determinant computation failed.'
39det * getMatDet(getMatInv(mat)) ! must be one.
40+0.999999999999999999999999999999999904
41
42
43ndim = getUnifRand(1, 9)
44mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
45lup = mat
46lup ! matrix.
47+1.51318039756212837586956702395873538, +1.74513282977157416700079251410662266, +1.53615707394468235760579128354080123, +1.95473560182083794176431966242454527, +1.72190348750911580572487990258278686, +1.75421920595746935034736186940510874
48+1.89634008235264062135726610750347931, +1.18518997693450672469928891318366263, +1.43714833498189294670786868823086041, +1.70619102570533003350540483943103273, +1.03763293661867942670326427330398514, +1.56386102758758330346676272850139627
49+1.08122593012998118138358916657312243, +1.27869373448045005982224949911330038, +1.85749796487349780236067328170223909, +1.44460918529443934385383824947716149, +1.19686086539618223142892371922438984, +1.08972449845231813863284326438465728
50+1.61766922404171618973454146585830296, +1.57952979445034803006790531112219261, +1.59017650012281248610547541478988297, +1.36618766820308461056275923330757890, +1.22022302826642786149103555342142506, +1.57271088713410074295177914458655651
51+1.72067751829694784293047386239940264, +1.11022864382393229817506041452677824, +1.23075739794156790742172125916934900, +1.31241124421393341579103376233955941, +1.37252664412972992312654458865447501, +1.22626399532836499035755160055158218
52+1.80026067332114664321179221647907138, +1.80225351572383128355251683583898218, +1.86257048339382051318146276810726140, +1.64473783202437876938474666623749599, +1.06253395805359937929824195441991021, +1.11712296179557481730201218699720991
53call setMatDet(lup, det, info)
54lup ! lup factorization.
55+1.89634008235264062135726610750347931, +1.18518997693450672469928891318366263, +1.43714833498189294670786868823086041, +1.70619102570533003350540483943103273, +1.03763293661867942670326427330398514, +1.56386102758758330346676272850139627
56+0.797947800420293793968697464257914873, +0.799413094596505789962312395039103824, +0.389387721168193314739393900326859104, +0.593284225762424893825719002452031748, +0.893926568090590434603403157448084287, +0.506339738830936861504754938882037491
57+0.570164571319184927019695050491192592, +0.754228825403616043891593754261237296, +0.744399456973189228508766287225750984, +0.243274458072319259389601624457347064E-1, -0.689858585457257296212115782597038259E-1, -0.183829680418567553428498984358397584
58+0.949334294030058268783284045968642215, +0.847011426577862732403505311516084444, +0.226250076637015816798903996604699490, -0.483030425751455081139415933140498818, -0.664084535205054022739970072155803630, -0.754788008027800290554107293524850036
59+0.907367583646830903421158759882518426, +0.435640578392120580474603501854726161E-1, -0.121208744142217249382181806706927404, +0.535428700561860516807200934020041952, +0.739277315471535839121944665862482662, +0.167062377536447639853853128560609360
60+0.853048057727494045875421704897173926, +0.711153958361440283265418485533380220, +0.117282843554317231035312209125005965, +1.06420809660646122234582639779591548, +0.560233403422059545513188291531534907, +0.609794418112264825301125881695208450
61if (info /= 0) error stop 'determinant computation failed.'
62det * getMatDet(getMatInv(mat)) ! must be one.
63+0.999999999999999999999999999999999904
64
65
66ndim = getUnifRand(1, 9)
67mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
68lup = mat
69lup ! matrix.
70+1.98395374918827855182464581644920442, +1.78192902656938163062153436785297200, +1.89445515180564721262672592485973631, +1.80516557169643592044290313752871430, +1.04511660584533490670956244913858339, +1.87365022559349701861348469715117995, +1.50556466700572241738392655506373046, +1.66393342227335409633793837456232874, +1.82625838015754998221396387553567467
71+1.13342951105956080957578821271399431, +1.73230684218117623305013389446047569, +1.69995460232573061262725805474288727, +1.70513824139563447313214153340494057, +1.48375800782859402617704765455420771, +1.91618014130210247321350638238086225, +1.42291098309360332999796573581561813, +1.25432647881096362264181509121791361, +1.84332120167376244639875323207641962
72+1.31934468525570130813787191921043055, +1.84548766185368138288986550884098462, +1.20195046930140760965438964183788555, +1.90339304807960555407772114802550629, +1.18521333611828462761892461878630273, +1.96893843916773816062697066106895653, +1.71279306143197737510627909069839707, +1.37958021801340597290192357746018233, +1.64782878388633557344611115543765789
73+1.18229291136425642807006827026830530, +1.35820703816733492830498373047208378, +1.63563688087603904505856441219347877, +1.66602326883513994631127593458302650, +1.03910734964381141970522844063318084, +1.43613089411668580820922775244257454, +1.28779506352458044124861561482137339, +1.82678761506776166792583453211508250, +1.54146657886741755811794848046558066
74+1.17525148922328162032111956964983702, +1.26172930220332678488080662540217570, +1.70546786431856489678890992380767515, +1.54934529769978696818583683412719862, +1.91520739174960620435913734405836409, +1.53297403101085392334584185691210107, +1.45881951661131585224544301848138501, +1.90568973324901644481945813583919707, +1.05860980991883279078663933537557322
75+1.41576532890606520050313658463626765, +1.91149671476474451388516203282973095, +1.32508234392554486568473796133269171, +1.25175263207236994249045384413931760, +1.59072527156836568044511840117296602, +1.93006031967469479075209373026300315, +1.30192769002430161559575098953919705, +1.58951597347209032832849586404166839, +1.70966377218886461840098586984425698
76+1.08347204288852898252419997805990403, +1.02846367034785273976508304726700924, +1.31039205338259909019650157940044654, +1.85043881376347159195521846090504521, +1.83113604388642059308484470834065408, +1.09602038878795888340627961659701724, +1.34910375701719708583440312034571009, +1.03158747146219933296977182476000902, +1.37371762327489445995161137119149255
77+1.39188175863405669519120644982169225, +1.35323336303486563832599702010738488, +1.67854186775877959555781992473678177, +1.41939529831844675039312093500532572, +1.47420199032463429353082302323002662, +1.92463579418729648080943668590360603, +1.30317006312996096554022895609918545, +1.13033788357099476196906629793751263, +1.79447619929433596153652747455895137
78+1.46032252806053936897855318645411950, +1.54687249563548640147644969871492047, +1.38842356522673296373545461509015639, +1.97729888788716093347857184965413443, +1.63535467412029463360143415775576236, +1.71864860205814397656161536456926742, +1.44904764883550334063558125087161144, +1.03375890437648955846040196981456524, +1.96340873227005400567050505518822309
79call setMatDet(lup, det, info)
80lup ! lup factorization.
81+1.98395374918827855182464581644920442, +1.78192902656938163062153436785297200, +1.89445515180564721262672592485973631, +1.80516557169643592044290313752871430, +1.04511660584533490670956244913858339, +1.87365022559349701861348469715117995, +1.50556466700572241738392655506373046, +1.66393342227335409633793837456232874, +1.82625838015754998221396387553567467
82+0.571298353867017281384165047298323663, +0.714293722594232007011880075766065181, +0.617655492624274028531810790353296064, +0.673850121828047469392535994031048659, +0.886684611310069862910997730344138719, +0.845766851697972054110310907412178873, +0.562784367192890086835992742962847688, +0.303724053721883879434454197188922118, +0.799982795353908685175488402188457259
83+0.665007783470508014203675386445292791, +0.924677018291845270997554419672707645, -0.629008791336545159314337389824070860, +0.798501710209306709977112543123915489E-1, -0.329694223954601303297445903539776230, -0.591147149513726895711572250188227983E-1, +0.191187068757803827826450178949803071, -0.779511135415788070336033495323591589E-2, -0.306372959439304868164250145016191558
84+0.546117591366141647536874677007152205, +0.774483669987321002200505272507876240E-1, -0.362412040651122383134715503746426447, +0.841356211620087571241257891662842554, +1.07222204872226343047548861297339576, -0.141401054794927906737985158605020947E-1, +0.552590172949182822323116868990959661, +0.965361845046959472904336909075802592E-1, +0.203375184933058669408660457394036587
85+0.713608031177801470926600427936292280, +0.895846946676161424333613511811732739, +0.922309611987511070029139281632200424, -0.848322223152051753211034550665070317, +1.26425791026779477272636819810101731, -0.122142476526877255658972432817877058, +0.158168480098474006745722167187305519E-1, +0.219112750615897775329100756615180543, +0.144867394851717618520674520961784654
86+0.701569660685656526095358529939525312, +0.144318810648742449276609783306127636, -0.413842075375418508404899559729706368, +0.105474960347318749516459917455437612, +0.287505180987803085100112507946497657, +0.500223440615092695270221457888111524, +0.181980601023271339835307427453634013, -0.157264563411263037226116143429984150, +0.207885024122146038879019255040913007
87+0.592378471375216247341306568490277520, +0.288610837284564009726574293987248603, -0.643824623917942540903322362154330677, +0.400464309370857938885130777025314635, +0.315239557590649072366832281982256245, +0.369982129896483220278394146334739356, +0.234012387317940540226780219258733300, +0.777787433113013787458207338675788414, -0.655386677863096924378446574451568092
88+0.595927658015205087135684366403018862, +0.414824094405280826990865476490088377, -0.398182477117941272888109419885519720, +0.407129400100364499365536517419510079, -0.410783480632200310584733262135445618, -0.198369887635598700734557565624086896, +0.217421517356493878290873775425647936, +0.556508637158807486754927006445150037, +0.159746627398170499275838104969557612
89+0.736066820437734798211954117899877325, +0.329351435356928207666200441272873424, +0.332980620877472284274892472254714938, +0.475487475193578223892928889545846526, +0.137631569326386757736468236543595695, +0.208267868150432915725217766929149841, -0.901624459135585263655080307074197212, +0.664002523629486548511766509557453700, -0.399219964146273286926098612149499947
90if (info /= 0) error stop 'determinant computation failed.'
91det * getMatDet(getMatInv(mat)) ! must be one.
92+1.00000000000000000000000000000000366
93
94
95ndim = getUnifRand(1, 9)
96mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
97lup = mat
98lup ! matrix.
99+1.93755934933566481263238822502608758, +1.27416225603746712925406382741112088, +1.05031099801386669276982404233280809, +1.15508509225545970677727102806190888, +1.14086933967119172129708079401574946
100+1.12200594368181933792159252183346492, +1.01940472282080860472359636388500901, +1.38552118396591161709056920206232268, +1.27890867829765404579766129037221745, +1.03870202186504269240607488223777080
101+1.64292687937941293106294281381441014, +1.68042886743488005019723482641557024, +1.41451249110768093412212693735737965, +1.32305599663651070575088541812403793, +1.04635841066255455666243717365317293
102+1.45222938104091209860580316486098689, +1.48417047566369466856882768118448090, +1.62152550749755129279699265905887304, +1.87810140252261207933289473679854967, +1.19203814790606603342269627393302880
103+1.16287961890121512039739698409883501, +1.53751046311629783701781486158450105, +1.37543337364993062467167473941740139, +1.47393007245150931177096151795105940, +1.66320706606108463366752748420706731
104call setMatDet(lup, det, info)
105lup ! lup factorization.
106+1.64292687937941293106294281381441014, +1.68042886743488005019723482641557024, +1.41451249110768093412212693735737965, +1.32305599663651070575088541812403793, +1.04635841066255455666243717365317293
107+1.17933389102961427922135606500060158, -0.707624458792997839155160111613140698, -0.617871522034147331128697389048651615, -0.405239684307940726208959907606975550, -0.931365961870417821503864573899590039E-1
108+0.682931150353835332468047449241118137, +0.181187203340851206609258473312768010, +0.531456954325196084578140181999033473, +0.448776769614626905322080687425224488, +0.340986428180669757511130085809073054
109+0.883928188934048301971433754534761378, +0.170707745542492777612549339581785075E-2, +0.700438284839873547090916343456858737, +0.394966256301646121761227700560694623, +0.284514954682878744164300383458320556E-1
110+0.707809722694702445655800348877302418, -0.491908622043360769879676340607602278, +0.132261606504725181533390368185751552, +0.705785212530467367924388869899359686, +0.811589657315196994573429844678509906
111if (info /= 0) error stop 'determinant computation failed.'
112det * getMatDet(getMatInv(mat)) ! must be one.
113+0.999999999999999999999999999999999904
114
115
116ndim = getUnifRand(1, 9)
117mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
118lup = mat
119lup ! matrix.
120+1.72543272247840724185606142331070522, +1.33014233702538371994126579747476886, +1.90370061916907070739700700475549019, +1.95299307819193901064642041236042684, +1.89320892015875130455598083340616555, +1.12794764138830721690945351309266056, +1.20681419904448926795765070714973447, +1.52061049100857373735999228080333079, +1.45226101868879497802899861270437719
121+1.38635607790316270119448437737040803, +1.43273866421094246646540335605229413, +1.71375870761284069183666419924868212, +1.20887449565705608288659681010331187, +1.99326806164139588779531860389824172, +1.51668569628010628256964106309156473, +1.12124299058869072405660158714907940, +1.14555853751496088142454734765836528, +1.85649890190986044938734141525767749
122+1.74264852198232103698330271574042538, +1.47630943160113971959125776798665167, +1.71735423711963773360239293151388767, +1.17471765819244638398963513644805284, +1.36577747785702277644670048404696767, +1.97895128778003789838509252796316139, +1.98903511283841769100354761806494706, +1.04718199806401412854451015259586519, +1.79471644922683385604397533909029572
123+1.51779032007495523387337350772761769, +1.59351145203099994551042805033662579, +1.98054883630539739981480017333171933, +1.99534174686392756456794396296075222, +1.93790474199332686123708248678281578, +1.39079903288642281329544707925466928, +1.72275912860859334087023616905368782, +1.35884589803162758396514251850033700, +1.74192769955316806277921503745921135
124+1.25115259903233012039999427703326490, +1.49993061743725788664763180830400525, +1.62141221418462863674684803245484006, +1.01886593667716158819777847267380688, +1.51465794522609603157856446020128326, +1.04309916688720849579184227656247608, +1.94679886933130496116027611455245936, +1.50570661978237680314302251713517429, +1.71241844501255340403577068550233607
125+1.57900397819295475588154240927061390, +1.38391818236994934936140420440773022, +1.34800455119030354555566170235260892, +1.19684430452455470110590496426144706, +1.79420761291311257394885621315837322, +1.86723053334313237572170300695399088, +1.80816111217142134110173573977396893, +1.89130664821665827501413024941917225, +1.08911609444397686970049145526110363
126+1.14455364270406910395826572312141949, +1.73053838709859284563041644932317488, +1.12127424111227944222635371505927466, +1.01354420695136400304098368070634050, +1.94969222007908915488758162886535517, +1.83562929791107621920340503401956257, +1.99813114175103854163584082663818097, +1.62192483230461399550837066318037761, +1.99209069201097629395918037222242448
127+1.30074700738059272072831897900313641, +1.51092229529929978510958294398876521, +1.44833646223779747418938143517288282, +1.95306327517861359737174500702041617, +1.46056083479311375857903463184506916, +1.24069837851146310211806232922973422, +1.06536078537440332391722875430722674, +1.06935237039725652626693869846554495, +1.04929751109351271279326504297234855
128+1.81592298262962610457858761464329227, +1.57105193398365582619663401170251117, +1.12997493915204996608650272440140545, +1.22823190023788015371860005446189517, +1.54112836483491172531382497839661653, +1.19535218222175590551601048401291932, +1.38438742090973349067766492419845205, +1.97895882065483507853073795743945413, +1.49085032447912368153283350315484237
129call setMatDet(lup, det, info)
130lup ! lup factorization.
131+1.72543272247840724185606142331070522, +1.33014233702538371994126579747476886, +1.90370061916907070739700700475549019, +1.95299307819193901064642041236042684, +1.89320892015875130455598083340616555, +1.12794764138830721690945351309266056, +1.20681419904448926795765070714973447, +1.52061049100857373735999228080333079, +1.45226101868879497802899861270437719
132+0.663342956113661225626902570476916647, +0.848197837204240953525763428959596922, -0.141532155162739130192837847317886766, -0.281959994805995542561081260365076548, +0.693845418440230629021532629110836152, +1.08741317513112465473938598160011795, +1.19759944347692667415119132057753428, +0.613238574101540819114865145496507815, +1.02874357482531402184112688215514866
133+1.05244496581775664926587488924674824, +0.201781141206816045789237302827689857, -0.845006674130387160121091305691779805, -0.770291623655528731869574421206311226, -0.591374752781427811220484158846374739, -0.211170106104665969028838458357301059, -0.127371089965449438900854302279900651, +0.254859985108945003489090695503249334, -0.245155526230697016800324122543850569
134+1.00997767069073841594383363249586112, +0.156679687846347478446170790382184515, +0.216762389739273194893558442474207470, -0.586614084683904927388339531161267057, -0.526844936386300520231317816361532630, +0.715147536270756127962332867290569108, +0.610149474006637713872654440427957585, -0.639926731459424348865692252635349721, +0.219922523882554921919776990781794960
135+0.753867125872171345266661288155153581, +0.599119323812559987328638007334533039, -0.115968074623101689104734895311629906, -0.955252279209232988010727083717624676, -0.954213748182506786758912294065738340, +0.397542809144930248455986063106828888, +0.615396054202952077609052394165659488E-2, -1.02612481686391496982312615215158326, -0.480203206179388390402615836683788476
136+0.725123954549313090690473968107972651, +0.631235452880578751430289715148315802, -0.390924021204974203512851685606083894, +0.887190565282129770439739275168568076, +0.627781356825014882471111283943461692E-1, -1.20319704584604970322526750230981984, -0.275755851753773220934996603942210965, +0.747763649992166463511682184838135075, -0.250834334633382459570281987960213155
137+0.803483126199093003471908520033781054, +0.429135426904386873732763143630701762, -0.289824745886441740830672235809142965, +0.788547448270761090996164341612088827, -0.438476372454718813968065705720519486, +0.255208136819843928878826364499157334, -0.807317804374205655436166823051620276, -0.401678264510006813479030100757766762, -0.142852914412853873731933591981051230
138+0.915135060105315144157082700581601029, +0.196485168338704626031127674674090519, +0.433522800751859344110214289850451789, +0.342760597801119040802819480421842578, -0.379675460851940911279630121428546663, -0.514217891548307478405969850366276261, -0.216858326079792962437507651336520695, +0.395916203823309026796629568744970175, -0.753415720250930876852238010375767861
139+0.879657781089722825509864269987290982, +0.499224799612157563010458277517194871, -0.445677113704886382473911096997422829, -0.127573247107023869477218199244240832, +0.424044999142370831419427772963541974, +0.262408008939881244408742850338548510, -0.190913222479347145977139381381594703, -0.229212367687554193538057389853150783, -0.608592924052657890466492363987659499E-1
140if (info /= 0) error stop 'determinant computation failed.'
141det * getMatDet(getMatInv(mat)) ! must be one.
142+1.00000000000000000000000000000001156
143
144
145ndim = getUnifRand(1, 9)
146mat = getUnifRand(1._TKG, 2._TKG, ndim, ndim)
147lup = mat
148lup ! matrix.
149+1.60476827967593728145552944005214016, +1.06048748730125780058570628390591285, +1.73526368579969704001374553245755158, +1.41501916278473860906018342991685116, +1.52221734235347425547528984556700080
150+1.73280435069198637359375316314701136, +1.20971561852932800218682327647118343, +1.73741340286653573780055077269114270, +1.83949054483122083944163407929806484, +1.64103149378193932241137585013182985
151+1.62344567062704541899429925616919459, +1.82303888151305134171404463109459155, +1.98691450514829363538511730278490570, +1.63742698775732615776526141565814068, +1.25074832934503461208574280689502239
152+1.80879632875357253819146277542661359, +1.58893323528745059045118278353184767, +1.26998143450183585095770438187528197, +1.29132651878870021014696402255538274, +1.13089635355546001323812163189145539
153+1.79415169419286167309306701263448971, +1.74881519936513332193583480971090492, +1.59134226131378125238795397372853783, +1.60776603479187140348328519932346378, +1.83138597701722818997464666353072502
154call setMatDet(lup, det, info)
155lup ! lup factorization.
156+1.80879632875357253819146277542661359, +1.58893323528745059045118278353184767, +1.26998143450183585095770438187528197, +1.29132651878870021014696402255538274, +1.13089635355546001323812163189145539
157+0.897528176511586125313113792219567999, +0.396926532246850780354334510766206055, +0.847070384036292554127256824390330230, +0.478425052067849598480057126968991019, +0.235736987314800587917028638323370313
158+0.887202309163116559273639139106658836, -0.879804497257969990109490143235348858, +1.35378955788454694528841124578519455, +0.690271805842007692677866709341009847, +0.726285947664528430279871979201385755
159+0.957987542956839344762294740714220037, -0.78720519310570065876146700943911326