Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,8 @@
// Gaussian Elimination. Nigel Galloway: February 2nd., 2019
let gelim augM=
let f=List.length augM
let fG n (g:bigint list) t=n|>List.map(fun n->List.map2(fun n g->g-n)(List.map(fun n->n*g.[t])n)(List.map(fun g->g*n.[t])g))
let rec fN i (g::e as l)=
match i with i when i=f->l|>List.mapi(fun n (g:bigint list)->(g.[f],g.[n]))
|_->fN (i+1) (fG e g i@[g])
fN 0 augM

View file

@ -0,0 +1,10 @@
let test=[[ -6I; -18I; 13I; 6I; -6I; -15I; -2I; -9I; -231I];
[ 2I; 20I; 9I; 2I; 16I; -12I; -18I; -5I; 647I];
[ 23I; 18I; -14I; -14I; -1I; 16I; 25I; -17I; -907I];
[ -8I; -1I; -19I; 4I; 3I; -14I; 23I; 8I; 248I];
[ 25I; 20I; -6I; 15I; 0I; -10I; 9I; 17I; 1316I];
[-13I; -1I; 3I; 5I; -2I; 17I; 14I; -12I; -1080I];
[ 19I; 24I; -21I; -5I; -19I; 0I; -24I; -17I; 1006I];
[ 20I; -3I; -14I; -16I; -23I; -25I; -15I; 20I; 1496I]]
let fN (n,g)=cN2S(π(rI2cf n g))
gelim test |> List.map fN |> List.iteri(fun i n->(printfn "x[%d]=%1.14f " (i+1) (snd (Seq.pairwise n|> Seq.find(fun (n,g)->n-g < 0.0000000000001M)))))