line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#---------------------------------------------------------------------------# |
2
|
|
|
|
|
|
|
# Math::NumberCruncher |
3
|
|
|
|
|
|
|
# Date Written: 30-Aug-2000 02:41:52 PM |
4
|
|
|
|
|
|
|
# Last Modified: 05-Mar-2002 12:29:30 PM |
5
|
|
|
|
|
|
|
# Author: Kurt Kincaid |
6
|
|
|
|
|
|
|
# Copyright (c) 2002, Kurt Kincaid |
7
|
|
|
|
|
|
|
# All Rights Reserved |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# NOTICE: Several of the algorithms contained herein are adapted from |
10
|
|
|
|
|
|
|
# _Master Algorithms with Perl_, by John Orway, Jarkko Hietaniemi, |
11
|
|
|
|
|
|
|
# and John Macdonald. Copyright (c) 1999 O'Reilly & Associates, Inc. |
12
|
|
|
|
|
|
|
#---------------------------------------------------------------------------# |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
package Math::NumberCruncher; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
1511
|
use Exporter; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
51
|
|
17
|
1
|
|
|
1
|
|
6
|
use constant epsilon => 1E-10; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
79
|
|
18
|
1
|
|
|
1
|
|
1631
|
use Math::BigFloat; |
|
1
|
|
|
|
|
46188
|
|
|
1
|
|
|
|
|
5
|
|
19
|
1
|
|
|
1
|
|
130400
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
20
|
1
|
|
|
1
|
|
5
|
no strict 'refs'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
21
|
1
|
|
|
1
|
|
5
|
use vars qw( $PI $_e_ $_g_ $_ln2_ $max_ln2p $VERSION @ISA @EXPORT_OK @array $DECIMALS ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3843
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
@ISA = qw( Exporter ); |
24
|
|
|
|
|
|
|
@EXPORT_OK = qw( $PI $_e_ $_g_ $_ln2_ $VERSION log exp sqrt sin cos tan asin acos atan |
25
|
|
|
|
|
|
|
sec asec csc acsc exsec cot acot vers covers hav ); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
$VERSION = '5.00'; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$PI = new Math::BigFloat "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642019893809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913151557485724245415069595082953311686172785588907509838175463746493931925506040092770167113900984882401285836160356370766010471018194295559619894676783744944825537977472684710404753464620804668425906949129331367702898915210475216205696602405803815019351125338243003558764024749647326391419927260426992279678235478163600934172164121992458631503028618297455570674983850549458858692699569092721079750930295532116534498720275596023648066549911988183479775356636980742654252786255181841757467289097777279380008164706001614524919217321721477235014144197356854816136115735255213347574184946843852332390739414333454776241686251898356948556209921922218427255025425688767179049460165346680498862723279178608578438382796797668145410095388378636095068006422512520511739298489608412848862694560424196528502221066118630674427862203919494504712371378696095636437191728746776465757396241389086583264599581339047802759010"; |
30
|
|
|
|
|
|
|
$_e_ = new Math::BigFloat "2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901157383418793070215408914993488416750924476146066808226480016847741185374234544243710753907774499206955170276183860626133138458300075204493382656029760673711320070932870912744374704723069697720931014169283681902551510865746377211125238978442505695369677078544996996794686445490598793163688923009879312773617821542499922957635148220826989519366803318252886939849646510582093923982948879332036250944311730123819706841614039701983767932068328237646480429531180232878250981945581530175671736133206981125099618188159304169035159888851934580727386673858942287922849989208680582574927961048419844436346324496848756023362482704197862320900216099023530436994184914631409343173814364054625315209618369088870701676839642437814059271456354906130310720851038375051011574770417189861068739696552126715468895703503540212340784981933432106817012100562788023519303322474501585390473041995777709350366041699732972508868769664035557071622684471625607988265178713419512466520103059212366771943252786753985589448969709640975459185695638023637016211204774272283648961342251644507818244235294863637214174023889344124796357437026375529444833799801612549227850925778256209262264832627793338656648162772516401910590049164499828931505660472580277863186415519565324425869829469593080191529872117255634754639644791014590409058629849679128740687050489585867174798546677575732056812884592054133405392200011378630094556068816674001698420558040336379537645203040243225661352783695117788386387443966253224985065499588623428189970773327617178392803494650143455889707194258639877275471096295374152111513683506275260232648472870392076431005958411661205452970302364725492966693811513732275364509888903136020572481765851180630364428123149655070475102544650117272115551948668508003685322818315219600373562527944951582841882947876108526398140"; |
31
|
|
|
|
|
|
|
$_g_ = new Math::BigFloat "0.00000000006669531020394004460639036467721593281909711076035470516023410031617030523217887622766564072454302758797214777667825510044012806167171589236837418491695566945822976915357714542230787643797974413526391669997203504054665363724804035965562393645452314150103566079451722764077047780001159557565199157185300966536171598445697039986219614596562560614935883348444842355101781772391448082340919856836998916369518450095951586361599964956411488706712604230707700620231121148199618806694838144697445182374920538586757611082831191857644364217425269590709091396932217720806802248240057817186618417067158155776005255385640775647609250065179135759758507992396189592951980930481320790197399583643553004903638633848904759811394264488026638941042690422162661308367314767966094096732717350331446880659438788763653406174670608730191298841608778254576287486351270250356086586595348083207809542368578263528058113197006120223057460158115004058058346496610022508819904746818401803900084431805495574335423790092057583635142325381072166000392370432529697677943460796262298563755625126232411945538023315664461708646092717341756169185017815867224033437415993177148818991850540373256917580190547317016589079397744669794652571463427871642423999556656701735345089266437031981668333956202291758540353169755113915130162328378846078887754831021679812746264691773036658772927439184228333138447072436567005623282181435417359056639649685854700412554430269668778036840378088488720772714596464415222031008159188450589565739528427684396648817792962196229592100478823034546848482943080104006068776749469639024860584681362418381956826662905081375412550624813087051653933950489372422355734643741215840152422521918411076724517555944789360271997804891709581434658817443482396685154295502152134723282022085702770531064885514782676317483270433573003347808486077588831679942771722544158074564773981752974124512527118869659515788858519390280993535928473379654840896217869772206580519338744773792031249984043415900549966019072266610615037719"; |
32
|
|
|
|
|
|
|
$max_ln2p = new Math::BigFloat "0.69314718055994530941723212145817656807550013436025525412068000949339362196969471560586332699641868754200148102057068573368552023575813055703267075163507596193072757082837143519030703862389167347112335011536449795523912047517268157493206515552473413952588295045300709532636664265410423915781495204374043038550080194417064167151864471283996817178454695702627163106454615025720740248163777338963855069526066834113727387372292895649354702576265209885969320196505855476470330679365443254763274495125040606943814710468994650622016772042452452961268794654619316517468139267250410380254625965686914419287160829380317271436778265487756648508567407764845146443994046142260319309673540257444607030809608504748663852313818167675143866747664789088143714198549423151997354880375165861275352916610007105355824987941472950929311389715599820565439287170007218085761025236889213244971389320378439353088774825970171559107088236836275898425891853530243634214367061189236789192372314672321720534016492568727477823445353476481149418642386776774406069562657379600867076257199184734022651462837904883062033061144630073719489002743643965002580936519443041191150608094879306786515887090060520346842973619384128965255653968602219412292420757432175748909770675268711581705113700915894266547859596489065305846025866838294002283300538207400567705304678700184162404418833232798386349001563121889560650553151272199398332030751408426091479001265168243443893572472788205486271552741877243002489794540196187233980860831664811490930667519339312890431641370681397776498176974868903887789991296503619270710889264105230924783917373501229842420499568935992206602204654941510613918788574424557751020683703086661948089641218680779020818158858000168811597305618667619918739520076671921459223672060253959543654165531129517598994005600036651356756905124592682574394648316833262490180382424082423145230614096380570070255138770268178516306902551370323405380214501901537402950994226299577964742713815736380172987394070424217997226696297993931270694"; |
33
|
|
|
|
|
|
|
$_ln2_ = $max_ln2p->copy(); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $max_piconst = $PI->copy(); |
36
|
|
|
|
|
|
|
my $max_econst = $_e_->copy(); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$DECIMALS = 20; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub new { |
41
|
1
|
|
|
1
|
0
|
3000646
|
my $class = shift; |
42
|
1
|
|
|
|
|
6
|
my $self = bless {}, $class; |
43
|
1
|
|
|
|
|
6
|
return $self; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub Range { |
47
|
1
|
50
|
|
1
|
1
|
20
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
48
|
1
|
|
|
|
|
3
|
my $arrayref = shift; |
49
|
1
|
50
|
33
|
|
|
12
|
return ( undef, undef ) unless defined $arrayref && @$arrayref > 0; |
50
|
1
|
|
|
|
|
2
|
my ( $zzz, $hi, $lo ); |
51
|
1
|
|
|
|
|
2
|
$hi = $lo = $$arrayref[ 0 ]; |
52
|
1
|
|
|
|
|
3
|
foreach $zzz ( @$arrayref ) { |
53
|
300
|
100
|
|
|
|
505
|
if ( $zzz > $hi ) { |
54
|
299
|
|
|
|
|
295
|
$hi = $zzz; |
55
|
|
|
|
|
|
|
} |
56
|
300
|
50
|
|
|
|
479
|
if ( $zzz < $lo ) { |
57
|
0
|
|
|
|
|
0
|
$lo = $zzz; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
} |
60
|
1
|
50
|
|
|
|
6
|
if ( $lo eq "" ) { $lo = "0" } |
|
0
|
|
|
|
|
0
|
|
61
|
1
|
|
|
|
|
7
|
return ( $hi, $lo ); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub Mean { |
65
|
12
|
100
|
|
12
|
1
|
145
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
66
|
12
|
|
|
|
|
19
|
my $arrayref = shift; |
67
|
12
|
50
|
33
|
|
|
94
|
return undef unless defined $arrayref && @$arrayref > 0; |
68
|
12
|
|
|
|
|
15
|
my $result; |
69
|
12
|
|
|
|
|
24
|
foreach ( @$arrayref ) { $result += $_ } |
|
2135
|
|
|
|
|
2139
|
|
70
|
12
|
|
|
|
|
52
|
return $result / @$arrayref; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub Median { # median may or may not be an element of the array |
74
|
1
|
50
|
|
1
|
1
|
56
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
75
|
1
|
|
|
|
|
3
|
my $arrayref = shift; |
76
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
77
|
1
|
50
|
33
|
|
|
9
|
return undef unless defined $arrayref && @$arrayref > 0; |
78
|
1
|
|
|
|
|
16
|
my $median = Math::BigFloat->new()->bfround( -$P ); |
79
|
1
|
|
|
|
|
291
|
my @array = sort { $a <=> $b } @$arrayref; |
|
300
|
|
|
|
|
327
|
|
80
|
1
|
50
|
|
|
|
7
|
if ( @array % 2 ) { |
81
|
1
|
|
|
|
|
5
|
$median = $array[ @array / 2 ]; |
82
|
|
|
|
|
|
|
} else { |
83
|
0
|
|
|
|
|
0
|
$median = ( $array[ @array / 2 - 1 ] + $array[ @array / 2 ] ) / 2; |
84
|
|
|
|
|
|
|
} |
85
|
1
|
|
|
|
|
17
|
return $median; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub OddMedian { # median *is* an element of the array |
89
|
2
|
100
|
|
2
|
1
|
57
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
90
|
2
|
|
|
|
|
27
|
my $arrayref = shift; |
91
|
2
|
50
|
33
|
|
|
13
|
return undef unless defined $arrayref && @$arrayref > 0; |
92
|
2
|
|
|
|
|
18
|
my @array = sort { $a <=> $b } @$arrayref; |
|
2413
|
|
|
|
|
2154
|
|
93
|
2
|
|
|
|
|
53
|
return $array[ ( @array - ( 0, 0, 1, 0 )[ @array & 3 ] ) / 2 ]; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub Mode { |
97
|
1
|
50
|
|
1
|
1
|
42
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
98
|
1
|
|
|
|
|
3
|
my $arrayref = shift; |
99
|
1
|
50
|
33
|
|
|
17
|
return undef unless defined $arrayref && @$arrayref > 0; |
100
|
1
|
|
|
|
|
3
|
my ( %count, @result ); |
101
|
1
|
|
|
|
|
3
|
foreach ( @$arrayref ) { $count{ $_ }++ } |
|
300
|
|
|
|
|
681
|
|
102
|
1
|
|
|
|
|
61
|
foreach ( sort { $count{ $b } <=> $count{ $a } } keys %count ) { |
|
299
|
|
|
|
|
331
|
|
103
|
300
|
50
|
66
|
|
|
1074
|
last if @result && $count{ $_ } != $count{ $result[ 0 ] }; |
104
|
300
|
|
|
|
|
404
|
push ( @result, $_ ); |
105
|
|
|
|
|
|
|
} |
106
|
1
|
|
|
|
|
19
|
return OddMedian \@result; |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub Covariance { |
110
|
2
|
100
|
|
2
|
1
|
118
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
111
|
2
|
|
|
|
|
3
|
my $array1ref = shift; |
112
|
2
|
|
|
|
|
3
|
my $array2ref = shift; |
113
|
2
|
50
|
33
|
|
|
25
|
unless ( defined $array1ref && defined $array2ref && @$array1ref > 0 && $array2ref > 0 ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
114
|
0
|
|
|
|
|
0
|
return undef; |
115
|
|
|
|
|
|
|
} |
116
|
2
|
|
|
|
|
4
|
my ( $i, $result ); |
117
|
2
|
|
|
|
|
9
|
for ( $i = 0 ; $i < @$array1ref ; $i++ ) { |
118
|
600
|
|
|
|
|
1180
|
$result += $array1ref->[ $i ] * $array2ref->[ $i ]; |
119
|
|
|
|
|
|
|
} |
120
|
2
|
|
|
|
|
4
|
$result /= @$array1ref; |
121
|
2
|
|
|
|
|
7
|
$result -= Mean( $array1ref ) * Mean( $array2ref ); |
122
|
2
|
|
|
|
|
44
|
return $result; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub Correlation { |
126
|
1
|
50
|
|
1
|
1
|
58
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
127
|
1
|
|
|
|
|
2
|
my $array1ref = shift; |
128
|
1
|
|
|
|
|
2
|
my $array2ref = shift; |
129
|
1
|
50
|
33
|
|
|
17
|
unless ( defined $array1ref && defined $array2ref && @$array1ref > 0 && $array2ref > 0 ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
130
|
0
|
|
|
|
|
0
|
return undef; |
131
|
|
|
|
|
|
|
} |
132
|
1
|
|
|
|
|
2
|
my ( $sum1, $sum2, $sum1_sqrd, $sum2_sqrd ); |
133
|
1
|
|
|
|
|
35
|
foreach ( @$array1ref ) { |
134
|
300
|
|
|
|
|
234
|
$sum1 += $_; |
135
|
300
|
|
|
|
|
378
|
$sum1_sqrd += $_**2; |
136
|
|
|
|
|
|
|
} |
137
|
1
|
|
|
|
|
5
|
foreach ( @$array2ref ) { |
138
|
300
|
|
|
|
|
259
|
$sum2 += $_; |
139
|
300
|
|
|
|
|
345
|
$sum2_sqrd += $_**2; |
140
|
|
|
|
|
|
|
} |
141
|
1
|
|
|
|
|
6
|
return ( @$array1ref ** 2 ) * Covariance( $array1ref, $array2ref ) / SqrRoot( |
142
|
|
|
|
|
|
|
abs( ( ( ( @$array1ref * $sum1_sqrd ) - ( $sum1 ** 2 ) ) * ( ( @$array1ref * $sum2_sqrd ) - ( $sum2 ** 2 ) ) ) ) ); |
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
sub BestFit { |
146
|
1
|
50
|
|
1
|
1
|
1506
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
147
|
1
|
|
|
|
|
3
|
my $a_ref = shift; |
148
|
1
|
|
|
|
|
2
|
my $b_ref = shift; |
149
|
1
|
|
33
|
|
|
10
|
my $P = shift || $DECIMALS; |
150
|
1
|
50
|
33
|
|
|
18
|
unless ( defined $a_ref && defined $b_ref && @$a_ref > 0 && @$b_ref > 0 ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
151
|
0
|
|
|
|
|
0
|
return ( undef, undef ); |
152
|
|
|
|
|
|
|
} |
153
|
1
|
|
|
|
|
2
|
my ( $i, $product, $sum1, $sum2, $sum1_sqrs, $a, $b ); |
154
|
1
|
|
|
|
|
5
|
$a = Math::BigFloat->new(); |
155
|
1
|
|
|
|
|
48
|
$b = $a->copy(); |
156
|
1
|
|
|
|
|
22
|
$sum1 = $a->copy(); |
157
|
1
|
|
|
|
|
18
|
$sum2 = $a->copy(); |
158
|
1
|
|
|
|
|
18
|
$sum1_sqrs = $a->copy(); |
159
|
1
|
|
|
|
|
21
|
for ( $i = 0 ; $i <= @$a_ref ; $i++ ) { |
160
|
301
|
|
|
|
|
77719
|
$product += $a_ref->[ $i ] * $b_ref->[ $i ]; |
161
|
301
|
|
|
|
|
818
|
$sum1 += $a_ref->[ $i ]; |
162
|
301
|
|
|
|
|
76160
|
$sum1_sqrs += $a_ref->[ $i ] ** 2; |
163
|
301
|
|
|
|
|
84819
|
$sum2 += $b_ref->[ $i ]; |
164
|
|
|
|
|
|
|
} |
165
|
1
|
|
|
|
|
331
|
$b = ( ( @$a_ref * $product ) - ( $sum1 * $sum2 ) ) / ( ( @$a_ref * $sum1_sqrs ) - ( $sum1 ** 2 ) ); |
166
|
1
|
|
|
|
|
2230
|
$a = ( $sum2 - $b * $sum1 ) / @$a_ref; |
167
|
1
|
|
|
|
|
1332
|
$a->bfround( -$P ); |
168
|
1
|
|
|
|
|
270
|
$b->bfround( -$P ); |
169
|
1
|
|
|
|
|
240
|
return ( $b, $a ); |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
sub Distance { # Distance( $x1, $y1, $x2, $y2 ); |
173
|
5
|
100
|
|
5
|
1
|
225
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
174
|
5
|
|
|
|
|
14
|
my @p = @_; |
175
|
5
|
|
|
|
|
10
|
my $P; |
176
|
5
|
100
|
|
|
|
20
|
if ( @p % 2 ) { |
177
|
4
|
|
|
|
|
8
|
$P = pop @p; |
178
|
|
|
|
|
|
|
} else { |
179
|
1
|
|
|
|
|
2
|
$P = $DECIMALS; |
180
|
|
|
|
|
|
|
} |
181
|
5
|
50
|
|
|
|
21
|
return undef unless @p >= 3; |
182
|
5
|
|
|
|
|
15
|
my $d = @p / 2; |
183
|
5
|
100
|
|
|
|
36
|
return SqrRoot( abs( ( $_[ 0 ] - $_[ 2 ] ) ** 2 + ( $_[ 1 ] - $_[ 3 ] ) ** 2 ), $P ) if $d == 2; |
184
|
1
|
|
|
|
|
3
|
my $S = 0; |
185
|
1
|
|
|
|
|
4
|
my @p0 = splice @p, 0, $d; |
186
|
1
|
|
|
|
|
6
|
for ( my $i = 0 ; $i < $d ; $i++ ) { |
187
|
3
|
|
|
|
|
7
|
my $di = $p0[ $i ] - $p[ $i ]; |
188
|
3
|
|
|
|
|
8
|
$S += $di * $di; |
189
|
|
|
|
|
|
|
} |
190
|
1
|
|
|
|
|
6
|
return SqrRoot( abs( $S ), $P ); |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
sub ManhattanDistance { |
194
|
1
|
50
|
|
1
|
1
|
414
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
195
|
1
|
|
|
|
|
4
|
my @p = @_; |
196
|
1
|
50
|
|
|
|
36
|
return undef unless @p >= 3; |
197
|
1
|
|
|
|
|
5
|
my $d = @p / 2; |
198
|
1
|
|
|
|
|
2
|
my $S = 0; |
199
|
1
|
|
|
|
|
27
|
my @p0 = splice @p, 0, $d; |
200
|
1
|
|
|
|
|
7
|
for ( my $i = 0 ; $i < $d ; $i++ ) { |
201
|
2
|
|
|
|
|
5
|
my $di = $p0[ $i ] - $p[ $i ]; |
202
|
2
|
|
|
|
|
6
|
$S += abs $di; |
203
|
|
|
|
|
|
|
} |
204
|
1
|
|
|
|
|
4
|
return $S; |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
sub AllOf { |
208
|
1
|
50
|
|
1
|
1
|
45
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
209
|
1
|
|
|
|
|
3
|
my $result = 1; |
210
|
1
|
|
|
|
|
3
|
my @array = @_; |
211
|
1
|
50
|
|
|
|
5
|
return undef unless @array >= 2; |
212
|
1
|
|
|
|
|
5
|
while ( @array ) { |
213
|
4
|
|
|
|
|
13
|
$result *= shift @array; |
214
|
|
|
|
|
|
|
} |
215
|
1
|
|
|
|
|
4
|
return $result; |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub NoneOf { |
219
|
2
|
100
|
|
2
|
1
|
44
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
220
|
2
|
|
|
|
|
11
|
my $result = 1; |
221
|
2
|
|
|
|
|
6
|
@array = @_; |
222
|
2
|
|
|
|
|
4
|
foreach my $item ( @array ) { |
223
|
6
|
|
|
|
|
21
|
$result *= ( 1 - $item ); |
224
|
|
|
|
|
|
|
} |
225
|
2
|
|
|
|
|
17
|
return $result; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
sub SomeOf { |
229
|
1
|
50
|
|
1
|
1
|
84
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
230
|
1
|
|
|
|
|
46
|
@array = @_; |
231
|
1
|
50
|
|
|
|
5
|
return undef unless @array >= 2; |
232
|
1
|
|
|
|
|
7
|
return 1 - NoneOf( @array ); |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub Factorial { |
236
|
1
|
50
|
|
1
|
1
|
37
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
237
|
1
|
|
|
|
|
2
|
my $n = shift; |
238
|
1
|
50
|
|
|
|
4
|
return undef unless defined $n; |
239
|
1
|
|
|
|
|
4
|
my $result = Math::BigFloat->new( 1 ); |
240
|
1
|
50
|
33
|
|
|
90
|
unless ( $n >= 0 && $n == int( $n ) ) { |
241
|
0
|
|
|
|
|
0
|
return undef; |
242
|
|
|
|
|
|
|
} |
243
|
1
|
|
|
|
|
4
|
while ( $n > 1 ) { |
244
|
9
|
|
|
|
|
1569
|
$result *= $n--; |
245
|
|
|
|
|
|
|
} |
246
|
1
|
|
|
|
|
178
|
return $result; |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
sub Permutation { |
251
|
1
|
50
|
|
1
|
1
|
345
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
252
|
1
|
|
|
|
|
3
|
my ( $n, $k ) = @_; |
253
|
1
|
50
|
|
|
|
3
|
return undef unless defined $n; |
254
|
1
|
|
|
|
|
5
|
my $result = Math::BigFloat->new( 1 ); |
255
|
1
|
50
|
|
|
|
77
|
defined $k or $k = $n; |
256
|
1
|
|
|
|
|
4
|
while ( $k-- ) { $result *= $n-- } |
|
9
|
|
|
|
|
1497
|
|
257
|
1
|
|
|
|
|
225
|
return $result; |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
sub Dice { |
261
|
1
|
50
|
|
1
|
1
|
366
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
262
|
1
|
|
50
|
|
|
5
|
my $number = shift || 1; |
263
|
1
|
|
50
|
|
|
5
|
my $sides = shift || 6; |
264
|
1
|
|
|
|
|
2
|
my $plus = shift; |
265
|
1
|
|
|
|
|
5
|
while ( $number-- ) { |
266
|
4
|
|
|
|
|
15
|
$plus += int( rand( $sides ) + 1 ); |
267
|
|
|
|
|
|
|
} |
268
|
1
|
|
|
|
|
3
|
return $plus; |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
sub RandInt { |
272
|
301
|
50
|
|
301
|
1
|
1736
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
273
|
301
|
|
50
|
|
|
557
|
my $low = shift || 0; |
274
|
301
|
|
50
|
|
|
457
|
my $high = shift || 1; |
275
|
301
|
50
|
|
|
|
471
|
if ( $low > $high ) { |
276
|
0
|
|
|
|
|
0
|
( $low, $high ) = ( $high, $low ); |
277
|
|
|
|
|
|
|
} |
278
|
301
|
|
|
|
|
793
|
return $low + int( rand( $high - $low + 1 ) ); |
279
|
|
|
|
|
|
|
} |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
sub RandomElement { |
282
|
1
|
50
|
|
1
|
1
|
44
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
283
|
1
|
|
|
|
|
3
|
my $arrayref = shift; |
284
|
1
|
|
|
|
|
2
|
$arrayref->[ rand @{ $arrayref } ]; |
|
1
|
|
|
|
|
5
|
|
285
|
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
sub ShuffleArray { |
288
|
1
|
50
|
|
1
|
1
|
321
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
289
|
1
|
|
|
|
|
4
|
my $arrayref = shift; |
290
|
1
|
50
|
33
|
|
|
10
|
return undef unless defined $arrayref && @$arrayref > 0; |
291
|
1
|
|
|
|
|
12
|
for ( my $i = @$arrayref ; --$i ; ) { |
292
|
299
|
|
|
|
|
399
|
my $j = int rand( $i + 1 ); |
293
|
299
|
100
|
|
|
|
506
|
next if $i == $j; |
294
|
295
|
|
|
|
|
951
|
@$arrayref[ $i, $j ] = @$arrayref[ $j, $i ]; |
295
|
|
|
|
|
|
|
} |
296
|
|
|
|
|
|
|
} |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
sub Unique { |
299
|
1
|
50
|
|
1
|
1
|
1711
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
300
|
1
|
|
|
|
|
3
|
my $arrayref = shift; |
301
|
1
|
|
|
|
|
10
|
my %seen; |
302
|
|
|
|
|
|
|
my $zzz; |
303
|
0
|
|
|
|
|
0
|
my @unique; |
304
|
1
|
50
|
33
|
|
|
9
|
return undef unless defined $arrayref && @$arrayref > 0; |
305
|
1
|
|
|
|
|
3
|
foreach $zzz ( @$arrayref ) { |
306
|
8
|
100
|
|
|
|
29
|
push ( @unique, $zzz ) unless $seen{ $zzz }++; |
307
|
|
|
|
|
|
|
} |
308
|
1
|
|
|
|
|
8
|
return @unique; |
309
|
|
|
|
|
|
|
} |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
sub Compare { |
312
|
1
|
50
|
|
1
|
1
|
48
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
313
|
1
|
|
|
|
|
3
|
my ( $arrayref1, $arrayref2 ) = @_; |
314
|
1
|
50
|
33
|
|
|
16
|
unless ( defined $arrayref1 && defined $arrayref2 && @$arrayref1 > 0 && @$arrayref2 > 0 ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
315
|
0
|
|
|
|
|
0
|
return undef; |
316
|
|
|
|
|
|
|
} |
317
|
1
|
|
|
|
|
2
|
my %seen; |
318
|
|
|
|
|
|
|
my @aonly; |
319
|
0
|
|
|
|
|
0
|
my $item; |
320
|
1
|
|
|
|
|
3
|
foreach $item ( @$arrayref2 ) { $seen{ $item } = 1 } |
|
5
|
|
|
|
|
11
|
|
321
|
1
|
|
|
|
|
2
|
foreach $item ( @$arrayref1 ) { |
322
|
5
|
100
|
|
|
|
15
|
unless ( $seen{ $item } ) { |
323
|
3
|
|
|
|
|
5
|
push ( @aonly, $item ); |
324
|
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
|
} |
326
|
1
|
|
|
|
|
22
|
return @aonly; |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
sub Union { |
330
|
1
|
50
|
|
1
|
1
|
46
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
331
|
1
|
|
|
|
|
3
|
my ( $arrayref1, $arrayref2 ) = @_; |
332
|
1
|
50
|
33
|
|
|
16
|
unless ( defined $arrayref1 && defined $arrayref2 && @$arrayref1 > 0 && @$arrayref2 > 0 ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
333
|
0
|
|
|
|
|
0
|
return undef; |
334
|
|
|
|
|
|
|
} |
335
|
1
|
|
|
|
|
2
|
my ( @union, @temp ); |
336
|
0
|
|
|
|
|
0
|
my %union; |
337
|
0
|
|
|
|
|
0
|
my $zzz; |
338
|
1
|
|
|
|
|
2
|
foreach $zzz ( @$arrayref1 ) { $union{ $zzz } = 1 } |
|
5
|
|
|
|
|
12
|
|
339
|
1
|
|
|
|
|
3
|
foreach $zzz ( @$arrayref2 ) { $union{ $zzz } = 1 } |
|
3
|
|
|
|
|
6
|
|
340
|
1
|
|
|
|
|
8
|
return keys %union; |
341
|
|
|
|
|
|
|
} |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
sub Intersection { |
344
|
1
|
50
|
|
1
|
1
|
43
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
345
|
1
|
|
|
|
|
3
|
my ( $arrayref1, $arrayref2 ) = @_; |
346
|
1
|
50
|
33
|
|
|
16
|
unless ( defined $arrayref1 && defined $arrayref2 && @$arrayref1 > 0 && @$arrayref2 > 0 ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
347
|
0
|
|
|
|
|
0
|
return undef; |
348
|
|
|
|
|
|
|
} |
349
|
1
|
|
|
|
|
3
|
my @isect = undef; |
350
|
1
|
|
|
|
|
2
|
my ( %isect, %union, %count ); |
351
|
0
|
|
|
|
|
0
|
my $zzz; |
352
|
1
|
|
|
|
|
3
|
foreach $zzz ( @$arrayref1 ) { |
353
|
5
|
|
|
|
|
10
|
$union{ $zzz } = 1; |
354
|
|
|
|
|
|
|
} |
355
|
1
|
|
|
|
|
3
|
foreach $zzz ( @$arrayref2 ) { |
356
|
3
|
100
|
|
|
|
10
|
if ( $union{ $zzz } ) { |
357
|
2
|
|
|
|
|
4
|
$isect{ $zzz } = 1; |
358
|
|
|
|
|
|
|
} |
359
|
|
|
|
|
|
|
} |
360
|
1
|
|
|
|
|
4
|
@isect = keys %isect; |
361
|
1
|
|
|
|
|
6
|
return @isect; |
362
|
|
|
|
|
|
|
} |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
sub Difference { |
365
|
1
|
50
|
|
1
|
1
|
47
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
366
|
1
|
|
|
|
|
2
|
my ( $arrayref1, $arrayref2 ) = @_; |
367
|
1
|
50
|
33
|
|
|
20
|
unless ( defined $arrayref1 && defined $arrayref2 && @$arrayref1 > 0 && @$arrayref2 > 0 ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
368
|
0
|
|
|
|
|
0
|
return undef; |
369
|
|
|
|
|
|
|
} |
370
|
1
|
|
|
|
|
4
|
my ( @isect, @diff, @union ) = undef; |
371
|
1
|
|
|
|
|
2
|
my $zzz; |
372
|
|
|
|
|
|
|
my %count; |
373
|
1
|
|
|
|
|
3
|
foreach $zzz ( @$arrayref1, @$arrayref2 ) { $count{ $zzz }++ } |
|
8
|
|
|
|
|
15
|
|
374
|
1
|
|
|
|
|
5
|
foreach $zzz ( keys %count ) { |
375
|
6
|
|
|
|
|
8
|
push @union, $zzz; |
376
|
6
|
100
|
|
|
|
6
|
push @{ $count{ $zzz } > 1 ? \@isect : \@diff }, $zzz; |
|
6
|
|
|
|
|
20
|
|
377
|
|
|
|
|
|
|
} |
378
|
1
|
|
|
|
|
7
|
return @diff; |
379
|
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
sub GaussianRand { |
382
|
1
|
50
|
|
1
|
1
|
45
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
383
|
1
|
|
|
|
|
2
|
my ( $u1, $u2, $w, $g1, $g2 ); |
384
|
1
|
|
|
|
|
3
|
do { |
385
|
1
|
|
|
|
|
4
|
$u1 = 2 * rand() - 1; |
386
|
1
|
|
|
|
|
3
|
$u2 = 2 * rand() - 1; |
387
|
1
|
|
|
|
|
7
|
$w = $u1 * $u1 + $u2 * $u2; |
388
|
|
|
|
|
|
|
} while ( $w >= 1 ); |
389
|
1
|
|
|
|
|
14
|
$w = sqrt( abs( ( -2 * log( $w ) ) / $w ) ); |
390
|
1
|
|
|
|
|
3
|
$g2 = $u1 * $w; |
391
|
1
|
|
|
|
|
2
|
$g1 = $u2 * $w; |
392
|
1
|
50
|
|
|
|
12
|
return wantarray ? ( $g1, $g2 ) : $g1; |
393
|
|
|
|
|
|
|
} |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
sub Choose { # Probability of getting $k heads is $n tosses |
396
|
70
|
100
|
|
70
|
1
|
198
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
397
|
70
|
|
|
|
|
88
|
my ( $n, $k ) = @_; |
398
|
70
|
50
|
33
|
|
|
283
|
return undef unless defined $n && defined $k; |
399
|
70
|
|
|
|
|
85
|
my ( $result, $j ) = ( 1, 1 ); |
400
|
70
|
50
|
33
|
|
|
253
|
if ( $k > $n || $k < 0 ) { |
401
|
0
|
|
|
|
|
0
|
return 0; |
402
|
|
|
|
|
|
|
} |
403
|
70
|
|
|
|
|
134
|
while ( $j <= $k ) { |
404
|
2291
|
|
|
|
|
2643
|
$result *= $n--; |
405
|
2291
|
|
|
|
|
4043
|
$result /= $j++; |
406
|
|
|
|
|
|
|
} |
407
|
70
|
|
|
|
|
332
|
return $result; |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
sub Binomial { # probability of $k successes in $n attempts, given probability of $p |
411
|
69
|
100
|
|
69
|
1
|
223
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
412
|
69
|
|
|
|
|
101
|
my ( $n, $k, $p ) = @_; |
413
|
69
|
50
|
|
|
|
140
|
return $k == 0 if $p == 0; |
414
|
69
|
50
|
|
|
|
122
|
return $k != $n if $p == 1; |
415
|
69
|
|
|
|
|
108
|
return Choose( $n, $k ) * $p ** $k * ( 1 - $p ) ** ( $n - $k ); |
416
|
|
|
|
|
|
|
} |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
sub GaussianDist { |
419
|
1
|
50
|
|
1
|
1
|
57
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
420
|
1
|
|
|
1
|
|
15
|
use constant two_pi_sqrt_inverse => 1 / sqrt( 8 * atan2( 1, 1 ) ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13546
|
|
421
|
1
|
|
|
|
|
3
|
my ( $x, $mean, $variance ) = @_; |
422
|
1
|
|
|
|
|
16
|
return two_pi_sqrt_inverse * exp( -( $x - $mean ) ** 2 / ( 2 * $variance ) ) / SqrRoot( abs( $variance ) ); |
423
|
|
|
|
|
|
|
} |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
sub StandardDeviation { |
426
|
3
|
100
|
|
3
|
1
|
1218
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
427
|
3
|
|
|
|
|
6
|
my $arrayref = shift; |
428
|
3
|
|
66
|
|
|
13
|
my $P = shift || $DECIMALS; |
429
|
3
|
50
|
33
|
|
|
21
|
return undef unless defined $arrayref && @$arrayref > 0; |
430
|
3
|
|
|
|
|
11
|
my $mean = Mean( $arrayref ); |
431
|
3
|
|
|
|
|
164
|
return SqrRoot( abs( Mean( [ map $_**2, @$arrayref ] ) - ( $mean**2 ) ), $P ); |
432
|
|
|
|
|
|
|
} |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
sub Variance { |
435
|
1
|
50
|
|
1
|
1
|
564
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
436
|
1
|
|
|
|
|
2
|
my $arrayref = shift; |
437
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
438
|
1
|
|
|
|
|
15
|
my $modP = modP( $P ); |
439
|
1
|
50
|
33
|
|
|
11
|
return undef unless defined $arrayref && @$arrayref > 0; |
440
|
1
|
|
|
|
|
5
|
my $result = StandardDeviation( $arrayref, $modP ) ** 2; |
441
|
1
|
|
|
|
|
943
|
return $result->bfround( -$P ); |
442
|
|
|
|
|
|
|
} |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
sub StandardScores { # number of StdDevs above the mean for each element |
445
|
1
|
50
|
|
1
|
1
|
736
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
446
|
1
|
|
|
|
|
3
|
my $arrayref = shift; |
447
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
448
|
1
|
50
|
33
|
|
|
10
|
return undef unless defined $arrayref && @$arrayref > 0; |
449
|
1
|
|
|
|
|
4
|
my $mean = Mean( $arrayref ); |
450
|
1
|
|
|
|
|
3
|
my ( $i, @scores ); |
451
|
1
|
|
|
|
|
4
|
my $deviation = StandardDeviation( $arrayref, $P ); |
452
|
1
|
50
|
|
|
|
239
|
return unless $deviation; |
453
|
|
|
|
|
|
|
|
454
|
1
|
|
|
|
|
34
|
for ( $i = 0 ; $i < @$arrayref ; $i++ ) { |
455
|
4
|
|
|
|
|
844
|
push @scores, ( $arrayref->[ $i ] - $mean ) / $deviation; |
456
|
|
|
|
|
|
|
} |
457
|
1
|
|
|
|
|
632
|
return @scores; |
458
|
|
|
|
|
|
|
} |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
sub SignSignificance { |
461
|
1
|
50
|
|
1
|
1
|
226
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
462
|
1
|
|
|
|
|
4
|
my ( $trials, $hits, $probability ) = @_; |
463
|
1
|
50
|
33
|
|
|
27
|
return undef unless defined $trials && defined $hits && defined $probability; |
|
|
|
33
|
|
|
|
|
464
|
1
|
|
|
|
|
2
|
my $confidence; |
465
|
1
|
|
|
|
|
4
|
foreach ( $hits .. $trials ) { |
466
|
68
|
|
|
|
|
113
|
$confidence += Binomial( $trials, $hits, $probability ); |
467
|
|
|
|
|
|
|
} |
468
|
1
|
|
|
|
|
22
|
return $confidence; |
469
|
|
|
|
|
|
|
} |
470
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
sub EMC2 { |
472
|
1
|
50
|
|
1
|
1
|
72
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
473
|
1
|
|
|
|
|
3
|
my $var = shift; |
474
|
1
|
|
|
|
|
3
|
my $unit = shift; |
475
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
476
|
1
|
50
|
33
|
|
|
9
|
return undef unless defined $var && defined $unit; |
477
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
478
|
1
|
|
|
|
|
3
|
my $C; |
479
|
1
|
50
|
|
|
|
13
|
if ( $unit =~ /^k/i ) { |
|
|
50
|
|
|
|
|
|
480
|
0
|
|
|
|
|
0
|
$C = 299792.458; # km per second |
481
|
|
|
|
|
|
|
} elsif ( $unit =~ /^m/i ) { |
482
|
1
|
|
|
|
|
2
|
$C = 186282.056; # miles per second |
483
|
|
|
|
|
|
|
} else { |
484
|
0
|
|
|
|
|
0
|
return undef; |
485
|
|
|
|
|
|
|
} |
486
|
1
|
|
|
|
|
9
|
my $result = Math::BigFloat->new(); |
487
|
1
|
|
|
|
|
72
|
my $sqrd = Math::BigFloat->new( $C ); |
488
|
1
|
|
|
|
|
218
|
$sqrd->bpow( 2 ); |
489
|
1
|
50
|
|
|
|
497
|
if ( $var =~ /^m(.*)$/i ) { |
|
|
0
|
|
|
|
|
|
490
|
1
|
|
|
|
|
3
|
my $val = $1; |
491
|
1
|
|
|
|
|
7
|
$result = $sqrd->copy()->bmul( $val, $modP ); |
492
|
|
|
|
|
|
|
} elsif ( $var =~ /^e(.*)$/i ) { |
493
|
0
|
|
|
|
|
0
|
my $val = Math::BigFloat->new( $1 ); |
494
|
0
|
|
|
|
|
0
|
$result = $val->fdiv( $sqrd, $modP ); |
495
|
|
|
|
|
|
|
} else { |
496
|
0
|
|
|
|
|
0
|
return undef; |
497
|
|
|
|
|
|
|
} |
498
|
1
|
|
|
|
|
361
|
return $result->bfround( -$P ); |
499
|
|
|
|
|
|
|
} |
500
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
sub FMA { |
502
|
1
|
50
|
|
1
|
1
|
181
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
503
|
1
|
|
|
|
|
4
|
my @vars = @_; |
504
|
1
|
|
|
|
|
2
|
my $P; |
505
|
1
|
50
|
|
|
|
7
|
if ( $vars[ -1 ] =~ /^\d*$/ ) { |
506
|
0
|
|
|
|
|
0
|
$P = pop @vars; |
507
|
|
|
|
|
|
|
} else { |
508
|
1
|
|
|
|
|
10
|
$P = $DECIMALS; |
509
|
|
|
|
|
|
|
} |
510
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
511
|
1
|
|
|
|
|
8
|
@vars = sort @vars; |
512
|
1
|
|
|
|
|
2
|
my ( $acc, $force, $mass ); |
513
|
0
|
|
|
|
|
0
|
my $result; |
514
|
1
|
50
|
|
|
|
7
|
if ( $vars[ 0 ] =~ /^[Aa](.*)$/ ) { |
|
|
0
|
|
|
|
|
|
515
|
1
|
|
|
|
|
5
|
$acc = $1; |
516
|
|
|
|
|
|
|
} elsif ( $vars[ 0 ] =~ /^[Ff](.*)$/ ) { |
517
|
0
|
|
|
|
|
0
|
$force = $1; |
518
|
|
|
|
|
|
|
} |
519
|
1
|
50
|
|
|
|
11
|
if ( $vars[ 1 ] =~ /^[Ff](.*)$/ ) { |
|
|
50
|
|
|
|
|
|
520
|
0
|
|
|
|
|
0
|
$force = $1; |
521
|
|
|
|
|
|
|
} elsif ( $vars[ 1 ] =~ /^[Mm](.*)$/ ) { |
522
|
1
|
|
|
|
|
3
|
$mass = $1; |
523
|
|
|
|
|
|
|
} |
524
|
1
|
50
|
33
|
|
|
15
|
if ( $acc && $force ) { |
|
|
50
|
33
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
525
|
0
|
|
|
|
|
0
|
$result = Math::BigFloat->new( $force ); |
526
|
0
|
|
|
|
|
0
|
$result->bdiv( $acc, $modP ); |
527
|
|
|
|
|
|
|
} elsif ( $acc && $mass ) { |
528
|
1
|
|
|
|
|
6
|
$result = Math::BigFloat->new( $acc ); |
529
|
1
|
|
|
|
|
65
|
$result->bmul( $mass, $modP ); |
530
|
|
|
|
|
|
|
} elsif ( $force && $mass ) { |
531
|
0
|
|
|
|
|
0
|
$result = Math::BigFloat->new( $force ); |
532
|
0
|
|
|
|
|
0
|
$result->bmul( $mass, $modP ); |
533
|
|
|
|
|
|
|
} else { |
534
|
0
|
|
|
|
|
0
|
return undef; |
535
|
|
|
|
|
|
|
} |
536
|
1
|
|
|
|
|
234
|
return $result->bfround( -$P ); |
537
|
|
|
|
|
|
|
} |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
sub Predict { |
540
|
1
|
50
|
|
1
|
1
|
328
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
541
|
1
|
|
|
|
|
2
|
my $slope = shift; |
542
|
1
|
|
|
|
|
2
|
my $y_intercept = shift; |
543
|
1
|
|
|
|
|
2
|
my $proposed = shift; |
544
|
1
|
|
33
|
|
|
13
|
my $P = shift || $DECIMALS; |
545
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
546
|
1
|
|
|
|
|
5
|
my $result = Math::BigFloat->new( $slope ); |
547
|
1
|
|
|
|
|
90
|
$result->bmul( $proposed, $modP )->badd( $y_intercept ); |
548
|
1
|
|
|
|
|
565
|
$result->bfround( -$P ); |
549
|
1
|
|
|
|
|
40
|
return $result; |
550
|
|
|
|
|
|
|
} |
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
sub TriangleHeron { |
553
|
1
|
50
|
|
1
|
1
|
277
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
554
|
1
|
|
|
|
|
2
|
my ( $a, $b, $c, $P ); |
555
|
1
|
50
|
33
|
|
|
9
|
if ( @_ == 4 || @_ == 7 ) { |
556
|
0
|
|
|
|
|
0
|
$P = pop @_; |
557
|
|
|
|
|
|
|
} else { |
558
|
1
|
|
|
|
|
3
|
$P = $DECIMALS; |
559
|
|
|
|
|
|
|
} |
560
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
561
|
1
|
50
|
|
|
|
6
|
if ( @_ == 3 ) { |
|
|
0
|
|
|
|
|
|
562
|
1
|
|
|
|
|
3
|
( $a, $b, $c ) = @_; |
563
|
|
|
|
|
|
|
} elsif ( @_ == 6 ) { |
564
|
0
|
|
|
|
|
0
|
( $a, $b, $c ) = ( |
565
|
|
|
|
|
|
|
Distance( $_[ 0 ], $_[ 1 ], $_[ 2 ], $_[ 3 ], $modP ), Distance( $_[ 2 ], $_[ 3 ], $_[ 4 ], $_[ 5 ], $modP ), |
566
|
|
|
|
|
|
|
Distance( $_[ 4 ], $_[ 5 ], $_[ 0 ], $_[ 1 ], $modP ) |
567
|
|
|
|
|
|
|
); |
568
|
|
|
|
|
|
|
} else { |
569
|
0
|
|
|
|
|
0
|
return undef; |
570
|
|
|
|
|
|
|
} |
571
|
1
|
|
|
|
|
6
|
my $s = Math::BigFloat->new(); |
572
|
1
|
|
|
|
|
37
|
$s = ( $a + $b + $c ) / 2; |
573
|
1
|
|
|
|
|
7
|
my $root = $s * ( $s - $a ) * ( $s - $b ) * ( $s - $c ); |
574
|
1
|
|
|
|
|
6
|
return SqrRoot( abs( $root ), $P ); |
575
|
|
|
|
|
|
|
} |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
sub PolygonPerimeter { |
578
|
1
|
50
|
|
1
|
1
|
460
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
579
|
1
|
|
|
|
|
4
|
my @xy = @_; |
580
|
1
|
|
|
|
|
2
|
my $P; |
581
|
1
|
50
|
|
|
|
8
|
if ( $xy[ -1 ] =~ /p/i ) { |
582
|
0
|
|
|
|
|
0
|
( $P = pop @xy ) =~ s/\D//g; |
583
|
|
|
|
|
|
|
} else { |
584
|
1
|
|
|
|
|
3
|
$P = $DECIMALS; |
585
|
|
|
|
|
|
|
} |
586
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
587
|
1
|
|
|
|
|
6
|
my $PP = Math::BigFloat->new(); |
588
|
1
|
50
|
33
|
|
|
47
|
return undef unless @xy % 2 == 0 && @xy > 0; |
589
|
1
|
|
|
|
|
9
|
for ( my ( $xa, $ya ) = @xy[ -2, -1 ] ; my ( $xb, $yb ) = splice @xy, 0, 2 ; ( $xa, $ya ) = ( $xb, $yb ) ) { |
590
|
4
|
|
|
|
|
1542
|
$PP += Distance( $xa, $ya, $xb, $yb, $modP ); |
591
|
|
|
|
|
|
|
} |
592
|
1
|
|
|
|
|
581
|
$PP->bfround( -$P ); |
593
|
1
|
|
|
|
|
268
|
return $PP; |
594
|
|
|
|
|
|
|
} |
595
|
|
|
|
|
|
|
|
596
|
|
|
|
|
|
|
sub Clockwise { |
597
|
3
|
100
|
|
3
|
1
|
158
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
598
|
3
|
|
|
|
|
7
|
my ( $x0, $y0, $x1, $y1, $x2, $y2 ) = @_; |
599
|
3
|
50
|
33
|
|
|
61
|
return undef unless defined $x0 && defined $y0 && defined $x1 && defined $y1 && defined $x2 && defined $y2; |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
600
|
3
|
|
|
|
|
10
|
return ( $x2 - $x0 ) * ( $y1 - $y0 ) - ( $x1 - $x0 ) * ( $y2 - $y0 ); |
601
|
|
|
|
|
|
|
} |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
sub InPolygon { |
604
|
1
|
50
|
|
1
|
1
|
45
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
605
|
1
|
|
|
|
|
4
|
my ( $x, $y, @xy ) = @_; |
606
|
1
|
50
|
33
|
|
|
14
|
return undef unless defined $x && defined $y && @xy > 0; |
|
|
|
33
|
|
|
|
|
607
|
1
|
|
|
|
|
3
|
my $n = @xy / 2; |
608
|
1
|
|
|
|
|
6
|
my @i = map { 2 * $_ } 0 .. ( @xy / 2 ); |
|
5
|
|
|
|
|
12
|
|
609
|
1
|
|
|
|
|
3
|
my @x = map { $xy[ $_ ] } @i; |
|
5
|
|
|
|
|
11
|
|
610
|
1
|
|
|
|
|
3
|
my @y = map { $xy[ $_ + 1 ] } @i; |
|
5
|
|
|
|
|
13
|
|
611
|
1
|
|
|
|
|
2
|
my ( $i, $j ); |
612
|
1
|
|
|
|
|
3
|
my $side = 0; |
613
|
|
|
|
|
|
|
|
614
|
1
|
|
|
|
|
8
|
for ( $i = 0, $j = $n - 1 ; $i < $n ; $j = $i++ ) { |
615
|
4
|
100
|
66
|
|
|
61
|
if ( ( ( ( $y[ $i ] <= $y ) && ( $y < $y[ $j ] ) ) || ( ( $y[ $j ] <= $y ) && ( $y < $y[ $i ] ) ) ) |
|
|
|
100
|
|
|
|
|
616
|
|
|
|
|
|
|
and ( $x < ( $x[ $j ] - $x[ $i ] ) * ( $y - $y[ $i ] ) / ( $y[ $j ] - $y[ $i ] ) + $x[ $i ] ) ) |
617
|
|
|
|
|
|
|
{ |
618
|
1
|
|
|
|
|
6
|
$side = not $side; |
619
|
|
|
|
|
|
|
} |
620
|
|
|
|
|
|
|
} |
621
|
1
|
50
|
|
|
|
8
|
return $side ? 1 : 0; |
622
|
|
|
|
|
|
|
} |
623
|
|
|
|
|
|
|
|
624
|
|
|
|
|
|
|
sub BoundingBox_Points { |
625
|
0
|
0
|
|
0
|
1
|
0
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
626
|
0
|
|
|
|
|
0
|
my ( $d, @points ) = @_; |
627
|
0
|
0
|
0
|
|
|
0
|
return undef unless defined $d && @points > 0; |
628
|
0
|
|
|
|
|
0
|
my @bb; |
629
|
0
|
|
|
|
|
0
|
while ( my @p = splice @points, 0, $d ) { |
630
|
0
|
|
|
|
|
0
|
@bb = BoundingBox( $d, @p, @bb ); |
631
|
|
|
|
|
|
|
} |
632
|
0
|
|
|
|
|
0
|
return @bb; |
633
|
|
|
|
|
|
|
} |
634
|
|
|
|
|
|
|
|
635
|
|
|
|
|
|
|
sub BoundingBox { |
636
|
1
|
50
|
|
1
|
0
|
44
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
637
|
1
|
|
|
|
|
5
|
my ( $d, @bb ) = @_; |
638
|
1
|
50
|
33
|
|
|
21
|
return undef unless defined $d && @bb > 0; |
639
|
1
|
|
|
|
|
6
|
my @p = splice( @bb, 0, @bb - 2 * $d ); |
640
|
1
|
50
|
|
|
|
6
|
@bb = ( @p, @p ) unless @bb; |
641
|
1
|
|
|
|
|
5
|
for ( my $i = 0 ; $i < $d ; $i++ ) { |
642
|
2
|
|
|
|
|
8
|
for ( my $j = 0 ; $j < @p ; $j += $d ) { |
643
|
4
|
|
|
|
|
6
|
my $ij = $i + $j; |
644
|
4
|
100
|
|
|
|
11
|
$bb[ $i ] = $p[ $ij ] if $p[ $ij ] < $bb[ $i ]; |
645
|
4
|
100
|
|
|
|
23
|
$bb[ $i + $d ] = $p[ $ij ] if $p[ $ij ] > $bb[ $i + $d ]; |
646
|
|
|
|
|
|
|
} |
647
|
|
|
|
|
|
|
} |
648
|
1
|
|
|
|
|
5
|
return @bb; |
649
|
|
|
|
|
|
|
} |
650
|
|
|
|
|
|
|
|
651
|
|
|
|
|
|
|
sub InTriangle { |
652
|
1
|
50
|
|
1
|
1
|
47
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
653
|
1
|
|
|
|
|
4
|
my ( $x, $y, $x0, $y0, $x1, $y1, $x2, $y2 ) = @_; |
654
|
1
|
50
|
33
|
|
|
50
|
return undef unless defined defined $x |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
655
|
|
|
|
|
|
|
&& defined $y |
656
|
|
|
|
|
|
|
&& defined $x0 |
657
|
|
|
|
|
|
|
&& defined $y0 |
658
|
|
|
|
|
|
|
&& defined $x1 |
659
|
|
|
|
|
|
|
&& defined $y1 |
660
|
|
|
|
|
|
|
&& defined $x2 |
661
|
|
|
|
|
|
|
&& defined $y2; |
662
|
1
|
|
|
|
|
4
|
my $cw0 = Clockwise( $x0, $y0, $x1, $y1, $x, $y ); |
663
|
1
|
50
|
|
|
|
6
|
return 1 if abs( $cw0 ) < epsilon; |
664
|
1
|
|
|
|
|
11
|
my $cw1 = Clockwise( $x1, $y1, $x2, $y2, $x, $y ); |
665
|
1
|
50
|
|
|
|
5
|
return 1 if abs( $cw1 ) < epsilon; |
666
|
1
|
50
|
33
|
|
|
13
|
return 0 if ( $cw0 < 0 and $cw1 > 0 ) or ( $cw0 > 0 and $cw1 < 0 ); |
|
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
667
|
0
|
|
|
|
|
0
|
my $cw2 = Clockwise( $x2, $y2, $x0, $y0, $x, $y ); |
668
|
0
|
0
|
|
|
|
0
|
return 1 if abs( $cw2 ) < epsilon; |
669
|
0
|
0
|
0
|
|
|
0
|
return 0 if ( $cw0 < 0 and $cw2 > 0 ) or ( $cw0 > 0 and $cw2 < 0 ); |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
670
|
0
|
|
|
|
|
0
|
return 1; |
671
|
|
|
|
|
|
|
} |
672
|
|
|
|
|
|
|
|
673
|
|
|
|
|
|
|
sub PolygonArea { |
674
|
1
|
50
|
|
1
|
1
|
43
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
675
|
1
|
|
|
|
|
4
|
my @xy = @_; |
676
|
1
|
|
|
|
|
3
|
my $P; |
677
|
1
|
50
|
|
|
|
21
|
if ( $xy[ -1 ] =~ /p/i ) { |
678
|
0
|
|
|
|
|
0
|
( $P = pop @xy ) =~ s/\D//g; |
679
|
|
|
|
|
|
|
} else { |
680
|
1
|
|
|
|
|
3
|
$P = $DECIMALS; |
681
|
|
|
|
|
|
|
} |
682
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
683
|
1
|
50
|
33
|
|
|
102
|
return undef unless @xy % 2 == 0 && @xy > 0; |
684
|
1
|
|
|
|
|
7
|
my $A = Math::BigFloat->new(); |
685
|
1
|
|
|
|
|
4038
|
for ( my ( $xa, $ya ) = @xy[ -2, -1 ] ; my ( $xb, $yb ) = splice @xy, 0, 2 ; ( $xa, $ya ) = ( $xb, $yb ) ) { |
686
|
5
|
|
|
|
|
1032
|
$A += Determinant( $xa, $ya, $xb, $yb, $modP ); |
687
|
|
|
|
|
|
|
} |
688
|
1
|
|
|
|
|
284
|
$A->bdiv( 2, $modP ); |
689
|
1
|
|
|
|
|
656
|
$A->babs()->bfround( -$P ); |
690
|
1
|
|
|
|
|
58
|
return $A; |
691
|
|
|
|
|
|
|
} |
692
|
|
|
|
|
|
|
|
693
|
|
|
|
|
|
|
sub Determinant { |
694
|
5
|
50
|
|
5
|
0
|
371
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
695
|
5
|
|
|
|
|
15
|
my $result = Math::BigFloat->new(); |
696
|
5
|
|
|
|
|
1261
|
$result = $_[ 0 ] * $_[ 3 ] - $_[ 1 ] * $_[ 2 ]; |
697
|
5
|
|
|
|
|
233
|
return $result; |
698
|
|
|
|
|
|
|
} |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
sub CircleArea { |
701
|
1
|
50
|
|
1
|
1
|
368
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
702
|
1
|
|
|
|
|
3
|
my $radius = shift; |
703
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
704
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
705
|
1
|
50
|
|
|
|
4
|
return undef unless defined $radius; |
706
|
1
|
|
|
|
|
6
|
my $area = Math::BigFloat->new( 1 ); |
707
|
1
|
|
|
|
|
93
|
$area = $PI->copy()->bmul( ( $radius ** 2 ), $modP ); |
708
|
1
|
|
|
|
|
1762
|
$area->bfround( -$P ); |
709
|
1
|
|
|
|
|
277
|
return $area; |
710
|
|
|
|
|
|
|
} |
711
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
sub Circumference { |
713
|
1
|
50
|
|
1
|
1
|
151
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
714
|
1
|
|
|
|
|
3
|
my $diameter = shift; |
715
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
716
|
1
|
50
|
|
|
|
6
|
return undef unless defined $diameter; |
717
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
718
|
1
|
|
|
|
|
5
|
my $circumference = $PI->copy()->bmul( $diameter, $modP ); |
719
|
1
|
|
|
|
|
1591
|
$circumference->bfround( -$P ); |
720
|
1
|
|
|
|
|
283
|
return $circumference; |
721
|
|
|
|
|
|
|
} |
722
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
sub SphereVolume { |
724
|
1
|
50
|
|
1
|
1
|
110
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
725
|
1
|
|
|
|
|
3
|
my $radius = shift; |
726
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
727
|
1
|
50
|
|
|
|
4
|
return undef unless defined $radius; |
728
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
729
|
1
|
|
|
|
|
5
|
my $volume = $PI->copy()->bmul( ( 4 / 3 ), $modP )->bmul( ( $radius ** 3 ), $modP ); |
730
|
1
|
|
|
|
|
3934
|
$volume->bfround( -$P ); |
731
|
1
|
|
|
|
|
267
|
return $volume; |
732
|
|
|
|
|
|
|
} |
733
|
|
|
|
|
|
|
|
734
|
|
|
|
|
|
|
sub SphereSurface { |
735
|
1
|
50
|
|
1
|
1
|
139
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
736
|
1
|
|
|
|
|
3
|
my $radius = shift; |
737
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
738
|
1
|
50
|
|
|
|
6
|
return undef unless defined $radius; |
739
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
740
|
1
|
|
|
|
|
6
|
my $surface = $PI->copy()->bmul( 4, $modP )->bmul( ( $radius ** 2 ), $modP ); |
741
|
1
|
|
|
|
|
1930
|
$surface->bfround( -$P ); |
742
|
1
|
|
|
|
|
254
|
return $surface; |
743
|
|
|
|
|
|
|
} |
744
|
|
|
|
|
|
|
|
745
|
|
|
|
|
|
|
sub RuleOf72 { |
746
|
1
|
50
|
|
1
|
1
|
111
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
747
|
1
|
|
|
|
|
2
|
my $pct = shift; |
748
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
749
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
750
|
1
|
50
|
|
|
|
4
|
return undef unless defined $pct; |
751
|
1
|
|
|
|
|
5
|
my $num = Math::BigFloat->new( 72 ); |
752
|
1
|
|
|
|
|
55
|
$num->bdiv( $pct, $modP )->bfround( -$P ); |
753
|
1
|
|
|
|
|
884
|
return $num; |
754
|
|
|
|
|
|
|
} |
755
|
|
|
|
|
|
|
|
756
|
|
|
|
|
|
|
sub CylinderVolume { |
757
|
1
|
50
|
|
1
|
1
|
250
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
758
|
1
|
|
|
|
|
3
|
my $radius = shift; |
759
|
1
|
|
|
|
|
1
|
my $height = shift; |
760
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
761
|
1
|
50
|
33
|
|
|
11
|
return undef unless defined $radius && defined $height; |
762
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
763
|
1
|
|
|
|
|
7
|
my $volume = $PI->copy()->bmul( ( $radius ** 2 ), $modP )->bmul( $height, $modP ); |
764
|
1
|
|
|
|
|
2223
|
$volume->bfround( -$P ); |
765
|
1
|
|
|
|
|
264
|
return $volume; |
766
|
|
|
|
|
|
|
} |
767
|
|
|
|
|
|
|
|
768
|
|
|
|
|
|
|
sub ConeVolume { |
769
|
1
|
50
|
|
1
|
1
|
117
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
770
|
1
|
|
|
|
|
3
|
my $lowerbase = shift; |
771
|
1
|
|
|
|
|
2
|
my $height = shift; |
772
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
773
|
1
|
50
|
33
|
|
|
11
|
return undef unless defined $lowerbase && defined $height; |
774
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
775
|
1
|
|
|
|
|
5
|
my $num = Math::BigFloat->new( $lowerbase ); |
776
|
1
|
|
|
|
|
74
|
$num->bmul( $height, $modP )->bdiv( 3, $modP ); |
777
|
1
|
|
|
|
|
796
|
$num->bfround( -$P ); |
778
|
1
|
|
|
|
|
341
|
return $num; |
779
|
|
|
|
|
|
|
} |
780
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
sub deg2rad { |
782
|
1
|
50
|
|
1
|
1
|
101
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
783
|
1
|
|
|
|
|
2
|
my $degrees = shift; |
784
|
1
|
|
33
|
|
|
9
|
my $P = shift || $DECIMALS; |
785
|
1
|
50
|
|
|
|
4
|
return undef unless defined $degrees; |
786
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
787
|
1
|
|
|
|
|
5
|
my $radians = Math::BigFloat->new( $degrees ); |
788
|
1
|
|
|
|
|
75
|
$radians->bdiv( 180, $modP )->bmul( $PI->copy(), $modP ); |
789
|
1
|
|
|
|
|
3003
|
$radians->bfround( -$P ); |
790
|
1
|
|
|
|
|
264
|
return $radians; |
791
|
|
|
|
|
|
|
} |
792
|
|
|
|
|
|
|
|
793
|
|
|
|
|
|
|
sub rad2deg { |
794
|
1
|
50
|
|
1
|
1
|
115
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
795
|
1
|
|
|
|
|
3
|
my $radians = shift; |
796
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
797
|
1
|
50
|
|
|
|
4
|
return undef unless defined $radians; |
798
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
799
|
1
|
|
|
|
|
6
|
my $degrees = Math::BigFloat->new( $radians ); |
800
|
1
|
|
|
|
|
110
|
$degrees->bdiv( $PI->copy(), $modP )->bmul( 180, $modP ); |
801
|
1
|
|
|
|
|
142522
|
$degrees->bfround( -$P ); |
802
|
1
|
|
|
|
|
240
|
return $degrees; |
803
|
|
|
|
|
|
|
} |
804
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
sub C2F { |
806
|
1
|
50
|
|
1
|
1
|
143
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
807
|
1
|
|
|
|
|
6
|
my $x = Math::BigFloat->new( shift ); |
808
|
1
|
|
33
|
|
|
58
|
my $P = shift || $DECIMALS; |
809
|
1
|
50
|
|
|
|
4
|
return undef unless defined $x; |
810
|
1
|
|
|
|
|
4
|
my $degrees = Math::BigFloat->new( $x ); |
811
|
1
|
|
|
|
|
35
|
my $modP = modP( $P ); |
812
|
1
|
|
|
|
|
6
|
$degrees->bmul( 1.8, $modP )->badd( 32 )->bfround( -$P ); |
813
|
1
|
|
|
|
|
671
|
return $degrees; |
814
|
|
|
|
|
|
|
} |
815
|
|
|
|
|
|
|
|
816
|
|
|
|
|
|
|
sub F2C { |
817
|
1
|
50
|
|
1
|
1
|
240
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
818
|
1
|
|
|
|
|
5
|
my $x = Math::BigFloat->new( shift ); |
819
|
1
|
|
33
|
|
|
71
|
my $P = shift || $DECIMALS; |
820
|
1
|
50
|
|
|
|
4
|
return undef unless defined $x; |
821
|
1
|
|
|
|
|
5
|
my $degrees = Math::BigFloat->new( $x ); |
822
|
1
|
|
|
|
|
30
|
my $modP = modP( $P ); |
823
|
1
|
|
|
|
|
8
|
$degrees->bsub( 32 )->bdiv( 1.8, $modP )->bfround( -$P ); |
824
|
1
|
|
|
|
|
1462
|
return $degrees; |
825
|
|
|
|
|
|
|
} |
826
|
|
|
|
|
|
|
|
827
|
|
|
|
|
|
|
sub cm2in { |
828
|
1
|
50
|
|
1
|
1
|
374
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
829
|
1
|
|
|
|
|
6
|
my $x = Math::BigFloat->new( shift ); |
830
|
1
|
|
33
|
|
|
142
|
my $P = shift || $DECIMALS; |
831
|
1
|
50
|
|
|
|
5
|
return undef unless defined $x; |
832
|
1
|
|
|
|
|
5
|
my $cm = Math::BigFloat->new( $x ); |
833
|
1
|
|
|
|
|
33
|
my $modP = modP( $P ); |
834
|
1
|
|
|
|
|
4
|
$cm->bmul( 0.3937007874, $modP )->bfround( -$P ); |
835
|
1
|
|
|
|
|
382
|
return $cm; |
836
|
|
|
|
|
|
|
} |
837
|
|
|
|
|
|
|
|
838
|
|
|
|
|
|
|
sub in2cm { |
839
|
1
|
50
|
|
1
|
1
|
112
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
840
|
1
|
|
|
|
|
6
|
my $x = Math::BigFloat->new( shift ); |
841
|
1
|
|
33
|
|
|
62
|
my $P = shift || $DECIMALS; |
842
|
1
|
50
|
|
|
|
5
|
return undef unless defined $x; |
843
|
1
|
|
|
|
|
6
|
my $inches = Math::BigFloat->new( $x ); |
844
|
1
|
|
|
|
|
26
|
my $modP = modP ( $P ); |
845
|
1
|
|
|
|
|
5
|
$inches->bmul( 2.54, $modP )->bfround( -$P ); |
846
|
1
|
|
|
|
|
456
|
return $inches; |
847
|
|
|
|
|
|
|
} |
848
|
|
|
|
|
|
|
|
849
|
|
|
|
|
|
|
sub m2ft { |
850
|
1
|
50
|
|
1
|
1
|
91
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
851
|
1
|
|
|
|
|
2
|
my $temp = shift; |
852
|
1
|
|
33
|
|
|
5
|
my $P = shift || $DECIMALS; |
853
|
1
|
50
|
|
|
|
4
|
return undef unless defined $temp; |
854
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
855
|
1
|
|
|
|
|
5
|
my $meters = Math::BigFloat->new( $temp ); |
856
|
1
|
|
|
|
|
125
|
$meters->bmul( 3.280839895, $modP )->bfround( -$P ); |
857
|
1
|
|
|
|
|
441
|
return $meters; |
858
|
|
|
|
|
|
|
} |
859
|
|
|
|
|
|
|
|
860
|
|
|
|
|
|
|
sub ft2m { |
861
|
1
|
50
|
|
1
|
1
|
427
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
862
|
1
|
|
|
|
|
3
|
my $temp = shift; |
863
|
1
|
|
33
|
|
|
5
|
my $P = shift || $DECIMALS; |
864
|
1
|
50
|
|
|
|
4
|
return undef unless defined $temp; |
865
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
866
|
1
|
|
|
|
|
5
|
my $feet = Math::BigFloat->new( $temp ); |
867
|
1
|
|
|
|
|
51
|
$feet->bmul( 0.3048, $modP )->bfround( -$P ); |
868
|
1
|
|
|
|
|
412
|
return $feet; |
869
|
|
|
|
|
|
|
} |
870
|
|
|
|
|
|
|
|
871
|
|
|
|
|
|
|
sub km2miles { |
872
|
1
|
50
|
|
1
|
1
|
164
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
873
|
1
|
|
|
|
|
3
|
my $x = shift; |
874
|
1
|
|
33
|
|
|
9
|
my $P = shift || $DECIMALS; |
875
|
1
|
50
|
|
|
|
115
|
return undef unless defined $x; |
876
|
1
|
|
|
|
|
6
|
my $modP = modP( $P ); |
877
|
1
|
|
|
|
|
167
|
my $miles = Math::BigFloat->new( $x ); |
878
|
1
|
|
|
|
|
142
|
$miles->bmul( 0.6213711922, $modP )->bfround( -$P ); |
879
|
1
|
|
|
|
|
438
|
return $miles; |
880
|
|
|
|
|
|
|
} |
881
|
|
|
|
|
|
|
|
882
|
|
|
|
|
|
|
sub miles2km { |
883
|
1
|
50
|
|
1
|
1
|
947
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
884
|
1
|
|
|
|
|
3
|
my $x = shift; |
885
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
886
|
1
|
50
|
|
|
|
5
|
return undef unless defined $x; |
887
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
888
|
1
|
|
|
|
|
8
|
my $km = Math::BigFloat->new( $x ); |
889
|
1
|
|
|
|
|
150
|
$km->bmul( 1.6093440000966945374266097172311, $modP )->bfround( -$P ); |
890
|
1
|
|
|
|
|
647
|
return $km; |
891
|
|
|
|
|
|
|
} |
892
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
sub kg2lb { |
894
|
1
|
50
|
|
1
|
1
|
342
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
895
|
1
|
|
|
|
|
2
|
my $temp = shift; |
896
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
897
|
1
|
50
|
|
|
|
3
|
return undef unless defined $temp; |
898
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
899
|
1
|
|
|
|
|
5
|
my $kg = Math::BigFloat->new( $temp ); |
900
|
1
|
|
|
|
|
124
|
$kg->bmul( 2.204622622, $modP )->bfround( -$P ); |
901
|
1
|
|
|
|
|
386
|
return $kg; |
902
|
|
|
|
|
|
|
} |
903
|
|
|
|
|
|
|
|
904
|
|
|
|
|
|
|
sub lb2kg { |
905
|
1
|
50
|
|
1
|
1
|
331
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
906
|
1
|
|
|
|
|
3
|
my $temp = shift; |
907
|
1
|
|
33
|
|
|
5
|
my $P = shift || $DECIMALS; |
908
|
1
|
50
|
|
|
|
32
|
return undef unless defined $temp; |
909
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
910
|
1
|
|
|
|
|
6
|
my $lb = Math::BigFloat->new( $temp ); |
911
|
1
|
|
|
|
|
51
|
$lb->bmul( 0.45359237, $modP )->bfround( -$P ); |
912
|
1
|
|
|
|
|
354
|
return $lb; |
913
|
|
|
|
|
|
|
} |
914
|
|
|
|
|
|
|
|
915
|
|
|
|
|
|
|
sub RelativeStride { |
916
|
1
|
50
|
|
1
|
1
|
376
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
917
|
1
|
|
|
|
|
2
|
my $stride_length = shift; |
918
|
1
|
|
|
|
|
3
|
my $leg_length = shift; |
919
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
920
|
1
|
50
|
33
|
|
|
10
|
return undef unless defined $stride_length && defined $leg_length; |
921
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
922
|
1
|
|
|
|
|
5
|
my $rs = Math::BigFloat->new( $stride_length ); |
923
|
1
|
|
|
|
|
94
|
$rs->bdiv( $leg_length, $modP )->bfround( -$P ); |
924
|
1
|
|
|
|
|
551
|
return $rs; |
925
|
|
|
|
|
|
|
} |
926
|
|
|
|
|
|
|
|
927
|
|
|
|
|
|
|
sub RelativeStride_2 { |
928
|
1
|
50
|
|
1
|
1
|
363
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
929
|
1
|
|
|
|
|
3
|
my $temp = shift; |
930
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
931
|
1
|
50
|
|
|
|
5
|
return undef unless defined $temp; |
932
|
1
|
|
|
|
|
10
|
my $modP = modP( $P ); |
933
|
1
|
|
|
|
|
6
|
my $DS = Math::BigFloat->new( $temp ); |
934
|
1
|
|
|
|
|
243
|
$DS->bmul( 1.1, $modP )->badd( 1 )->bfround( -$P ); |
935
|
1
|
|
|
|
|
783
|
return $DS; |
936
|
|
|
|
|
|
|
} |
937
|
|
|
|
|
|
|
|
938
|
|
|
|
|
|
|
sub DimensionlessSpeed { |
939
|
1
|
50
|
|
1
|
1
|
101
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
940
|
1
|
|
|
|
|
3
|
my $temp = shift; |
941
|
1
|
|
33
|
|
|
5
|
my $P = shift || $DECIMALS; |
942
|
1
|
50
|
|
|
|
4
|
return undef unless defined $temp; |
943
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
944
|
1
|
|
|
|
|
5
|
my $RSL = Math::BigFloat->new( $temp ); |
945
|
1
|
|
|
|
|
145
|
$RSL->bsub( 1 )->bdiv( 1.1, $modP )->bfround( -$P ); |
946
|
1
|
|
|
|
|
1150
|
return $RSL; |
947
|
|
|
|
|
|
|
} |
948
|
|
|
|
|
|
|
|
949
|
|
|
|
|
|
|
sub DimensionlessSpeed_2 { |
950
|
1
|
50
|
|
1
|
1
|
90
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
951
|
1
|
|
|
|
|
2
|
my $speed = shift; |
952
|
1
|
|
|
|
|
3
|
my $legLength = shift; |
953
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
954
|
1
|
50
|
33
|
|
|
8
|
return undef unless defined $speed && defined $legLength; |
955
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
956
|
1
|
|
|
|
|
24
|
my $DS = Math::BigFloat->new( $speed ); |
957
|
1
|
|
|
|
|
147
|
my $root = Math::BigFloat->new( $legLength ); |
958
|
1
|
|
|
|
|
70
|
$root->bmul( 9.80665, $modP )->babs(); |
959
|
1
|
|
|
|
|
364
|
my $sqrt = SqrRoot( $root->bstr(), $modP ); |
960
|
1
|
|
|
|
|
280
|
$DS->bdiv( $sqrt->bstr() )->bfround( -$P ); |
961
|
1
|
|
|
|
|
1106
|
return $DS; |
962
|
|
|
|
|
|
|
} |
963
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
sub ActualSpeed { |
965
|
1
|
50
|
|
1
|
1
|
107
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
966
|
1
|
|
|
|
|
5
|
my $legLength = Math::BigFloat->new( shift ); |
967
|
1
|
|
|
|
|
78
|
my $AS = Math::BigFloat->new( shift ); |
968
|
1
|
|
33
|
|
|
154
|
my $P = shift || $DECIMALS; |
969
|
1
|
|
|
|
|
3
|
my $modP = modP( $P ); |
970
|
1
|
|
|
|
|
5
|
$legLength->bmul( 9.80665, $modP )->babs(); |
971
|
1
|
|
|
|
|
364
|
my $root = Root2( $legLength->bstr(), 2, $modP ); |
972
|
1
|
|
|
|
|
390
|
$AS->bmul( $root->bstr(), $modP ); |
973
|
1
|
|
|
|
|
575
|
return $AS->bfround( -$P ); |
974
|
|
|
|
|
|
|
} |
975
|
|
|
|
|
|
|
|
976
|
|
|
|
|
|
|
sub Eccentricity { |
977
|
1
|
50
|
|
1
|
1
|
360
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
978
|
1
|
|
|
|
|
5
|
my $a = Math::BigFloat->new( shift ); |
979
|
1
|
|
|
|
|
76
|
my $b = Math::BigFloat->new( shift ); |
980
|
1
|
|
33
|
|
|
70
|
my $P = shift || $DECIMALS; |
981
|
1
|
|
|
|
|
6
|
my $modP = modP( $P ); |
982
|
1
|
|
|
|
|
4
|
my $root = Math::BigFloat->new(); |
983
|
1
|
|
|
|
|
33
|
my $A = $a->copy(); |
984
|
1
|
|
|
|
|
22
|
$a->bpow( 2 ); |
985
|
1
|
|
|
|
|
365
|
$b->bpow( 2 ); |
986
|
1
|
|
|
|
|
314
|
$a->bsub( $b->copy() )->babs(); |
987
|
1
|
|
|
|
|
228
|
$root = SqrRoot( $a->bstr(), $modP ); |
988
|
1
|
|
|
|
|
242
|
$root /= $A; |
989
|
1
|
|
|
|
|
532
|
return $root->bfround( -$P ); |
990
|
|
|
|
|
|
|
} |
991
|
|
|
|
|
|
|
|
992
|
|
|
|
|
|
|
sub LatusRectum { |
993
|
1
|
50
|
|
1
|
1
|
346
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
994
|
1
|
|
|
|
|
3
|
my $a = shift; |
995
|
1
|
|
|
|
|
2
|
my $b = shift; |
996
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
997
|
1
|
50
|
33
|
|
|
10
|
unless ( $a && $b ) { return undef } |
|
0
|
|
|
|
|
0
|
|
998
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
999
|
1
|
|
|
|
|
6
|
my $result = Math::BigFloat->new( 2 ); |
1000
|
1
|
|
|
|
|
88
|
$result->bmul( $b ** 2, $modP )->bdiv( $a, $modP )->bfround( -$P ); |
1001
|
1
|
|
|
|
|
801
|
return $result; |
1002
|
|
|
|
|
|
|
} |
1003
|
|
|
|
|
|
|
|
1004
|
|
|
|
|
|
|
sub EllipseArea { |
1005
|
1
|
50
|
|
1
|
1
|
402
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1006
|
1
|
|
|
|
|
3
|
my $a = shift; |
1007
|
1
|
|
|
|
|
2
|
my $b = shift; |
1008
|
1
|
|
33
|
|
|
8
|
my $P = shift || $DECIMALS; |
1009
|
1
|
50
|
33
|
|
|
8
|
unless ( $a && $b ) { return undef } |
|
0
|
|
|
|
|
0
|
|
1010
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
1011
|
1
|
|
|
|
|
6
|
my $area = Math::BigFloat->new( $a ); |
1012
|
1
|
|
|
|
|
83
|
$area->bmul( $b, $modP )->bmul( $PI->copy(), $modP )->bfround( -$P ); |
1013
|
1
|
|
|
|
|
2329
|
return $area; |
1014
|
|
|
|
|
|
|
} |
1015
|
|
|
|
|
|
|
|
1016
|
|
|
|
|
|
|
sub OrbitalVelocity { |
1017
|
1
|
50
|
|
1
|
1
|
100
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1018
|
1
|
50
|
|
|
|
5
|
unless ( scalar @_ >= 3 ) { return undef } |
|
0
|
|
|
|
|
0
|
|
1019
|
1
|
|
|
|
|
5
|
my $r = Math::BigFloat->new( shift ); |
1020
|
1
|
|
|
|
|
127
|
my $a = Math::BigFloat->new( shift ); |
1021
|
1
|
|
|
|
|
118
|
my $M = Math::BigFloat->new( shift ); |
1022
|
1
|
|
33
|
|
|
55
|
my $P = shift || $DECIMALS; |
1023
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
1024
|
1
|
|
|
|
|
6
|
my $num = Math::BigFloat->new( 2 ); |
1025
|
1
|
|
|
|
|
68
|
$num->bmul( $_g_, $modP )->bmul( $M, $modP )->bmul( ( ( 1 / $r ) - ( 1 / ( 2 * $a ) ) ), $modP ); |
1026
|
1
|
|
|
|
|
4348
|
my $x = Math::BigFloat->bstr( $num ); |
1027
|
1
|
|
|
|
|
87
|
my $v = SqrRoot( $x, $modP ); |
1028
|
1
|
|
|
|
|
241
|
$v /= 1000000; |
1029
|
1
|
|
|
|
|
752
|
return $v->bfround( -$P ); |
1030
|
|
|
|
|
|
|
} |
1031
|
|
|
|
|
|
|
|
1032
|
|
|
|
|
|
|
sub sin { |
1033
|
5
|
100
|
|
5
|
1
|
1861
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1034
|
5
|
|
|
|
|
13
|
my $x = shift; |
1035
|
5
|
|
66
|
|
|
22
|
my $P = shift || $DECIMALS; |
1036
|
5
|
50
|
|
|
|
18
|
return undef unless defined $x; |
1037
|
5
|
|
|
|
|
10
|
my $num; |
1038
|
5
|
50
|
|
|
|
22
|
if ( ref $x eq "Math::BigFloat" ) { |
1039
|
0
|
|
|
|
|
0
|
$num = $x->copy(); |
1040
|
|
|
|
|
|
|
} else { |
1041
|
5
|
|
|
|
|
23
|
$num = Math::BigFloat->new( $x ); |
1042
|
|
|
|
|
|
|
} |
1043
|
5
|
|
|
|
|
649
|
my $sign = -1; |
1044
|
5
|
|
|
|
|
12
|
my $power = 3; |
1045
|
5
|
|
|
|
|
19
|
my $sin = Math::BigFloat->new(); |
1046
|
5
|
|
|
|
|
748
|
my $current = $num->copy(); |
1047
|
5
|
|
|
|
|
130
|
my $modP = modP( $P ); |
1048
|
5
|
|
|
|
|
25
|
my $factorial = Math::BigFloat->new( 6 ); |
1049
|
5
|
|
|
|
|
432
|
while ( $sin ne $current ) { |
1050
|
250
|
|
|
|
|
46227
|
$sin = $current->copy(); |
1051
|
250
|
|
|
|
|
9878
|
my $numerator = $num->copy()->bpow( $power ); |
1052
|
250
|
|
|
|
|
182491
|
my $denominator = $factorial; |
1053
|
250
|
|
|
|
|
1052
|
my $fraction = $numerator->bdiv( $denominator, $modP )->bmul( $sign ); |
1054
|
250
|
|
|
|
|
511296
|
$current->badd( $fraction ); |
1055
|
250
|
|
|
|
|
112210
|
$factorial->bmul( $power + 1 )->bmul( $power + 2 ); |
1056
|
250
|
|
|
|
|
183934
|
$sign *= -1; |
1057
|
250
|
|
|
|
|
4067
|
$power += 2; |
1058
|
|
|
|
|
|
|
} |
1059
|
5
|
|
|
|
|
643
|
return $current->bfround( -$P ); |
1060
|
|
|
|
|
|
|
} |
1061
|
|
|
|
|
|
|
|
1062
|
|
|
|
|
|
|
sub cos { |
1063
|
7
|
100
|
|
7
|
1
|
1609
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1064
|
7
|
|
|
|
|
19
|
my $x = shift; |
1065
|
7
|
|
66
|
|
|
29
|
my $P = shift || $DECIMALS; |
1066
|
7
|
50
|
|
|
|
28
|
return undef unless defined $x; |
1067
|
7
|
|
|
|
|
13
|
my $num; |
1068
|
7
|
50
|
|
|
|
25
|
if ( ref $x eq "Math::BigFloat" ) { |
1069
|
0
|
|
|
|
|
0
|
$num = $x->copy(); |
1070
|
|
|
|
|
|
|
} else { |
1071
|
7
|
|
|
|
|
34
|
$num = Math::BigFloat->new( $x ); |
1072
|
|
|
|
|
|
|
} |
1073
|
7
|
|
|
|
|
1142
|
my $sign = -1; |
1074
|
7
|
|
|
|
|
14
|
my $power = 2; |
1075
|
7
|
|
|
|
|
25
|
my $cos = Math::BigFloat->new(); |
1076
|
7
|
|
|
|
|
304
|
my $current = Math::BigFloat->new( 1 ); |
1077
|
7
|
|
|
|
|
565
|
my $modP = modP( $P ); |
1078
|
7
|
|
|
|
|
27
|
my $factorial = Math::BigFloat->new( 2 ); |
1079
|
7
|
|
|
|
|
519
|
while ( $cos ne $current ) { |
1080
|
288
|
|
|
|
|
46015
|
$cos = $current->copy(); |
1081
|
288
|
|
|
|
|
13493
|
my $numerator = $num->copy()->bpow( $power ); |
1082
|
288
|
|
|
|
|
200314
|
my $denominator = $factorial; |
1083
|
288
|
|
|
|
|
2110
|
my $fraction = $numerator->bdiv( $denominator, $modP )->bmul( $sign ); |
1084
|
288
|
|
|
|
|
571002
|
$current->badd( $fraction ); |
1085
|
288
|
|
|
|
|
141811
|
$factorial->bmul( $power + 1 )->bmul( $power + 2 ); |
1086
|
288
|
|
|
|
|
181632
|
$sign *= -1; |
1087
|
288
|
|
|
|
|
5559
|
$power += 2; |
1088
|
|
|
|
|
|
|
} |
1089
|
7
|
|
|
|
|
792
|
return $current->bfround( -$P ); |
1090
|
|
|
|
|
|
|
} |
1091
|
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
sub tan { |
1093
|
1
|
50
|
|
1
|
1
|
121
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1094
|
1
|
|
|
|
|
2
|
my $num = shift; |
1095
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
1096
|
1
|
|
|
|
|
2
|
my $modP = modP( $P ); |
1097
|
1
|
|
|
|
|
6
|
my $sin = &sin( $num, $modP ); |
1098
|
1
|
|
|
|
|
237
|
my $tan = Math::BigFloat->new(); |
1099
|
1
|
|
|
|
|
40
|
my $cos = &cos( $num, $modP ); |
1100
|
1
|
|
|
|
|
327
|
$tan = $sin / $cos; |
1101
|
1
|
|
|
|
|
672
|
return $tan->bfround( -$P ); |
1102
|
|
|
|
|
|
|
} |
1103
|
|
|
|
|
|
|
|
1104
|
|
|
|
|
|
|
sub asin { |
1105
|
4
|
100
|
|
4
|
1
|
511
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1106
|
4
|
|
|
|
|
18
|
my $x = Math::BigFloat->new( shift ); |
1107
|
4
|
|
66
|
|
|
645
|
my $P = shift || $DECIMALS; |
1108
|
4
|
|
|
|
|
12
|
my $modP = modP( $P ); |
1109
|
4
|
|
|
|
|
18
|
my $asin = $x->copy(); |
1110
|
4
|
|
|
|
|
85
|
my $i = 3; |
1111
|
4
|
|
|
|
|
10
|
my $last = 0; |
1112
|
4
|
|
|
|
|
20
|
while ( $last ne $asin ) { |
1113
|
97
|
|
|
|
|
14954
|
$last = $asin->copy(); |
1114
|
97
|
|
|
|
|
5131
|
my $frac = $x->copy()->bpow( $i )->bdiv( $i, $modP ); |
1115
|
97
|
|
|
|
|
1270451
|
my $z = $i; |
1116
|
97
|
|
|
|
|
382
|
while ( $z > 1 ) { |
1117
|
1669
|
|
|
|
|
1022297
|
my $n1 = --$z; |
1118
|
1669
|
|
|
|
|
3238
|
my $n2 = --$z; |
1119
|
1669
|
|
|
|
|
5614
|
$frac->bmul( $n2 / $n1, $modP ); |
1120
|
|
|
|
|
|
|
} |
1121
|
97
|
|
|
|
|
52656
|
$asin->badd( $frac ); |
1122
|
97
|
|
|
|
|
61975
|
$i += 2; |
1123
|
|
|
|
|
|
|
} |
1124
|
4
|
|
|
|
|
451
|
return $asin->bfround( -$P ); |
1125
|
|
|
|
|
|
|
} |
1126
|
|
|
|
|
|
|
|
1127
|
|
|
|
|
|
|
sub acos { |
1128
|
2
|
100
|
|
2
|
1
|
407
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1129
|
2
|
|
|
|
|
3
|
my $x = shift; |
1130
|
2
|
|
66
|
|
|
10
|
my $P = shift || $DECIMALS; |
1131
|
2
|
50
|
|
|
|
7
|
return undef unless defined $x; |
1132
|
2
|
50
|
|
|
|
13
|
if ( $x == 0 ) { |
1133
|
0
|
|
|
|
|
0
|
return $PI->copy()->bdiv( 2, $P ); |
1134
|
|
|
|
|
|
|
} |
1135
|
2
|
|
|
|
|
4
|
my $num; |
1136
|
2
|
50
|
|
|
|
10
|
if ( ref $x eq "Math::BigFloat" ) { |
1137
|
0
|
|
|
|
|
0
|
$num = $x->copy(); |
1138
|
|
|
|
|
|
|
} else { |
1139
|
2
|
|
|
|
|
9
|
$num = Math::BigFloat->new( $x ); |
1140
|
|
|
|
|
|
|
} |
1141
|
2
|
|
|
|
|
297
|
my $modP = modP( $P ); |
1142
|
2
|
|
|
|
|
7
|
my $asin = asin( $num->bstr(), $modP ); |
1143
|
2
|
|
|
|
|
493
|
my $acos = $PI->copy()->bdiv( 2, $modP ); |
1144
|
2
|
|
|
|
|
10828
|
$acos->bsub( $asin->bstr() )->bfround( -$P ); |
1145
|
2
|
|
|
|
|
2070
|
return $acos; |
1146
|
|
|
|
|
|
|
} |
1147
|
|
|
|
|
|
|
|
1148
|
|
|
|
|
|
|
sub atan { |
1149
|
2
|
100
|
|
2
|
1
|
142
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1150
|
2
|
|
|
|
|
4
|
my $x = shift; |
1151
|
2
|
|
66
|
|
|
11
|
my $P = shift || $DECIMALS; |
1152
|
2
|
50
|
|
|
|
7
|
return undef unless defined $x; |
1153
|
2
|
|
|
|
|
4
|
my ( $num, $current, $numerator, $fraction, $atan ); |
1154
|
2
|
100
|
|
|
|
8
|
if ( ref( $x ) eq "Math::BigFloat" ) { |
1155
|
1
|
|
|
|
|
6
|
$num = $x->copy(); |
1156
|
1
|
|
|
|
|
23
|
$current = $x->copy(); |
1157
|
|
|
|
|
|
|
} else { |
1158
|
1
|
|
|
|
|
6
|
$num = Math::BigFloat->new( $x ); |
1159
|
1
|
|
|
|
|
155
|
$current = Math::BigFloat->new( $x ); |
1160
|
|
|
|
|
|
|
} |
1161
|
2
|
|
|
|
|
158
|
my $sign = -1; |
1162
|
2
|
|
|
|
|
5
|
my $power = 3; |
1163
|
2
|
|
|
|
|
6
|
my $modP = modP( $P ); |
1164
|
2
|
|
|
|
|
5
|
my $atan2 = 0; |
1165
|
2
|
|
|
|
|
7
|
while ( $atan ne $current ) { |
1166
|
31
|
|
|
|
|
1663
|
$atan = "$current"; |
1167
|
31
|
|
|
|
|
1671
|
$numerator = $num->copy()->bpow( $power ); |
1168
|
31
|
|
|
|
|
12320
|
$fraction = $numerator->bdiv( $power, $modP )->bmul( $sign ); |
1169
|
31
|
|
|
|
|
33780
|
$current->badd( $fraction ); |
1170
|
31
|
|
|
|
|
25532
|
$sign *= -1; |
1171
|
31
|
|
|
|
|
116
|
$power += 2; |
1172
|
|
|
|
|
|
|
} |
1173
|
2
|
|
|
|
|
130
|
return $current->bfround( -$P ); |
1174
|
|
|
|
|
|
|
} |
1175
|
|
|
|
|
|
|
|
1176
|
|
|
|
|
|
|
sub sec { |
1177
|
1
|
50
|
|
1
|
1
|
415
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1178
|
1
|
|
|
|
|
3
|
my $num = shift; |
1179
|
1
|
|
33
|
|
|
8
|
my $P = shift || $DECIMALS; |
1180
|
1
|
50
|
|
|
|
6
|
return undef unless defined $num; |
1181
|
1
|
50
|
|
|
|
5
|
if ( ref $num eq "Math::BigFloat" ) { |
1182
|
0
|
|
|
|
|
0
|
$num = $num->bstr(); |
1183
|
|
|
|
|
|
|
} |
1184
|
1
|
|
|
|
|
5
|
my $modP = modP ( $P ); |
1185
|
1
|
|
|
|
|
5
|
my $cos = &cos( $num, $modP ); |
1186
|
1
|
|
|
|
|
264
|
return Inverse( $cos->bstr(), $P ); |
1187
|
|
|
|
|
|
|
} |
1188
|
|
|
|
|
|
|
|
1189
|
|
|
|
|
|
|
sub asec { |
1190
|
1
|
50
|
|
1
|
1
|
402
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1191
|
1
|
|
|
|
|
4
|
my $x = shift; |
1192
|
1
|
|
33
|
|
|
8
|
my $P = shift || $DECIMALS; |
1193
|
1
|
|
|
|
|
6
|
my $modP = modP( $P ); |
1194
|
1
|
50
|
|
|
|
4
|
return undef unless defined $x; |
1195
|
1
|
|
|
|
|
3
|
my $num; |
1196
|
1
|
50
|
|
|
|
5
|
if ( ref $x eq "Math::BigFloat" ) { |
1197
|
0
|
|
|
|
|
0
|
$num = $x->copy(); |
1198
|
|
|
|
|
|
|
} else { |
1199
|
1
|
|
|
|
|
4
|
$num = Math::BigFloat->new( $x ); |
1200
|
|
|
|
|
|
|
} |
1201
|
1
|
|
|
|
|
157
|
my $inv = Inverse( $x, $modP ); |
1202
|
1
|
|
|
|
|
242
|
my $acos = acos( $inv->bstr(), $modP ); |
1203
|
1
|
|
|
|
|
7
|
return $acos->bfround( -$P ); |
1204
|
|
|
|
|
|
|
} |
1205
|
|
|
|
|
|
|
|
1206
|
|
|
|
|
|
|
sub csc { |
1207
|
1
|
50
|
|
1
|
1
|
415
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1208
|
1
|
|
|
|
|
4
|
my $num = shift; |
1209
|
1
|
|
33
|
|
|
8
|
my $P = shift || $DECIMALS; |
1210
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
1211
|
1
|
|
|
|
|
6
|
my $csc = Math::BigFloat->new( 1 ); |
1212
|
1
|
|
|
|
|
90
|
my $sin = &sin( $num, $modP ); |
1213
|
1
|
|
|
|
|
269
|
return Inverse( $sin->bstr(), $P ); |
1214
|
|
|
|
|
|
|
} |
1215
|
|
|
|
|
|
|
|
1216
|
|
|
|
|
|
|
sub acsc { |
1217
|
1
|
50
|
|
1
|
1
|
15775
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1218
|
1
|
|
|
|
|
5
|
my $x = shift; |
1219
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
1220
|
1
|
50
|
|
|
|
4
|
return undef unless defined $x; |
1221
|
1
|
|
|
|
|
6
|
my $modP = modP( $P ); |
1222
|
1
|
|
|
|
|
7
|
my $inv = Inverse( $x, $modP ); |
1223
|
1
|
|
|
|
|
1332
|
return asin( $inv->bstr(), $P ); |
1224
|
|
|
|
|
|
|
} |
1225
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
sub exsec { |
1227
|
1
|
50
|
|
1
|
1
|
369
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1228
|
1
|
|
|
|
|
3
|
my $x = shift; |
1229
|
1
|
50
|
|
|
|
6
|
return undef unless defined $x; |
1230
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
1231
|
1
|
|
|
|
|
4
|
my $modP = modP( $P ); |
1232
|
1
|
|
|
|
|
6
|
my $cos = &cos( $x, $modP ); |
1233
|
1
|
|
|
|
|
231
|
my $inv = Inverse( $cos->bstr(), $P ); |
1234
|
1
|
|
|
|
|
204
|
$inv->bdec(); |
1235
|
1
|
|
|
|
|
259
|
return $inv; |
1236
|
|
|
|
|
|
|
} |
1237
|
|
|
|
|
|
|
|
1238
|
|
|
|
|
|
|
sub cot { |
1239
|
1
|
50
|
|
1
|
1
|
412
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1240
|
1
|
|
|
|
|
3
|
my $num = shift; |
1241
|
1
|
|
33
|
|
|
10
|
my $P = shift || $DECIMALS; |
1242
|
1
|
50
|
|
|
|
6
|
return undef unless defined $num; |
1243
|
1
|
|
|
|
|
7
|
my $modP = modP ( $P ); |
1244
|
1
|
|
|
|
|
4
|
my $cos = &cos( $num, $modP ); |
1245
|
1
|
|
|
|
|
289
|
my $sin = &sin( $num, $modP ); |
1246
|
1
|
|
|
|
|
301
|
my $cot = Math::BigFloat->new(); |
1247
|
1
|
|
|
|
|
46
|
$cot = $cos / $sin; |
1248
|
1
|
|
|
|
|
2145
|
return $cot->bfround( -$P ); |
1249
|
|
|
|
|
|
|
} |
1250
|
|
|
|
|
|
|
|
1251
|
|
|
|
|
|
|
sub acot { |
1252
|
1
|
50
|
|
1
|
1
|
491
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1253
|
1
|
|
|
|
|
3
|
my $x = shift; |
1254
|
1
|
|
33
|
|
|
8
|
my $P = shift || $DECIMALS; |
1255
|
1
|
50
|
|
|
|
5
|
return undef unless defined $x; |
1256
|
1
|
|
|
|
|
6
|
my $modP = modP( $P ); |
1257
|
1
|
|
|
|
|
6
|
my $num = Math::BigFloat->new( $x ); |
1258
|
1
|
|
|
|
|
224
|
my $atan = atan( $num, $modP ); |
1259
|
1
|
|
|
|
|
294
|
my $acot = $PI->copy()->bdiv( 2, $modP )->bsub( $atan->bstr() ); |
1260
|
1
|
|
|
|
|
6297
|
return $acot->bfround( -$P ); |
1261
|
|
|
|
|
|
|
} |
1262
|
|
|
|
|
|
|
|
1263
|
|
|
|
|
|
|
sub vers { |
1264
|
2
|
100
|
|
2
|
1
|
1327
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1265
|
2
|
|
|
|
|
6
|
my $num = shift; |
1266
|
2
|
|
66
|
|
|
13
|
my $P = shift || $DECIMALS; |
1267
|
2
|
50
|
|
|
|
11
|
return undef unless defined $num; |
1268
|
2
|
|
|
|
|
8
|
my $modP = modP( $P ); |
1269
|
2
|
|
|
|
|
15
|
my $vers = Math::BigFloat->new( 1 ); |
1270
|
2
|
|
|
|
|
216
|
my $cos = &cos( $num, $modP ); |
1271
|
2
|
|
|
|
|
653
|
$vers->bsub( $cos->bstr() ); |
1272
|
2
|
|
|
|
|
1275
|
return $vers->bfround( -$P ); |
1273
|
|
|
|
|
|
|
} |
1274
|
|
|
|
|
|
|
|
1275
|
|
|
|
|
|
|
sub covers { |
1276
|
1
|
50
|
|
1
|
1
|
445
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1277
|
1
|
|
|
|
|
3
|
my $num = shift; |
1278
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
1279
|
1
|
50
|
|
|
|
5
|
return undef unless defined $num; |
1280
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
1281
|
1
|
|
|
|
|
7
|
my $covers = Math::BigFloat->new( 1 ); |
1282
|
1
|
|
|
|
|
89
|
my $sin = &sin( $num, $modP ); |
1283
|
1
|
|
|
|
|
439
|
$covers->bsub( $sin->bstr() ); |
1284
|
1
|
|
|
|
|
624
|
return $covers->bfround( -$P ); |
1285
|
|
|
|
|
|
|
} |
1286
|
|
|
|
|
|
|
|
1287
|
|
|
|
|
|
|
sub hav { |
1288
|
1
|
50
|
|
1
|
1
|
373
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1289
|
1
|
|
|
|
|
3
|
my $num = shift; |
1290
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
1291
|
1
|
50
|
|
|
|
5
|
return undef unless defined $num; |
1292
|
1
|
|
|
|
|
5
|
my $modP = modP( $P ); |
1293
|
1
|
|
|
|
|
5
|
my $vers = vers( $num, $modP ); |
1294
|
1
|
|
|
|
|
271
|
my $hav = $vers / 2; |
1295
|
1
|
|
|
|
|
810
|
return $hav->bfround( -$P ); |
1296
|
|
|
|
|
|
|
} |
1297
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
sub Commas { |
1299
|
1
|
50
|
|
1
|
1
|
543
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1300
|
1
|
|
|
|
|
356
|
local $_ = shift; |
1301
|
1
|
|
|
|
|
25
|
1 while s/^(-?\d+)(\d{3})/$1,$2/; |
1302
|
1
|
|
|
|
|
4
|
return $_; |
1303
|
|
|
|
|
|
|
} |
1304
|
|
|
|
|
|
|
|
1305
|
|
|
|
|
|
|
sub SqrRoot { |
1306
|
16
|
100
|
|
16
|
1
|
785
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1307
|
16
|
|
|
|
|
40
|
my $num = abs( shift ); |
1308
|
16
|
|
66
|
|
|
54
|
my $P = shift || $DECIMALS; |
1309
|
16
|
|
|
|
|
55
|
return Root( $num, 2, $P ); |
1310
|
|
|
|
|
|
|
} |
1311
|
|
|
|
|
|
|
|
1312
|
|
|
|
|
|
|
sub sqrt { |
1313
|
0
|
0
|
|
0
|
1
|
0
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1314
|
0
|
|
|
|
|
0
|
my $num = abs( shift ); |
1315
|
0
|
|
0
|
|
|
0
|
my $P = shift || $DECIMALS; |
1316
|
0
|
|
|
|
|
0
|
return Root( $num, 2, $P ); |
1317
|
|
|
|
|
|
|
} |
1318
|
|
|
|
|
|
|
|
1319
|
|
|
|
|
|
|
sub Root { |
1320
|
17
|
100
|
|
17
|
1
|
82
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1321
|
17
|
|
|
|
|
30
|
my $num = shift; |
1322
|
17
|
|
|
|
|
27
|
my $root = shift; |
1323
|
17
|
|
66
|
|
|
50
|
my $P = shift || $DECIMALS; |
1324
|
17
|
|
|
|
|
48
|
my $modP = modP( $P ); |
1325
|
17
|
50
|
|
|
|
48
|
if ( $num < 0 ) { return undef } |
|
0
|
|
|
|
|
0
|
|
1326
|
17
|
50
|
|
|
|
47
|
if ( $root == 0 ) { return 1 } |
|
0
|
|
|
|
|
0
|
|
1327
|
17
|
|
|
|
|
24
|
my $Num; |
1328
|
17
|
50
|
|
|
|
48
|
if ( ref( $num ) eq "Math::BigFloat" ) { |
1329
|
0
|
|
|
|
|
0
|
$Num = $num->copy(); |
1330
|
|
|
|
|
|
|
} else { |
1331
|
17
|
|
|
|
|
67
|
$Num = Math::BigFloat->new( $num ); |
1332
|
|
|
|
|
|
|
} |
1333
|
17
|
|
|
|
|
2182
|
my $Root = Math::BigFloat->new( $root ); |
1334
|
17
|
|
|
|
|
1249
|
my $current = Math::BigFloat->new()->bfround( -$modP ); |
1335
|
17
|
|
|
|
|
1298
|
my $guess = Math::BigFloat->new( $num ** ( 1 / $root ) )->bfround( -$modP ); |
1336
|
17
|
|
|
|
|
4361
|
my $t = Math::BigFloat->new( $guess ** ( $root - 1 ) ); |
1337
|
|
|
|
|
|
|
{ |
1338
|
17
|
|
|
|
|
4547
|
$current = $guess - ( $guess * $t - $Num ) / ( $Root * $t ); |
|
34
|
|
|
|
|
120
|
|
1339
|
34
|
|
|
|
|
76907
|
$guess =~ /^(.{$P})/; |
1340
|
34
|
|
|
|
|
2257
|
my $x = $1; |
1341
|
34
|
|
|
|
|
205
|
$current =~ /^(.{$P})/; |
1342
|
34
|
|
|
|
|
1960
|
my $y = $1; |
1343
|
34
|
100
|
|
|
|
146
|
last unless $x cmp $y; |
1344
|
17
|
|
|
|
|
63
|
$t = $current ** ( $root - 1 ); |
1345
|
17
|
|
|
|
|
5341
|
$guess = $current->copy(); |
1346
|
17
|
|
|
|
|
383
|
redo; |
1347
|
|
|
|
|
|
|
} |
1348
|
17
|
|
|
|
|
59
|
return $current->bfround( -$P ); |
1349
|
|
|
|
|
|
|
} |
1350
|
|
|
|
|
|
|
|
1351
|
|
|
|
|
|
|
sub Root2 { |
1352
|
2
|
100
|
|
2
|
1
|
593
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1353
|
2
|
|
|
|
|
6
|
my ( $n, $r, $p ) = @_; |
1354
|
2
|
|
|
|
|
4
|
$p++; |
1355
|
2
|
|
|
|
|
9
|
my $log = Ln( $n, $p ) / $r; |
1356
|
2
|
|
|
|
|
2163
|
Exp( $log, $p )->bfround( 1 - $p ); |
1357
|
|
|
|
|
|
|
} |
1358
|
|
|
|
|
|
|
|
1359
|
|
|
|
|
|
|
sub PICONST { |
1360
|
0
|
0
|
|
0
|
1
|
0
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1361
|
0
|
|
|
|
|
0
|
my $max_pi = $PI->length() - 1; |
1362
|
0
|
|
0
|
|
|
0
|
my $P = shift || $DECIMALS; |
1363
|
0
|
0
|
|
|
|
0
|
if ( $P <= $max_pi ) { |
1364
|
0
|
|
|
|
|
0
|
return $max_piconst->copy()->bfround( -$P ); |
1365
|
|
|
|
|
|
|
} |
1366
|
0
|
|
|
|
|
0
|
my $x = Root( 2, 2, $P ); |
1367
|
0
|
|
|
|
|
0
|
my $Pi = 2 + $x; |
1368
|
0
|
|
|
|
|
0
|
my $y = Root2( $x, 2, $P ); |
1369
|
0
|
|
|
|
|
0
|
$x = $y; |
1370
|
|
|
|
|
|
|
{ |
1371
|
0
|
|
|
|
|
0
|
$x = 0.5 * ( $x + 1 / $x ); |
|
0
|
|
|
|
|
0
|
|
1372
|
0
|
|
|
|
|
0
|
my $NewPi = $Pi * ( $x + 1 ) / ( $y + 1 ); |
1373
|
0
|
0
|
|
|
|
0
|
last unless $Pi cmp $NewPi; |
1374
|
0
|
|
|
|
|
0
|
$Pi = $NewPi; |
1375
|
0
|
|
|
|
|
0
|
$x = Root2( $x, 2, $P ); |
1376
|
0
|
|
|
|
|
0
|
$y = ( $y * $x + 1 / $x ) / ( $y + 1 ); |
1377
|
0
|
|
|
|
|
0
|
redo; |
1378
|
|
|
|
|
|
|
} |
1379
|
0
|
|
|
|
|
0
|
return $Pi; |
1380
|
|
|
|
|
|
|
} |
1381
|
|
|
|
|
|
|
|
1382
|
|
|
|
|
|
|
sub ECONST { |
1383
|
2
|
50
|
|
2
|
1
|
11
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1384
|
2
|
|
|
|
|
12
|
my $max_p = $_e_->length() - 1; |
1385
|
2
|
|
33
|
|
|
59
|
my $P = shift || $DECIMALS; |
1386
|
2
|
50
|
|
|
|
9
|
if ( $P <= $max_p ) { |
1387
|
2
|
|
|
|
|
8
|
return $max_econst->copy()->bfround( -$P ); |
1388
|
|
|
|
|
|
|
} |
1389
|
0
|
|
|
|
|
0
|
my $Eps = 0.5 * Math::BigFloat->new( "1" . "0" x $P ); |
1390
|
0
|
|
|
|
|
0
|
my $N = Math::BigFloat->new( "1" )->bfround( -$P ); |
1391
|
0
|
|
|
|
|
0
|
my $D = Math::BigFloat->new( "1" )->bfround( -$P ); |
1392
|
0
|
|
|
|
|
0
|
my $J = Math::BigFloat->new( "1" )->bfround( -$P ); |
1393
|
|
|
|
|
|
|
{ |
1394
|
0
|
|
|
|
|
0
|
$N = $J * $N + 1; |
|
0
|
|
|
|
|
0
|
|
1395
|
0
|
|
|
|
|
0
|
$D = $J * $D; |
1396
|
0
|
0
|
|
|
|
0
|
if ( $D >= $Eps ) { |
1397
|
0
|
|
|
|
|
0
|
$max_p = $P; |
1398
|
0
|
|
|
|
|
0
|
return $max_econst = $N / $D; |
1399
|
|
|
|
|
|
|
} |
1400
|
0
|
|
|
|
|
0
|
$J++; |
1401
|
0
|
|
|
|
|
0
|
redo; |
1402
|
|
|
|
|
|
|
} |
1403
|
|
|
|
|
|
|
} |
1404
|
|
|
|
|
|
|
|
1405
|
|
|
|
|
|
|
sub exp { |
1406
|
0
|
0
|
|
0
|
1
|
0
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1407
|
0
|
|
|
|
|
0
|
my $num = shift; |
1408
|
0
|
|
0
|
|
|
0
|
my $P = shift || $DECIMALS; |
1409
|
0
|
0
|
|
|
|
0
|
return undef unless defined $num; |
1410
|
0
|
|
|
|
|
0
|
return Exp( $num, $P ); |
1411
|
|
|
|
|
|
|
} |
1412
|
|
|
|
|
|
|
|
1413
|
|
|
|
|
|
|
sub Exp { |
1414
|
3
|
100
|
|
3
|
1
|
455
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1415
|
3
|
|
|
|
|
9
|
my $x = shift; |
1416
|
3
|
|
33
|
|
|
13
|
my $P = shift || $DECIMALS; |
1417
|
3
|
|
|
|
|
5
|
my $X; |
1418
|
3
|
100
|
|
|
|
14
|
if ( ref( $x ) eq "Math::BigFloat" ) { |
1419
|
2
|
|
|
|
|
8
|
$X = $x->copy(); |
1420
|
|
|
|
|
|
|
} else { |
1421
|
1
|
|
|
|
|
7
|
$X = Math::BigFloat->new( $x ); |
1422
|
|
|
|
|
|
|
} |
1423
|
3
|
|
|
|
|
236
|
my $modP = modP( $P ); |
1424
|
3
|
|
|
|
|
12
|
$X->bfround( -$modP ); |
1425
|
3
|
|
|
|
|
119
|
my $Y = $X->copy->bfround( 0 ); |
1426
|
3
|
|
|
|
|
1064
|
$Y->bfround( -$modP ); |
1427
|
3
|
50
|
|
|
|
114
|
$Y += ( 0 cmp $X ) if abs( $X - $Y ) > 0.5; |
1428
|
3
|
|
|
|
|
2839
|
$X = $X - $Y; |
1429
|
3
|
|
|
|
|
1233
|
my $Sum = Math::BigFloat->new( "1" )->bfround( -$modP ); |
1430
|
3
|
|
|
|
|
1020
|
my $Term = Math::BigFloat->new( "1" )->bfround( -$modP ); |
1431
|
3
|
|
|
|
|
331
|
my $J = Math::BigFloat->new( "1" )->bfround( -$modP ); |
1432
|
|
|
|
|
|
|
{ |
1433
|
3
|
|
|
|
|
320
|
$Term *= $X / $J; |
|
55
|
|
|
|
|
919
|
|
1434
|
55
|
|
|
|
|
84588
|
my $NewSum = $Sum + $Term; |
1435
|
55
|
100
|
|
|
|
24302
|
last unless $NewSum cmp $Sum; |
1436
|
52
|
|
|
|
|
11953
|
$Sum = $NewSum; |
1437
|
52
|
|
|
|
|
260
|
$J++; |
1438
|
52
|
|
|
|
|
6857
|
redo; |
1439
|
|
|
|
|
|
|
} |
1440
|
3
|
100
|
|
|
|
453
|
return $Sum->bfround(-$P) unless $Y cmp 0; |
1441
|
2
|
|
|
|
|
261
|
my $E = ECONST( $modP ); |
1442
|
2
|
|
|
|
|
2676
|
my $E_Y = 1; |
1443
|
2
|
|
|
|
|
12
|
$E_Y *= $E for 1 .. $Y; |
1444
|
2
|
|
|
|
|
2696
|
$E_Y *= $Sum; |
1445
|
2
|
|
|
|
|
998
|
return $E_Y->bfround(-$P); |
1446
|
|
|
|
|
|
|
} |
1447
|
|
|
|
|
|
|
|
1448
|
|
|
|
|
|
|
sub log { |
1449
|
0
|
0
|
|
0
|
1
|
0
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1450
|
0
|
|
|
|
|
0
|
my $num = abs( shift ); |
1451
|
0
|
|
0
|
|
|
0
|
my $P = shift || $DECIMALS; |
1452
|
0
|
0
|
|
|
|
0
|
return undef unless defined $num; |
1453
|
0
|
|
|
|
|
0
|
return Ln( $num, $P ); |
1454
|
|
|
|
|
|
|
} |
1455
|
|
|
|
|
|
|
|
1456
|
|
|
|
|
|
|
sub Ln { |
1457
|
3
|
100
|
|
3
|
1
|
607
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1458
|
3
|
|
|
|
|
6
|
my $X = shift; |
1459
|
3
|
|
66
|
|
|
17
|
my $P = shift || $DECIMALS; |
1460
|
3
|
50
|
|
|
|
22
|
$X = ref( $X ) ? $X->copy : Math::BigFloat->new( $X ); |
1461
|
3
|
|
|
|
|
583
|
my $modP = sprintf( "%.0f", $P * 1.1 ); |
1462
|
3
|
|
|
|
|
14
|
$X->bfround( -$modP ); |
1463
|
3
|
50
|
|
|
|
272
|
return -Ln( 1 / $X, $P ) if $X < 1; |
1464
|
3
|
|
|
|
|
608
|
my $M = 0; |
1465
|
3
|
|
|
|
|
14
|
++$M until ( 2 ** $M ) > $X; |
1466
|
3
|
|
|
|
|
7151
|
$M--; |
1467
|
3
|
|
|
|
|
18
|
my $Z = $X / ( 2 ** $M ); |
1468
|
3
|
|
|
|
|
2044
|
my $Zeta = ( 1 - $Z ) / ( 1 + $Z ); |
1469
|
3
|
|
|
|
|
6938
|
my $N = $Zeta; |
1470
|
3
|
|
|
|
|
7
|
my $Ln = $Zeta; |
1471
|
3
|
|
|
|
|
12
|
my $Zetasup2 = $Zeta * $Zeta; |
1472
|
3
|
|
|
|
|
1457
|
my $J = 1; |
1473
|
|
|
|
|
|
|
{ |
1474
|
3
|
|
|
|
|
6
|
$N = $N * $Zetasup2; |
|
44
|
|
|
|
|
130
|
|
1475
|
44
|
|
|
|
|
28830
|
my $NewLn = $Ln + $N / ( 2 * $J + 1 ); |
1476
|
44
|
100
|
|
|
|
82123
|
unless ( $NewLn cmp $Ln ) { |
1477
|
3
|
|
|
|
|
428
|
my $ans = $M * LN2P( $modP ) - 2 * $Ln; |
1478
|
3
|
|
|
|
|
8359
|
return $ans->bfround(-$P); |
1479
|
|
|
|
|
|
|
} |
1480
|
41
|
|
|
|
|
5421
|
$Ln = $NewLn; |
1481
|
41
|
|
|
|
|
130
|
$J++; |
1482
|
41
|
|
|
|
|
54
|
redo; |
1483
|
|
|
|
|
|
|
} |
1484
|
|
|
|
|
|
|
} |
1485
|
|
|
|
|
|
|
|
1486
|
|
|
|
|
|
|
sub LN2P { |
1487
|
3
|
50
|
|
3
|
0
|
29
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1488
|
3
|
|
|
|
|
18
|
my $max_p = $max_ln2p->length() - 1; |
1489
|
3
|
|
33
|
|
|
1394
|
my $P = shift || $DECIMALS; |
1490
|
3
|
|
|
|
|
14
|
my $modP = modP( $P ); |
1491
|
3
|
50
|
|
|
|
12
|
if ( $P <= $max_p ) { |
1492
|
3
|
|
|
|
|
14
|
return $max_ln2p->copy->bfround( -$P ); |
1493
|
|
|
|
|
|
|
} |
1494
|
0
|
|
|
|
|
0
|
my $one = Math::BigFloat->new( "1" )->bfround( -$modP ); |
1495
|
0
|
|
|
|
|
0
|
my $N = $one / 3; |
1496
|
0
|
|
|
|
|
0
|
my $Ln = $N->copy(); |
1497
|
0
|
|
|
|
|
0
|
my $Zetasup2 = $one / 9; |
1498
|
0
|
|
|
|
|
0
|
my $J = 1; |
1499
|
|
|
|
|
|
|
{ |
1500
|
0
|
|
|
|
|
0
|
$N->bmul( $Zetasup2 ); |
|
0
|
|
|
|
|
0
|
|
1501
|
0
|
|
|
|
|
0
|
my $NewLn = $Ln + $N / ( 2 * $J + 1 ); |
1502
|
0
|
0
|
|
|
|
0
|
unless ( $NewLn cmp $Ln ) { |
1503
|
0
|
|
|
|
|
0
|
$max_ln2p = $Ln * 2; |
1504
|
0
|
|
|
|
|
0
|
return $max_ln2p->bfround(-$P); |
1505
|
|
|
|
|
|
|
} |
1506
|
0
|
|
|
|
|
0
|
$Ln = $NewLn; |
1507
|
0
|
|
|
|
|
0
|
$J++; |
1508
|
0
|
|
|
|
|
0
|
redo; |
1509
|
|
|
|
|
|
|
} |
1510
|
|
|
|
|
|
|
} |
1511
|
|
|
|
|
|
|
|
1512
|
|
|
|
|
|
|
sub PythagTriples { |
1513
|
1
|
50
|
|
1
|
1
|
513
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1514
|
1
|
|
|
|
|
2
|
my $s = shift; |
1515
|
1
|
|
|
|
|
2
|
my $t = shift; |
1516
|
1
|
|
33
|
|
|
6
|
my $P = shift || $DECIMALS; |
1517
|
1
|
50
|
33
|
|
|
10
|
if ( $s <= 0 || $t <= 0 ) { return undef } |
|
0
|
|
|
|
|
0
|
|
1518
|
1
|
|
|
|
|
8
|
my $x = Math::BigFloat->new( abs( $t ** 2 - $s ** 2 ) )->bfround( -$P ); |
1519
|
1
|
|
|
|
|
116
|
my $y = Math::BigFloat->new( 2 * $s * $t )->bfround( -$P ); |
1520
|
1
|
|
|
|
|
279
|
my $z = Math::BigFloat->new( $t ** 2 + $s ** 2 )->bfround( -$P ); |
1521
|
1
|
|
|
|
|
75
|
return $x, $y, $z; |
1522
|
|
|
|
|
|
|
} |
1523
|
|
|
|
|
|
|
|
1524
|
|
|
|
|
|
|
sub PythagTriplesSeq { |
1525
|
1
|
50
|
|
1
|
1
|
924
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1526
|
1
|
|
|
|
|
3
|
my $s = shift; |
1527
|
1
|
|
|
|
|
3
|
my $t = shift; |
1528
|
1
|
|
33
|
|
|
5
|
my $P = shift || $DECIMALS; |
1529
|
1
|
50
|
33
|
|
|
12
|
if ( $s <= 0 || $t <= 0 ) { return undef } |
|
0
|
|
|
|
|
0
|
|
1530
|
1
|
|
|
|
|
5
|
my $x = Math::BigFloat->new( $s ** 2 ); |
1531
|
1
|
|
|
|
|
54
|
my $y = Math::BigFloat->new( $t ** 2 ); |
1532
|
1
|
|
|
|
|
48
|
my $sum = $x->copy()->badd( $y ); |
1533
|
1
|
|
|
|
|
168
|
return SqrRoot( Math::BigFloat->bstr( $sum ), $P ); |
1534
|
|
|
|
|
|
|
} |
1535
|
|
|
|
|
|
|
|
1536
|
|
|
|
|
|
|
sub SIS { |
1537
|
1
|
50
|
|
1
|
1
|
1015
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1538
|
1
|
|
50
|
|
|
7
|
my $num = shift || 1; |
1539
|
1
|
|
50
|
|
|
5
|
my $nums = shift || 50; |
1540
|
1
|
|
50
|
|
|
9
|
my $inc = shift || 1; |
1541
|
1
|
|
|
|
|
2
|
my @nums; |
1542
|
1
|
|
|
|
|
4
|
push ( @nums, $num ); |
1543
|
1
|
|
|
|
|
8
|
my $next = Math::BigFloat->new( $num + 2 ); |
1544
|
1
|
|
|
|
|
91
|
my $sum = Math::BigFloat->new( $num + $next ); |
1545
|
1
|
|
|
|
|
289
|
for ( 1 .. --$nums ) { |
1546
|
4
|
|
|
|
|
509
|
$num = $next; |
1547
|
4
|
|
|
|
|
5
|
push ( @nums, $next ); |
1548
|
4
|
|
|
|
|
13
|
$next = $sum + $inc; |
1549
|
4
|
|
|
|
|
2318
|
$sum += $next; |
1550
|
|
|
|
|
|
|
} |
1551
|
1
|
|
|
|
|
262
|
return @nums; |
1552
|
|
|
|
|
|
|
} |
1553
|
|
|
|
|
|
|
|
1554
|
|
|
|
|
|
|
sub Inverse { |
1555
|
6
|
100
|
|
6
|
1
|
2061
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1556
|
6
|
|
|
|
|
12
|
my $x = shift; |
1557
|
6
|
|
66
|
|
|
71
|
my $P = shift || $DECIMALS; |
1558
|
6
|
50
|
|
|
|
20
|
return undef unless defined $x; |
1559
|
6
|
|
|
|
|
16
|
my $modP = modP( $P ); |
1560
|
6
|
|
|
|
|
17
|
my $num; |
1561
|
6
|
50
|
|
|
|
22
|
if ( ref $x eq "Math::BigFloat" ) { |
1562
|
0
|
|
|
|
|
0
|
$num = $x->copy(); |
1563
|
|
|
|
|
|
|
} else { |
1564
|
6
|
|
|
|
|
23
|
$num = Math::BigFloat->new( $x ); |
1565
|
|
|
|
|
|
|
} |
1566
|
6
|
|
|
|
|
2070
|
my $inv = Math::BigFloat->new( 1 ); |
1567
|
6
|
|
|
|
|
728
|
$inv->bdiv( $num, $modP ); |
1568
|
6
|
|
|
|
|
3297
|
return $inv->bfround( -$P ); |
1569
|
|
|
|
|
|
|
} |
1570
|
|
|
|
|
|
|
|
1571
|
|
|
|
|
|
|
sub modP { |
1572
|
96
|
|
|
96
|
0
|
167
|
my $num = shift; |
1573
|
96
|
|
|
|
|
241
|
return $num + 5; |
1574
|
|
|
|
|
|
|
} |
1575
|
|
|
|
|
|
|
|
1576
|
|
|
|
|
|
|
sub CONSTANT { |
1577
|
1
|
50
|
|
1
|
0
|
148
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1578
|
1
|
|
|
|
|
3
|
my @const = @_; |
1579
|
1
|
|
|
|
|
4
|
my $prec = 0; |
1580
|
1
|
|
|
|
|
2
|
my $temp; |
1581
|
|
|
|
|
|
|
my @array; |
1582
|
1
|
50
|
|
|
|
8
|
if ( $const[-1] =~ /^\d*$/ ) { |
1583
|
1
|
|
|
|
|
3
|
$prec = pop @const; |
1584
|
|
|
|
|
|
|
} |
1585
|
1
|
|
|
|
|
5
|
foreach $_ ( @const ) { |
1586
|
1
|
50
|
33
|
|
|
13
|
if ( /_gm_/i || /all/i ) { |
1587
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408807538689175212663386222353693179318006076672635443338908659593958290563832266131992829026788067520876689250171169620703222104321626954862629631361443814975870122034080588795445474924618569536486444924104432077134494704956584678850987433944221254487706647809158846074998871240076521705751797883416625624940758906970400028121042762177111777805315317141011704666599146697987317613560067087480710131795236894275219484353056783002287856997829778347845878228911097625003026961561700250464338243776486102838312683303724292675263116533924731671112115881863851331620384005222165791286675294654906811317159934323597349498509040947621322298101726107059611645629909816290555208524790352406020172799747175342777592778625619432082750513121815628551222480939471234145170223735805772786160086883829523045926478780178899219902707769038953219681986151437803149974110692608867429622675756052317277752035361393621076738937645560606059216589466759551900400555908950229530942312482355212212415444006470340565734797663972394949946584578873039623090375033993856210242369025138680414577995698122445747178034173126453220416397232134044449487302315417676893752103068737880344170093954409627955898678723209512426893557309704509595684401755519881921802064052905518934947592600734852282101088194644544222318891319294689622002301443770269923007803085261180754519288770502109684249362713592518760777884665836150238913493333122310533923213624319263728910670503399282265263556209029798642472759772565508615487543574826471814145127000602389016207773224499435308899909501680328112194320481964387675863314798571911397815397807476150772211750826945863932045652098969855567814106968372884058746103378105444390943683583581381131168993855576975484149144534150912954070050194775486163075422641729394680367319805861833918328599130396072014455950449779212076124785645916160837059498786006970189409886400764436170933417270919143365013716"; |
1588
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1589
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1590
|
|
|
|
|
|
|
} |
1591
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1592
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1593
|
|
|
|
|
|
|
} |
1594
|
|
|
|
|
|
|
} |
1595
|
1
|
50
|
33
|
|
|
31
|
if ( /_catalan_/i || /all/i ) { |
1596
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "0.91596559417721901505460351493238411077414937428167213426649811962176301977625476947935651292611510624857442261919619957903589880332585905943159473748115840699533202877331946051903872747816408786590902470648415216300022872764094238825995774150881639747025248201156070764488380787337048990086477511322599713434074854075532307685653357680958352602193823239508007206803557610482357339423191498298361899770690364041808621794110191753274314997823397610551224779530324875371878665828082360570225594194818097535097113157126158042427236364398500173828759779765306837009298087388749561089365977194096872684444166804621624339864838916280448281506273022742073884311722182721904722558705319086857354234985394983099191159673884645086151524996242370437451777372351775440708538464401321748392999947572446199754961975870640074748707014909376788730458699798606448749746438720623851371239273630499850353922392878797906336440323547845358519277777872709060830319943013323167124761587097924554791190921262018548039639342434956537596739494354730014385180705051250748861328564129344959502298722983162894816461622573989476231819542006607188142759497559958983637303767533853381354503127681724011814072153468831683568168639327293677586673925839540618033387830687064901433486017298106992179956530958187157911553956036689036990493966753843775810493189955385516262196253316804016273752130120940604538795076053827123197467900882369178615573389124417223833938148120775994298491724397668575632718068808279982979378849432724934657607490543874819526813074437046294635892810276531705076547974494839948959477092788591195848724127866084088554597823812492260505610094584486698958576871611171786662336847409949385541321093755281815525881591502228244454441718609946588151766496078223678970519269711312571375454370124329673057246845015819313016087766215650957554679666786617082347682558133518681937745650014565261704096074688953930234791980600084245562175108423471736387879369577878440933792219894575340961647424554622478788002922914803690712"; |
1597
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1598
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1599
|
|
|
|
|
|
|
} |
1600
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1601
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1602
|
|
|
|
|
|
|
} |
1603
|
|
|
|
|
|
|
} |
1604
|
1
|
50
|
33
|
|
|
7
|
if ( /_apery_/i || /all/i ) { |
1605
|
1
|
|
|
|
|
7
|
$temp = new Math::BigFloat "1.20205690315959428539973816151144999076498629234049888179227155534183820578631309018645587360933525814619915779526071941849199599867328321377639683720790016145394178294936006671919157552224249424396156390966410329115909578096551465127991840510571525598801543710978110203982753256678760352233698494166181105701471577863949973752378527793703095602570185318279000307654710756304884332086971157374238079344503160762531771453544441183117818224971852635709182448998796203508335756172022603393785870328131267807990054177348691152537065623705744096622171290262732073236149224291304052855537234103307757779806424202430488281521000914602653822069627155202082274335001015294801198690117625951676366998171835575234880703719555742347294083595208861666202572853755813079282586487282173705566196898952662018776810629200817792338135876828426412432431480282173674506720693507626895304345939375032966363775750624733239923482883107733905276802007579843567937115050900502736604711400853350343646722485653151811776618109222791910224883968002666065687051906275973877353574444787753791641427381322569573196020187488474710469933656614008069303256185371886007271853594828847886245041855546408571556300712509027138634689374168266546657729261117182460363056604653004752217032651363910586988578842450413400076174727913718427741087508679050188965396356958643081961372990232749349702416226454339239292672783678655715558177739663771912814182246641268663452811055140131673253668418279295372660503415185270488028902683158334795920387559849886178670059637310157271720001143347673515418825525246632629720253866142593759334901124954451888445879883653237605006862164259284618801137166666350356560100251312752001243465381788522516645056739550573863152637659543028146224230177475011676844571496704880344021307302412787315402904251150919940878348620142801404071621446547887481775826042066673402505321077025830183813299386697331994584062329039605703190927264068388085608407473895683350520941514917330483633047714345825539212218204516560042779"; |
1606
|
1
|
50
|
|
|
|
884
|
if ( $prec ) { |
1607
|
1
|
|
|
|
|
6
|
$temp->bfround( -$prec ); |
1608
|
|
|
|
|
|
|
} |
1609
|
1
|
50
|
|
|
|
1569
|
if ( wantarray ) { |
1610
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1611
|
|
|
|
|
|
|
} |
1612
|
|
|
|
|
|
|
} |
1613
|
1
|
50
|
33
|
|
|
14
|
if ( /_gamma_/i || /all/i ) { |
1614
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "0.57721566490153286060651209008240243104215933593992359880579380974513817815465490800204253092981070122661042345860326928047135164791203948800536606461037345976626826019171409439518699073089342082681115272480646074000944609116161372351563626398584332141045445255931180817233263931404751492309635212264793910054305740237382398192590888596562246640403865322573375012737199489715017633198800855368701197527793558011235088254024640367896574303325878962716603487225275031179009858629238810808962050809520067455082680224906319303106435436009045606431673108916223923423190040278230666282475597561157456466827358396496682688009413716435206727056861387351803685766804293903992265911164881521862119020073349724767061284456884146036064744615108373824011763115970464920405436675762580329560583963444735408889698752182450095288981177450041810756648904797158973756550829956482367512558077410478243365464613480082832289424563397700319507555405116866793330362135883160170752605749442210232264689088158360185921103264127646556897969599278787214257345380787716603498201211893231736410397999823581853335889687416623200928470782748962584090972449329340007986308871514443489019148224047176657926174820342428101040873335655351128574656826084318283564695216594139535628369271429378337337433379686429368401688003555383437291075008327921702577375368037141188793180192584269933204984701562366914646472808066790853122048683498800599411781499587969727029583663306226025115000498496743205991135161767514469471756389224373936066230391750756913421783083438469788717316008107601214614336979590782255534871391388706661385738263517698540450095680405658465359138468527276721930455900430554051676747620967652827322185928446094750362369908488472423752534464421059769032210076173483219811625852956410683745061833659140846327500871722721667257557546723325255507410472504211384839027461378721484740738636819445610096494307626397264106526101612141759589572570377325729026542963991795591864852272592134741602693673095062700415514589022024205056"; |
1615
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1616
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1617
|
|
|
|
|
|
|
} |
1618
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1619
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1620
|
|
|
|
|
|
|
} |
1621
|
|
|
|
|
|
|
} |
1622
|
1
|
50
|
33
|
|
|
11
|
if ( /_khintchine_/i || /all/i ) { |
1623
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515346590528809008289767771641096305179253348325966838185231542133211949962603932852204481940961806866416642893084778806203607370535010336726335772890499042707027234517026252370235458106863185010323746558037750264425248528694682341899491573066189872079941372355000579357366989339508790212446420752897414591476930184490506017934993852254704042033779856398310157090222339100002207725096513324604444391916914608596823482128324622829271012690697418234847767545734898625420339266235186208677813665096965831469952718374480540121953666660496482698908275481152547211773303196759473837193935781060592304018907113496246737068412217946810740608918276695667117166837405904739368809534504899970471763904513432323771510321965150382469888832487093539946960826478181205663494671257843666457974097784836620497777486827656970871631929385128993141995186116737926546205635059513857137616971268722998053276732787105137639563719023145289003058136910904799672757571385043565050641590820999623402779053834180985121278529455415101923273972716796875156245586879771758718269365955450251304196818650938031303858435298686363516207327699768066589087224447928200866225489913933297068356193419225233102502064171141533503247429916507784663858387916406031641983699585984006546488792260661608729245292500798046966253372984581955631152133430603971500916257685064406302588048429495308259622428230270523401977496361785043061562923047970063433750838442657870812777765055245804574026584834104343691031824570657550964215122825303405704026824079955791184653756937399558705407245503084329065125986768185602850521404175676201486584618506998513595754222651824007565424310843506639303023675791283864525364442268496173451042322285580615818211343332191663663651426916459806509174002240402290641026530659304514091234316906333539039761913861815498584776177231773745183069689797687961364339064741256229235947371959033823110561543639353830741004542531"; |
1624
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1625
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1626
|
|
|
|
|
|
|
} |
1627
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1628
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1629
|
|
|
|
|
|
|
} |
1630
|
|
|
|
|
|
|
} |
1631
|
1
|
50
|
33
|
|
|
18
|
if ( /_landau_/i || /_ramanujan_/i || /_lr_/i || /all/i ) { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
1632
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "0.76422365358922066299069873125009232811679054139340951472168667374961464165873285883840150501313123372193726912079259263418742064678084323063315434629380531605171169636177508819961243824994277683469051623513921871962056905329564467041917634977065956990571293866028938589982961051662960890991779298360729736972006403169851286365173473921065768550978681981674707359066921830288751501689624646710918081710618090086517493799082420450570666204898612757713333895484325083035682950407721597524121430942470953115765559404064229125772724071563491218723272555640889999512705135849728552347645942418505999635800934732669411548076911671455813028066898593167493626295259560163215843892463887558347193993864581698751045893518777945872755226448709943505595943671299977780669880564555921300690852242867691102264527531455816088116296997029876937094388422089495290791626363527791432286156863284215944899347183748322904155863814951281527102068249218645827978145098870379211809629840943604891233924014852514327407923660178532707078811584944045092539519718157085780907690772192962552262890529967200510669638584207655081660527132551761150093619010182152039541621744474356571314026496051480322439134457528009739604967190734667398621127034770623094786463721777245551191609693349580116501538146897732947400254272699518373881294004390465050310091210361980535760952228835847669743267507757379848939356645406017251962513826671863828822629657399438626453078913514555113206475947913245582423662405126070382560901984614575152951511943211356814416716008974384391847402590826495013602834007260634108659796382596784136373377680857831279147106417370573337040146024737648200768231118490558678994106995743922457089666910491534089500139419890965785853368531985664042350494746329804481593573838687414276915611134778612290893976432134279879206472381493290546264824907766030881348705331723336407298994245656611424036824812873959790915799781062723446426357233234127834780836022424212901203199698485951429216878840715626887034517436895639117073"; |
1633
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1634
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1635
|
|
|
|
|
|
|
} |
1636
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1637
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1638
|
|
|
|
|
|
|
} |
1639
|
|
|
|
|
|
|
} |
1640
|
1
|
50
|
33
|
|
|
12
|
if ( /_sierpinski_/i || /all/i ) { |
1641
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "2.5849817595792532170658935873831711600880516518526309173215449879719320440011571202111177245270642830313439675271584928060821923187897872299047382419051407714877706637709789429909195090538916174018888831788039474837941321858645411399643090785375197001772338459009456944053756794492374579585597585179674255629788277342303908244843480262486476177584815605758512072553110971230816071780849788881500097806833030977613625019242141160511588550990118827059119218516656116658218146525723473922090837893539685181949438885982596384972943476477372870062514541167941067265109122200895264359146879706881090332595323182513862833772115297045105929773651123477119322088137378396355981597690986669776205753580929932151604999024815911781450614362312734398131562638214155851981996626439748302199986452462457953855125313088680611106070915380230497079775582427852984168946632924118537731025052638887185848026204906420983889401089245443403362540129958473807838153959208083537401553970775472153329227768035176719828981294382970877918341439096416723782335709603207108445520524820489725953913958704083992677439523357417468867744155305621034247542053834049067381062651986166749473771332141368588137842121600803261051984625149759697256509652152510827678630218450123284235823215983358532186222762388342128395782679202593945375516184778819579281898007193722908635995686666472901738758059961533111087477134416091651746860298589917405489412578156737071439005466554727980569541597398523605309831919658877736650415899607456983010590346999086310281901369036616807688073485295874875200896192730898004336728426431758229969326891997729365727971979849493629766039927445616318901564033213832906150701871783495293008326554891249827853248516958090952881854747420204575686195783951958051727205868237631974666042360351571383265906332448659953586584188803129625125027777547500955928437209118570584106256159701299968613543163628083412230815949199322528466660157369540251616007609659383652145974190555337555264511348670765096655113592156822083955"; |
1642
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1643
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1644
|
|
|
|
|
|
|
} |
1645
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1646
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1647
|
|
|
|
|
|
|
} |
1648
|
|
|
|
|
|
|
} |
1649
|
1
|
50
|
33
|
|
|
22
|
if ( /_wilbraham_/i || /_gibbs_/i || /all/i ) { |
|
|
|
33
|
|
|
|
|
1650
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "1.8519370519824661703610533701579913633458097289811549098047837818769818901663483585327103365029547577016843616480071570093724507999019639342272322414165036365074788027757760407005425387045947037548070012549126196000327078575312602462781280151598692712625156658037819170657049819111714215383017286869095002766891969837835648786933759294319175361858839873281361537111741600533650285988928906414670095488877382247112955736673406636533206353917604135172039112403028911351451318386134929257744182407526476030905279207782148560221871814904254471501463635842777947117746613775605839980813601589774035700341407559120370214113987005974964457642432794571720297914619514587500552129836800839402275440787337189077600233378591748197346154415354013755202065349536370774797232235307627711101354680926841172462714308267187960091741576168508046447756294559627846381809450570206315108346086296761158384244642331395026518568824439952885040681806714182600926258083237153223244690004091924289785349238396416174935955727240494968269552946845809079249430987481637553106432748666108251208300982355329789484892215432004091308695606679907614565980645118075299785348720969353909946887244982337583293642008796934457410799803453503483850708482981091242218216243859534562275020112435860924659080184472456129920697558489165392134942490568469061049118625847278188759772510374005405482372866324572279022748900193843433072546840353737116696380141809972845395860023313759602450865523234036167185219941330755467527227101818708316522432071143111039033646408977079116322065177143217096902088039791122531643152182505080070064980216107233022936897562281947118346305483027762905687068773859998729098422829244431023193577879027813710683659782342659876790900757742205098230554650080486761301518847811425034427156656362916286133872434789956033111453170457363680159688876278436595524346040307734465776554486790217538281709048389723416938426939063740559103208012841498333933171221169378991591489862913304490585047568388032591042048255902683612038"; |
1651
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1652
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1653
|
|
|
|
|
|
|
} |
1654
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1655
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1656
|
|
|
|
|
|
|
} |
1657
|
|
|
|
|
|
|
} |
1658
|
1
|
50
|
33
|
|
|
10
|
if ( /_sqrt2_/i || /all/i ) { |
1659
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623091229702492483605585073721264412149709993583141322266592750559275579995050115278206057147010955997160597027453459686201472851741864088919860955232923048430871432145083976260362799525140798968725339654633180882964062061525835239505474575028775996172983557522033753185701135437460340849884716038689997069900481503054402779031645424782306849293691862158057846311159666871301301561856898723723528850926486124949771542183342042856860601468247207714358548741556570696776537202264854470158588016207584749226572260020855844665214583988939443709265918003113882464681570826301005948587040031864803421948972782906410450726368813137398552561173220402450912277002269411275736272804957381089675040183698683684507257993647290607629969413804756548237289971803268024744206292691248590521810044598421505911202494413417285314781058036033710773091828693147101711116839165817268894197587165821521282295184884720896946338628915628827659526351405422676532396946175112916024087155101351504553812875600526314680171274026539694702403005174953188629256313851881634780015693691768818523786840522878376293892143006558695686859645951555016447245098368960368873231143894155766510408839142923381132060524336294853170499157717562285497414389991880217624309652065642118273167262575395947172559346372386322614827426222086711558395999265211762526989175409881593486400834570851814722318142040704265090565323333984364578657967965192672923998753666172159825788602633636178274959942194037777536814262177387991945513972312740668983299898953867288228563786977496625199665835257761989393228453447356947949629521688914854925389047558288345260965240965428893945386466257449275563819644103169798330618520193793849400571563337205480685405758679996701213722394758214263065851322174088323829472876173936474678374319600015921888073478576172522118674904249773669292073110963697216089337086611567345853348332952546758516447107578486024636008"; |
1660
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1661
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1662
|
|
|
|
|
|
|
} |
1663
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1664
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1665
|
|
|
|
|
|
|
} |
1666
|
|
|
|
|
|
|
} |
1667
|
1
|
50
|
33
|
|
|
9
|
if ( /_sqrt3_/i || /all/i ) { |
1668
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614141540670302996994509499895247881165551209437364852809323190230558206797482010108467492326501531234326690332288665067225466892183797122704713166036786158801904998653737985938946765034750657605075661834812960610094760218719032508314582952395983299778982450828871446383291734722416398458785539766795806381835366611084317378089437831610208830552490167002352071114428869599095636579708716849807289949329648428302078640860398873869753758231731783139599298300783870287705391336956331210370726401924910676823119928837564114142201674275210237299427083105989845947598766428889779614783795839022885485290357603385280806438197234466105968972287286526415382266469842002119548415527844118128653450703519165001668929441548084607127714399976292683462957743836189511012714863874697654598245178855097537901388066496191196222295711055524292372319219773826256163146884203285371668293864961191704973883639549593814575767185337363312591089965542462483478719760523599776919232357022030530284038591541497107242955920670620250952017596318587276635997528366343108015066585371064732853862592226058222051040368027029750479872807946165810041705268194001909573346217594389367024932042269103436981246372011118526108426891029972031120210006350717637458240520384755519727993379761490610789498554422332600401885130363156114488684728158928816324518726506664538487759916257664287211124084206801676351710010294318071551519096164246090703940812921690351749296136400413967043104125363232703092257732796029237659774553709546911574214042423078199232761740190642451245487751686269610533369421621360539460424565414012853300781363344985673640670397734222981196104292553450160140594047954715453454840727173765626236654916664023300601326574407010783685846845231316046775448050040224063991197036221860292023886715071101716940029686875966350004089531621423342522795683406701347018590202836071676214774349344956359580808213044258646946852261"; |
1669
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1670
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1671
|
|
|
|
|
|
|
} |
1672
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1673
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1674
|
|
|
|
|
|
|
} |
1675
|
|
|
|
|
|
|
} |
1676
|
1
|
50
|
33
|
|
|
9
|
if ( /_sqrt5_/i || /all/i ) { |
1677
|
0
|
|
|
|
|
0
|
$temp = new Math::BigFloat "2.23606797749978969640917366873127623544061835961152572427089724541052092563780489941441440837878227496950817615077378350425326772444707386358636012153345270886677817319187916581127664532263985658053576135041753378500342339241406444208643253909725259262722887629951740244068161177590890949849237139072972889848208864154268989409913169357701974867888442508975413295618317692149997742480153043411503595766833251249881517813940800056242085524354223555610630634282023409333198293395974635227120134174961420263590473788550438968706113566004575713995659556695691756457822195250006053923123400500928676487552972205676625366607448585350526233067849463342224231763727702663240768010444331582573350589309813622634319868647194698997018081895242644596203452214119223291259819632581110417049580704812040345599494350685555185557251238864165501026243631257102444961878942468290340447471611545572320173767659046091852957560357798439805415538077906439363972302875606299948221385217734859245351512104634555504070722787242153477875291121212118433178933519103800801111817900459061884624964710424424830888012940681131469595327944789899893169157746079246180750067987712420484738050277360829155991396244891494356068346252906440832794464268088898974604630835353787504206137475760688340187908819255911797357446419024853787114619409019191368803511039763843604128105811037869895185201469704564202176389289088444637782638589379244004602887540539846015606170522361509038577541004219368498725427185037521555769331672300477826986666244621067846427248638527457821341006798564530527112418059597284945519545131017230975087149652943628290254001204778032415546448998870617799819003360656224388640963928775351726629597143822795630795614952301544423501653891727864091304197939711135628213936745768117492206756210888781887367167162762262337987711153950968298289068301825908140100389550972326150845283458789360734639611723667836657198260792144028911900899558424152249571291832321674118997572013940378819772801528872341866834541838286730027432"; |
1678
|
0
|
0
|
|
|
|
0
|
if ( $prec ) { |
1679
|
0
|
|
|
|
|
0
|
$temp->bfround( -$prec ); |
1680
|
|
|
|
|
|
|
} |
1681
|
0
|
0
|
|
|
|
0
|
if ( wantarray ) { |
1682
|
0
|
|
|
|
|
0
|
push ( @array, $temp ); |
1683
|
|
|
|
|
|
|
} |
1684
|
|
|
|
|
|
|
} |
1685
|
|
|
|
|
|
|
} |
1686
|
1
|
50
|
|
|
|
10
|
return wantarray ? @array : $temp; |
1687
|
|
|
|
|
|
|
} |
1688
|
|
|
|
|
|
|
|
1689
|
|
|
|
|
|
|
sub Bernoulli { |
1690
|
1
|
50
|
|
1
|
1
|
12771
|
shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ ); |
1691
|
1
|
|
50
|
|
|
10
|
my $n = shift || return undef; |
1692
|
1
|
50
|
33
|
|
|
23
|
if ( $n > 498 || $n < 2 || $n % 2 ) { return undef } |
|
0
|
|
33
|
|
|
0
|
|
1693
|
1
|
|
|
|
|
184
|
my @bernoulli = ( |
1694
|
|
|
|
|
|
|
"1","6", |
1695
|
|
|
|
|
|
|
"-1","30", |
1696
|
|
|
|
|
|
|
"1","42", |
1697
|
|
|
|
|
|
|
"-1","30", |
1698
|
|
|
|
|
|
|
"5","66", |
1699
|
|
|
|
|
|
|
"-691","2730", |
1700
|
|
|
|
|
|
|
"7","6", |
1701
|
|
|
|
|
|
|
"-3617","510", |
1702
|
|
|
|
|
|
|
"43867","798", |
1703
|
|
|
|
|
|
|
"-174611","330", |
1704
|
|
|
|
|
|
|
"854513","138", |
1705
|
|
|
|
|
|
|
"-236364091","2730", |
1706
|
|
|
|
|
|
|
"8553103","6", |
1707
|
|
|
|
|
|
|
"-23749461029","870", |
1708
|
|
|
|
|
|
|
"8615841276005","14322", |
1709
|
|
|
|
|
|
|
"-7709321041217","510", |
1710
|
|
|
|
|
|
|
"2577687858367","6", |
1711
|
|
|
|
|
|
|
"-26315271553053477373","1919190", |
1712
|
|
|
|
|
|
|
"2929993913841559","6", |
1713
|
|
|
|
|
|
|
"-261082718496449122051","13530", |
1714
|
|
|
|
|
|
|
"1520097643918070802691","1806", |
1715
|
|
|
|
|
|
|
"-27833269579301024235023","690", |
1716
|
|
|
|
|
|
|
"596451111593912163277961","282", |
1717
|
|
|
|
|
|
|
"-5609403368997817686249127547","46410", |
1718
|
|
|
|
|
|
|
"495057205241079648212477525","66", |
1719
|
|
|
|
|
|
|
"-801165718135489957347924991853","1590", |
1720
|
|
|
|
|
|
|
"29149963634884862421418123812691","798", |
1721
|
|
|
|
|
|
|
"-2479392929313226753685415739663229","870", |
1722
|
|
|
|
|
|
|
"84483613348880041862046775994036021","354", |
1723
|
|
|
|
|
|
|
"-1215233140483755572040304994079820246041491","56786730", |
1724
|
|
|
|
|
|
|
"12300585434086858541953039857403386151","6", |
1725
|
|
|
|
|
|
|
"-106783830147866529886385444979142647942017","510", |
1726
|
|
|
|
|
|
|
"1472600022126335654051619428551932342241899101","64722", |
1727
|
|
|
|
|
|
|
"-78773130858718728141909149208474606244347001","30", |
1728
|
|
|
|
|
|
|
"1505381347333367003803076567377857208511438160235","4686", |
1729
|
|
|
|
|
|
|
"-5827954961669944110438277244641067365282488301844260429","140100870", |
1730
|
|
|
|
|
|
|
"34152417289221168014330073731472635186688307783087","6", |
1731
|
|
|
|
|
|
|
"-24655088825935372707687196040585199904365267828865801","30", |
1732
|
|
|
|
|
|
|
"414846365575400828295179035549542073492199375372400483487","3318", |
1733
|
|
|
|
|
|
|
"-4603784299479457646935574969019046849794257872751288919656867","230010", |
1734
|
|
|
|
|
|
|
"1677014149185145836823154509786269900207736027570253414881613","498", |
1735
|
|
|
|
|
|
|
"-2024576195935290360231131160111731009989917391198090877281083932477","3404310", |
1736
|
|
|
|
|
|
|
"660714619417678653573847847426261496277830686653388931761996983","6", |
1737
|
|
|
|
|
|
|
"-1311426488674017507995511424019311843345750275572028644296919890574047","61410", |
1738
|
|
|
|
|
|
|
"1179057279021082799884123351249215083775254949669647116231545215727922535","272118", |
1739
|
|
|
|
|
|
|
"-1295585948207537527989427828538576749659341483719435143023316326829946247","1410", |
1740
|
|
|
|
|
|
|
"1220813806579744469607301679413201203958508415202696621436215105284649447","6", |
1741
|
|
|
|
|
|
|
"-211600449597266513097597728109824233673043954389060234150638733420050668349987259","4501770", |
1742
|
|
|
|
|
|
|
"67908260672905495624051117546403605607342195728504487509073961249992947058239","6", |
1743
|
|
|
|
|
|
|
"-94598037819122125295227433069493721872702841533066936133385696204311395415197247711","33330", |
1744
|
|
|
|
|
|
|
"3204019410860907078243020782116241775491817197152717450679002501086861530836678158791","4326", |
1745
|
|
|
|
|
|
|
"-319533631363830011287103352796174274671189606078272738327103470162849568365549721224053","1590", |
1746
|
|
|
|
|
|
|
"36373903172617414408151820151593427169231298640581690038930816378281879873386202346572901","642", |
1747
|
|
|
|
|
|
|
"-3469342247847828789552088659323852541399766785760491146870005891371501266319724897592306597338057","209191710", |
1748
|
|
|
|
|
|
|
"7645992940484742892248134246724347500528752413412307906683593870759797606269585779977930217515","1518", |
1749
|
|
|
|
|
|
|
"-2650879602155099713352597214685162014443151499192509896451788427680966756514875515366781203552600109","1671270", |
1750
|
|
|
|
|
|
|
"21737832319369163333310761086652991475721156679090831360806110114933605484234593650904188618562649","42", |
1751
|
|
|
|
|
|
|
"-309553916571842976912513458033841416869004128064329844245504045721008957524571968271388199595754752259","1770", |
1752
|
|
|
|
|
|
|
"366963119969713111534947151585585006684606361080699204301059440676414485045806461889371776354517095799","6", |
1753
|
|
|
|
|
|
|
"-51507486535079109061843996857849983274095170353262675213092869167199297474922985358811329367077682677803282070131","2328255930", |
1754
|
|
|
|
|
|
|
"49633666079262581912532637475990757438722790311060139770309311793150683214100431329033113678098037968564431","6", |
1755
|
|
|
|
|
|
|
"-95876775334247128750774903107542444620578830013297336819553512729358593354435944413631943610268472689094609001","30", |
1756
|
|
|
|
|
|
|
"5556330281949274850616324408918951380525567307126747246796782304333594286400508981287241419934529638692081513802696639","4357878", |
1757
|
|
|
|
|
|
|
"-267754707742548082886954405585282394779291459592551740629978686063357792734863530145362663093519862048495908453718017","510", |
1758
|
|
|
|
|
|
|
"1928215175136130915645299522271596435307611010164728458783733020528548622403504078595174411693893882739334735142562418015","8646", |
1759
|
|
|
|
|
|
|
"-410951945846993378209020486523571938123258077870477502433469747962650070754704863812646392801863686694106805747335370312946831","4206930", |
1760
|
|
|
|
|
|
|
"264590171870717725633635737248879015151254525593168688411918554840667765591690540727987316391252434348664694639349484190167","6", |
1761
|
|
|
|
|
|
|
"-84290226343367405131287578060366193649336612397547435767189206912230442242628212786558235455817749737691517685781164837036649737","4110", |
1762
|
|
|
|
|
|
|
"2694866548990880936043851683724113040849078494664282483862150893060478501559546243423633375693325757795709438325907154973590288136429","274386", |
1763
|
|
|
|
|
|
|
"-3289490986435898803930699548851884006880537476931130981307467085162504802973618096693859598125274741604181467826651144393874696601946049","679470", |
1764
|
|
|
|
|
|
|
"14731853280888589565870080442453214239804217023990642676194878997407546061581643106569966189211748270209483494554402556608073385149191","6", |
1765
|
|
|
|
|
|
|
"-3050244698373607565035155836901726357405007104256566761884191852434851033744761276392695669329626855965183503295793517411526056244431024612640493","2381714790", |
1766
|
|
|
|
|
|
|
"4120570026280114871526113315907864026165545608808541153973817680034790262683524284855810008621905238290240143481403022987037271683989824863","6", |
1767
|
|
|
|
|
|
|
"-1691737145614018979865561095112166189607682852147301400816480675916957871178648433284821493606361235973346584667336181793937950344828557898347149","4470", |
1768
|
|
|
|
|
|
|
"463365579389162741443284425811806264982233725425295799852299807325379315501572305760030594769688296308375193913787703707693010224101613904227979066275","2162622", |
1769
|
|
|
|
|
|
|
"-3737018141155108502105892888491282165837489531488932951768507127182409731328472084456653639812530140212355374618917309552824925858430886313795805601","30", |
1770
|
|
|
|
|
|
|
"10259718682038021051027794238379184461025738652460569233992776489750881337506863808448685054322627708245455888249006715516690124228801409697850408284121","138", |
1771
|
|
|
|
|
|
|
"-81718086083262628510756459753673452313595710396116467582152090596092548699138346942995509488284650803976836337164670494733866559829768848363506624334818961419869","1794590070", |
1772
|
|
|
|
|
|
|
"171672676901153210072183083506103395137513922274029564150500135265308148197358551999205867870374013289728260984269623579880772408522396975250682773558018919","6", |
1773
|
|
|
|
|
|
|
"-4240860794203310376065563492361156949989398087086373214710625778458441940477839981850928830420029285687066701804645453159767402961229305942765784122421197736180867","230010", |
1774
|
|
|
|
|
|
|
"1584451495144416428390934243279426140836596476080786316960222380784239380974799880364363647978168634590418215854419793716549388865905348534375629928732008786233507729","130074", |
1775
|
|
|
|
|
|
|
"-20538064609143216265571979586692646837805331023148645068133372383930344948316600591203926388540940814833173322793804325084945094828524860626092013547281335356200073083","2490", |
1776
|
|
|
|
|
|
|
"5734032969370860921631095311392645731505222358555208498573088911303001784652122964703205752709194193095246308611264121678834250704468082648313788124754168671815815821441","1002", |
1777
|
|
|
|
|
|
|
"-13844828515176396081238346585063517228531109156984345249260453934317772754836791258987516540324983611569758649525983347408589045734176589270143058509026392246407576578281097477","3404310", |
1778
|
|
|
|
|
|
|
"195334207626637530414976779238462234481410337350988427215139995707346979124686918267688171536352650572535330369818176979951931477427594872783018749894699157917782460035894085","66", |
1779
|
|
|
|
|
|
|
"-11443702211333328447187179942991846613008046506032421731755258148665287832264931024781365962633301701773088470841621804328201008020129996955549467573217659587609679405537739509973","5190", |
1780
|
|
|
|
|
|
|
"4166161554662042831884959593250717297395614318182561412048180684077407803317591270831194619293832107482426945655143357909807251852859279483176373435697607639883085093246499347128331","2478", |
1781
|
|
|
|
|
|
|
"-1369347910486705707645621362512824332220360774476594348356938715366608044588614657557436131706543948464159947970464346070253278291989696390096800799614617317655510118710460076077638883999","1043970", |
1782
|
|
|
|
|
|
|
"1124251816617941290026484851206299982774720467712867275292043701618829826708395745459654170718363182143418314514085426692857018428614935412736063946853033094328968069656979232446257101741","1074", |
1783
|
|
|
|
|
|
|
"-6173136454016248924640522272263470960199559328290655337530202055853397791747341312347030141906500993752700612233695954532816018207721731818225290076670213481102834647254685911917265818955932383093313","7225713885390", |
1784
|
|
|
|
|
|
|
"4277269279349192541137304400628629348327468135828402291661683018622451659989595510712915810436238721139546963558655260384328988773219688091443529626531335687951612545946030357929306651006711","6", |
1785
|
|
|
|
|
|
|
"-857321333523056180131194437347933216431403305730705359015465649285681432317514010686029079324479659634642384809061711319481020030715989009140595170556956196762318625529645723516532076273012244047","1410", |
1786
|
|
|
|
|
|
|
"22258646098436968050639602221816385181596567918515338169946670500599612225742487595012775838387331550474751212260636163500086787417640903770807353228157478339547041472679880890292167353534100797481","42", |
1787
|
|
|
|
|
|
|
"-14158277750623758793309386870401397333112823632717478051426522029712001260747920789473711562165031101665618225654329210473605281619696918061316240634857984019071572591940586875558943580878119388321001","30", |
1788
|
|
|
|
|
|
|
"5411555842544259796131885546196787277987837486638756184149141588783989774511509608733429067517383750706299486822702171672522203106730993581242777825864203487238429479957280273093904025319950569633979493395","12606", |
1789
|
|
|
|
|
|
|
"-346465752997582699690191405750952366871923192340955593486485715370392154894102000406980162521728492501917598012711402163530166516991115122131398542029056286959857727373568402417020319761912636411646719477318166587","868841610", |
1790
|
|
|
|
|
|
|
"2269186825161532962833665086968359967389321429297588337232986752409765414223476696863199759981611817660735753831323900456495253961837175924312108872915089534970310604331636484174526399721365966337809334021247","6", |
1791
|
|
|
|
|
|
|
"-62753135110461193672553106699893713603153054153311895305590639107017824640241378480484625554578576142115835788960865534532214560982925549798683762705231316611716668749347221458005671217067357943416524984438771831113","171390", |
1792
|
|
|
|
|
|
|
"88527914861348004968400581010530565220544526400339548429439843908721196349579494069282285662653465989920237253162555666526385826449862863083834096823053048072002986184254693991336699593468906111158296442729034119206322233","244713882", |
1793
|
|
|
|
|
|
|
"-498384049428333414764928632140399662108495887457206674968055822617263669621523687568865802302210999132601412697613279391058654527145340515840099290478026350382802884371712359337984274122861159800280019110197888555893671151","1366530", |
1794
|
|
|
|
|
|
|
"2250525326187264545900714460628885135841050444551247116222631411681549780530233516069957534394574922579290608180427520318235621123686109474343887857944611842438698399885295153935574958275021715116120056995036417537079471","6", |
1795
|
|
|
|
|
|
|
"-110636644250856903590976481422794879200517231299540994715372334521128669716264196333811025709747746193210786820114369025849897345722531098042760530922656878891556664782168465095563132092311332073097630676251482491663634626858373","281190", |
1796
|
|
|
|
|
|
|
"2525292668891404920279427026668969389456388249389889339455604316691573384284678293620100066924361693666444722338743839198221347931651916807651198800935942493038194104759967208073711284671045255047521429204396148980705984836743","6", |
1797
|
|
|
|
|
|
|
"-12407390668433023412711473483696990726334795896412761472587854072142800403373577087021298541061094633377354326966623278849423631924808044397822651135905640812063181221280972334965193338438214107578486417026806166184210160001817890901","27030", |
1798
|
|
|
|
|
|
|
"4708181368529492614110644197951837317202610608341257204206693195241245204360822875910613010433572133227831741097261618833206537519198885812254347219150482005543422997225440204041473518187636442241332621804718967775203938403965710395632762155","9225988926", |
1799
|
|
|
|
|
|
|
"-1856110669947388268389361040689764027464160460436671923253131176853224087741924378432403442710398247642246902212818749685974336641529240178398124235555437625251481044526024910356131819016670047949661636539964662370375622630863327168696307","3210", |
1800
|
|
|
|
|
|
|
"4005748930070152861935826766476856180706477227448622268042052745245798242539770546339789899546160341590069109467023517085578618986055969187202731878271685432460708841118506310943865592568791360294244451765746911808994482063783730693703607","6", |
1801
|
|
|
|
|
|
|
"-11993122770108617858536443322964878003618156069559794803117809279608039120818829088000103355036592864877954563564831932363414886811786054601318517206937549605059298307895591515771731031691422489377098686236263367916404512751010916862894129855138281961","15270994830", |
1802
|
|
|
|
|
|
|
"5646413644023523531472659729552574911763686780871700375627426663366507837122353997075891736706811337698248660838754243486778190331522785903661556458651175061469825204821206611273990250663647381261360659950519735730925202117606150672170127523599","6", |
1803
|
|
|
|
|
|
|
"-8717064809960074651332043679796544474420053189621803209941154764877242575579617540185166306094852502223738126111951612525627910517501081576202264770178546608710937474005742969950212404955732473198451623024108934373488641161751158901712323446768306053","7590", |
1804
|
|
|
|
|
|
|
"13368053158552172665210852539359893340369870651951497976111882891296650008003955172160792457229376320993686817755409436399268291095350295968657381088168219133490277914269064723832062615431730061224649980566693258603099340996988542301914519271322675688591","9366", |
1805
|
|
|
|
|
|
|
"-3018240015081392087620978688311925380399983229633120268872695911807562982111154053235820050168829922189401964755775948260724401542319799566237745986245598102255191922935742610508280966462644022540839619861091049093129359799053781543195492373882916779852781709","1671270", |
1806
|
|
|
|
|
|
|
"3168221108903401670436878558215734893322849540781208738796672473984272484396317849596978630272031342024194689871467916186898192771267438982228710525079886956295106197431401217357893460897221381410667385636049264583380749631776691121592016493432807733153743581","1362", |
1807
|
|
|
|
|
|
|
"-1906502909997888166123201923177385833567729039151413143876271870599057704445939156075718972624235764657102074902610737729027517674632609562387841658709266014329005407533521950744449109807215808770201247724932231495252981632908042371307965561986133763291349835081839","625170", |
1808
|
|
|
|
|
|
|
"12620737044909818561832856090355555624016887319605261762997689571062646649745107532482632213152948299491122977690702642386377706799989565320538433072623252159464115918057294711396625436506736041542403370025258477205101808063594056759977272469883621048184279331863155","3102", |
1809
|
|
|
|
|
|
|
"-2277782962749544647786193093844710000584561145527861043594866852071596440076587235747852022645695523676561694856919437156369375152041285055935622032497285897151359345040171955786899011718891877065760345722163063921177723102631428767500963315657655779698470644544064472947","412410", |
1810
|
|
|
|
|
|
|
"480867224771001697116513683699011649496855159878152931805742068517626950204279499281932407966997815888727039144001177194783700618900740782637516562256421883686495287564849123342843286211825800198337962453448529082007644439295666002669973893196613894216505936316966183107269","63042", |
1811
|
|
|
|
|
|
|
"-321467133590936589398380572003196190798000628347443663674019204361034039315014370869884972981404460888272855773233080186485230316544246541168364468343631969225480324799028067015621769939718443419712110857965409179947456994970687005134042835903494172569465751671057323145801","30", |
1812
|
|
|
|
|
|
|
"21954828084819816230623427376391154946628510524415478471365831649487269438565442138452375719697629394886161086199009071745032148355699097673730377547354631757000924688032674454208386076360699273002129330161098228962653466112032300056534380609136268347425707537340996253935261001","1434", |
1813
|
|
|
|
|
|
|
"-212191008579182060478563837945461872287372869333130175188325135660897759482730035448146388858205966593247205572842356279587190846758925659038643395344396334821348861518596112373605365460921821915409949436456394757252173113308288776951844012432992719925522001911419529928297005743854184672707","9538864545210", |
1814
|
|
|
|
|
|
|
"4535049728315239205021018362829154800039522502549714840841943960634084990270225535043892135549408608572877513963384530325758104248133124392959997485849004663162061065909846598215984547677506961593292880902830325868627515047168286738527241360778218692535254144583771935549805772798793","138", |
1815
|
|
|
|
|
|
|
"-1480677868678810347062135814574727890490996459903153909612611791768134015908900253197632543925157559965099005581639883558125985134242978146873558628010545299879178299856929100217178891524159543673803785481607540954533057560554704283718320006046424881681934129216249889269701182688055001","30", |
1816
|
|
|
|
|
|
|
"262668605206102118430195944953058387315319589613263079853189811674338644589939356676047394737425651989092115424635212785341601958591806782599345416064945113338168378810138043832891536358769753916174695061208903056552776976154338169779827414504134808495078925108569042616724875466536400029203","3486", |
1817
|
|
|
|
|
|
|
"-3507445546375253318342667741949651253516986113349672180095468758145505921133172244240023419466113277413785800736682458966212429373095894934752041434119711352215164597094886530278429206637066302031501412499166263642447542289785723225064437740655097573160922291075175522551466276032634749948001","30", |
1818
|
|
|
|
|
|
|
"3053985414762198703102020975667535181880294373982570358384262712216099013630127381226064671248970168701164841859177635139561220373102316273710980757409295039231697360536736113380473515993580188204966808323201772081668695321316425977503713933894934399351348240918411922863059423248058823372368106375","16566", |
1819
|
|
|
|
|
|
|
"-89774288871630307843644520580598652632613559409413344033893019938898862113876440183943307724290509165539815764354254584162176909463971675189351699717189454959415964995262823025743004001915975128242680213612581748367743077774468104545056300803334120339537905702856877606246855867891786763741486735368783092237","303940201110", |
1820
|
|
|
|
|
|
|
"2884759276650094186013272224259584433367802183845217969121665253431996536437413850716488026971480747022580182931940812035472752343853999483816456012957551120812115224018480617695398681102870535795278832047330709610952952566962354787854087985127629191094880078635434933391568643930279007460403102076327","6", |
1821
|
|
|
|
|
|
|
"-104203435297641800915507592803138769896333127491490532929531166632958450572751929026080533456531382568746630428805839898606131705503722712567379172835813497582706763790263297372586804372654090271412733654409742029405259156130663560412599913831518338400385290760913773448329773518728092595019422753511174189569","131070", |
1822
|
|
|
|
|
|
|
"56081693586889462275051589447484617682656486262465693822181172785524218338951641908717980184709547885060218908068568000776767834360070429300833879662707069272458173745883316346369196270761641325176838738153606175963665383216626724969370509650128327157862121275587666040290047452303859942885949047756404247033","42", |
1823
|
|
|
|
|
|
|
"-5218507479961513801890596392421261361036935624312258325065379143295948300812040703848766095836974598734762472300638625802884257082786883956679824964010841565051175167717451747328911935282639583972372470105587187736495055501208701522099921363239317373617854217050435670713936357978555246779460902210809009009539232173","2291190", |
1824
|
|
|
|
|
|
|
"6225500408881102797510043328034969466304425964851480796588968345345616249056035479080489691323529597769377127237910326626106353639640430862662758276037155818313797361926063056784629357346246050085674910484712331211955483400507386944492614175497512823803191508029088188458205305675244351279445756172428826335261196513","1578", |
1825
|
|
|
|
|
|
|
"-2597900408162896058710572658949818524468219266931291835479959418094890120803707468900281325124704535527442908101022615930505212028093980003061941163493997948367473301269937152541190254678821414979800759785215240308773060568770563333752614741579673909061322574414039421772773951907381124389083123642187877106727324831409104559","374416770", |
1826
|
|
|
|
|
|
|
"74333782054653889423743469213152655799143173104421681719953140280099539295673341397636592724713785397334372991707306538931885461890982390991361955644690371434518008626267056713898856350449471518770634624568188698734199687848634136577815884007651660546155376602651878199847336975669075705029220024942988801596540479832623","6", |
1827
|
|
|
|
|
|
|
"-181215287752963297591649028858266281596159320543301504003425598637697061538040522696126018237983659329700516696739148841351912957174525785315414144429136591554131215700560325949733256954674813149699783016318415338094395743152932542723256830883071638325957369194991055197776850603497527503600109515880553950890416293966947553269","8070", |
1828
|
|
|
|
|
|
|
"3046520935696995573515824242272701117754774305790084108344788704634810391537752246673386049133783821395486096239148415641722199623177956366799133314531041402021345562799254459886856571341036470447536143349353694309187363616222605848012490292828963830868021774140963898080446961958927794750526681977409210580806334902707423302910890705","73743978", |
1829
|
|
|
|
|
|
|
"-5389479287019828859012200442343326192355509012382167997444221939499202340581932428533725140323939479047999949436682248001244967154707104896269136682582392582110484972339408510822230035412430172890925658230152084954903826143390588854318458185729506889417244891371385482660658834892925089584501833253476537744400283864408173645832802729","69870", |
1830
|
|
|
|
|
|
|
"876921640102601760383168273082801324788039055564836901409234298002253995782034121007322766508391364331313364222035613918206397636790569250311165509441010945170696883786500399759308075144882184008248023432975450281978336106603716700929424210717924897570827498252893067062775490058563356806930680935200945326351681714440032862515566687","6", |
1831
|
|
|
|
|
|
|
"-1388182772753480224524259543538426023294781120119840766760993950456297256537536762358314128425435909635398077811882539199662711471185655335807263675649242817349083277475519035786895107126764049407549359856712249235123586468592541328115099760851178135792262280438168965402774928136789551166963401124472782522202058296880872854126156007513528607131","4940319930", |
1832
|
|
|
|
|
|
|
"3288574272791325983707258196648395370596305758341699742238893225440550539879910098002426164478935667759666907669638986616709137799200377160559516125812795457124992507785560266265469172399329113247421069765604730822849303184464007727659407021486798188927253139176046166778181472669994161900278671855691024038916704559966546186751742476372279","6", |
1833
|
|
|
|
|
|
|
"-8490228242595311199119920565849009760217791023572798918266374350550246366225435144540895862924269878096526376888988896473279190955432566511173411205746712397692187887537779437718173050158951105924254322875775498449791436769311967741327489636985694874281460516082075289295724305512800386456299241907049270636679469815489106102786158831873003971980149529","7828173870", |
1834
|
|
|
|
|
|
|
"25875593499348128833220857256544133843109199942629172661571575831896009002717379314993110538912888759932261638883397790531299585084426973156913779915781848556311555818927755071422637872741239146696501724664788565419251002500248036396312656297993421996811407029386847063439782311617981818206546311041142991312322619717261878315979033851316268092742291","11886", |
1835
|
|
|
|
|
|
|
"-132959963583526612558423182997702578242047892089625754241387587021938995020766563989990185987109982064786136276402406795608981540644133005568845598733701027267134930895872207756078937107416605123323092749911180763524271940975157312568091937739185681066178901105822385739566191012805835839265694429000135104051173197039224461050364993416415448157657001","30", |
1836
|
|
|
|
|
|
|
"1262786340764743836543650366374180273258073609841543441787781675688541881984249268360325012510167918286412665710785332495002470256724535451201518584261363284544626088778140281353574806840036456927404244048497506339393258324386379574048562781825209799628261527492591555049229691481538713081331723845462120745928641410668923052992096071568118182416749081409","138", |
1837
|
|
|
|
|
|
|
"-4426158122015997656918081228667589801499808940970897924307086870252646875948841652238923933674489065786806672342321537012751674084821846458685429618183214525289276658012594349154796284960120596423811831259041410965661717709958659062147534583171671141655182016580199364485449629732438469542501153689517957906763036169880300563526920600913900347892060168169080524563821","231026334630", |
1838
|
|
|
|
|
|
|
"158378960459933745353732673983377704622086418682000111407542005580986544145352715435649528631197645211762019722767661122078958064217177336225880988737955740461066476486097551548991955116319546315427449493825430704787375985685635337262886136570504412827663590990198163434342208367501561777230870660164068668650416176368657029205310526817730948015526849382859712055","3894", |
1839
|
|
|
|
|
|
|
"-769496271232217048566454403451119653773906354892060893481293713784107951847019857310739767770463076516560575249619621659718985646126964039659981825577646225301189082287264198134787013538174178383958494473734277012586809351930781277345290942985827690026019144748986116319143448962997698665018791994064217597704711709748695678908604180272686662449493086793580970828093","8790", |
1840
|
|
|
|
|
|
|
"344977368185637380304333898730614153996525419281986770522385915720139215554847760949870834982202303432587625997234795118134923343663265548204594792841811439303451011251437993865656175552484850145014444202587617378736472160288579064961864004275382498994164923679644150818450558302750885234058860046684381556954878962153088786251490404112306387375170114820733240249707147","1806", |
1841
|
|
|
|
|
|
|
"-1888575590158495996440108433926788958859450449505827069108529221911737605491094242128180304966356165162290173103044092702582217959772178183606221416867140355106476799094653551123469827906281690228047604677838808485752658196964935031379587556530427680306537879720377479310817318584744711522453387072627648438830200285728320936098194745411999104991803838665658699650727659349","4470", |
1842
|
|
|
|
|
|
|
"5683175611528696607080062478072501820703250802520963611339740016328084145085898175251616359343168595858108624167762131679681416977895536025003761007598913177279789271071880600643885302907670572288368816385439218707793725555126269377090645484013184046265389329719449523663221529092764894703813815177897980268745011893371899061378940560801507189664711567121796987700152153839","6", |
1843
|
|
|
|
|
|
|
"-1863878995204859011995045341848156066182191846635905937518715320655775958174360523134990756922303410810482600528769479642021001218415879006164302955370460829146434807964717737195356935144151583424833154250047747433575584999029126775186293388721514970183351129809976971603227633930434923843984829580311593372565398574762880028289167635570012415606941367995702212211519561707046505473575241","866054419230", |
1844
|
|
|
|
|
|
|
"29732914652005326308069038299046877228165947489285775398232775554326821654997284254954541436759755619186929818878962419179787160694148360451817997811323189321730570436847238527392204080083670713746104123180927363450365552833743396887002966884296848913481132785586683120732369858597153076261127975076406564459518695821788635361711463230165952857117226399909961673058570176834883271","6", |
1845
|
|
|
|
|
|
|
"-5896752302971586952817880137553548037522952101385717862219869597959540714708235406233632122536677446426246295692119684486036889235399687553979484886254426933587637080451003789769961323298135257953657891721726854085498886402779031921701364180427128346719739542203363106920603436185256970882544947794042043194815113693600814746189709447821507079960920412101317160689806936226622681106017","510", |
1846
|
|
|
|
|
|
|
"689735739192864790938869842200448522491622174065530181755219067505817267965189978776569968680399983089600630968341102178380777713630583306140103562669027424552384203113812510243331805627699809267240054344772443480095752572066698167737729190346148297831547431732607091731942172905658944645576233950351675859756367833238423434368779109181349635099892383418900862720397266277623080279813067604999","25233558", |
1847
|
|
|
|
|
|
|
"-1310028313878567907114692495908315703121191755911131111984360268010339291958527789632281425987720420051304810543373657881574797353695997625625576992435250954115647419075544944736054854015711074248873686155373327776946348644567049129984144807198780234107278733859628145334731952115798551768101817753443736023659080348249001450368140437083583099127029870537678245450148711191680759214684176445667","20010", |
1848
|
|
|
|
|
|
|
"3260606235276851195099437047707916012280054709370077715052312896011476347066426313756906147929976324639617487079038182718315850586912998681890040154101217023601746358548442139356881761209491879344448144235471024519916730280314406401197057752850694124801781598205133338269426259564611182358074475139266646779460335469700559434884540406485299632013344690352700850048935613677493364152601347478976955","20526", |
1849
|
|
|
|
|
|
|
"-219310221923496085124921823808404575155215719519880743817262187359846676808720933963496193287320441312135479981243085410780329920552595746251706979452929554249409283208988310305531179583355242953344731240610852110199480347842183280905881606393786883347661578747110380713468900860626627458517735797820729101052113795399477516376330508889102106163067720003973339359314302749857453315620772706780505888813811597","561706691910", |
1850
|
|
|
|
|
|
|
"5831963211655227469096364047000879785191356939385161602680269994879257080042651495531334620369899431331189755049833242684170073167978643108706019166324688447112227778757784415956624614457808484212568132108937476630344240535741105415692911032767001030027558118855855057952089777910853586423077582781831060554157175555095233630076901455631073919888020711465283697536929732899568769525385745975473155407","6", |
1851
|
|
|
|
|
|
|
"-23306762036180954707239902303733182709978468580325093149239040051634149745258544596562134540960231525935441270015799599621135682414015382311861534597843756730857227145200622246509066032795288017634942726754909458234645264430702930529842456653080378544365215066466596986953601385998432554535709196917229350478449221406496506432167664369239478872974247912601100426306339312275565475595669640092216631914518917","9510", |
1852
|
|
|
|
|
|
|
"28122967090195287981055019523746421026174611154606607881410834553821571195600077156388139504050817072318352135336014937133504488344591033637378875175488860842142200215544952457462251551728305545862703146471647483394138505742989863336231595764600339418866218322681285266901817977284569573044604541872422517736195703069383015638214571378546092320911382385141634160156861783095114673655212399723765743717305197851","4494", |
1853
|
|
|
|
|
|
|
"-3721822981147963543473628721718160389675395897437503779226807860482566691214705959016239951890193486758232537597591642279654459920857716018601998378015710967458002507660860624568924448328452560808376796224541899685756821793434321138838512925307216420554703983171171540795387100799809353390519107647717976213032752752815159815739322121041527686676774334782328158773314452206678687770745486976844581551304048486668867","230010", |
1854
|
|
|
|
|
|
|
"11947011202513683767723104489271471097868501873399758887514336934592822829976646702161909309680237660201998669294617552009638464244432709441651377979627696796385888263305915811924616794303093449550416640107641304231571552322204363229110497299236034396583681906657985198177302972578027688117382447661848083476283296893356637990999976607059658190271101386708876477455968880271181353449021120174672279118531405266405457","282", |
1855
|
|
|
|
|
|
|
"-3829393826694851442367963605345986414644123194149055126713238369521199883032584377556163984602775965899294620028160948209504229098195604243661949859717087550540749941206115020546490009175884700307199551574107407855402424207686775155726579245497021834551699678553804651177095786249593672236240744422195553711332954204942399883879329051596664648871055498926334411033125995310873151284771962309916237507813788879633942447325937291","34098248730", |
1856
|
|
|
|
|
|
|
"1808383072515392862130370135635372000131626793093148880779287649928820293768508592707521055628027708276165829705670838064031068574527612930799078981578676791129015219438793213734036863426110360623900757855812426023541159774905365518756692026508213803668789819570234151094586211640196633499617063941661470860479560003474875427679061750173843509685528353151826146684405535206504936136026796030365288231301797295663647612503","6", |
1857
|
|
|
|
|
|
|
"-2038920955732166704563544675871539298534664548832344594940419211031004686244887980129990722833481906996574995006272283772989552251711645339529824674672295721387444989765197094356625686277258759887529063884063441729464466695304817154879753936013360244814470171255312860420052459456595966677396165132301906628818307744454944935388834925108370678592735494494812411438800013100442226704887804736057100084506757161238437561170752083","2490", |
1858
|
|
|
|
|
|
|
"16450740261761201488286514086666341385844412580813949724000155038308870188720719658119876451207931032748030811189911338403495201879917853940007778344522354341186748832271809821828409298207968739139227014609598106703237472043228932298563800984396865943755795758369082954888437302866500408097109163018555655697695594114688192421141599313689189778427690359665256283948257291245464556741556264558183330312680675299274129472749543281530376155","7305236862", |
1859
|
|
|
|
|
|
|
"-31404740573139387013607323899060788461129734403267877740839079468522117216337083625061725107066347029224470970177830290797457104821060170534363148276651160571699094881049180803660482733644591278636224534484481850814754420273709821201199908209760469191567840252247706876075856090781209456764232767086688491357087469900906692342923336064928179724546370791109956974800789303951709599892246386582961297095349501749155074025993332911366367","5010", |
1860
|
|
|
|
|
|
|
"105959450712139358561614326750678748291627849550191512662380413294068107407247886566713525350838198788534238121678429166419664041236233803606051817627731575939553790154021616196778501189528768078400811107009317850171384096998455082824610437919969197421385189475358775596537026092374519645052975059595487888618614275545703577191947383711761849232715855501325445057452043875112980841528855594013764288125280661970576229405994478822053767","6", |
1861
|
|
|
|
|
|
|
"-110968358518556750910569006059104612436322304793290197896476208195051113971187304256671882613201063543710887491006989203213468862095728086421327649757926706375373160032479060881414285316805050049998250096629298691714712337731033133063244894833650574221421335477496494331790029997128928883270452912343595756835759921082499027715633187483508227173954421007445739076452215234463953952029377612275096135644427285378787750547213980148328191792731369493029","2203871994870", |
1862
|
|
|
|
|
|
|
"871667613876289947152259213998641324359438367113245978510277002562210922288209180150151793852558736029189876363096736208315035600167649273464678134646229708161579214485318416128870291425640987624153304026736765522468963515580422620761261195314156252082303726799452238319359220112879725078451979791840912313059346932550771416018721541922207119333620480831014488368439858212426770461809324187079997350701358985200574078187666941445255865364959","6", |
1863
|
|
|
|
|
|
|
"-139969199374294532188729693702577000000465664934371179035889932037927222630615161871008568258760858093560212970955512057983700284904139662988796471588843837914664871339017278834524915750717069973487760152722966363103180527139199261072959205960570607504345672675033426810959288741490491658133099197637151741354653719448795255505120643394167214213806837785207626077991226383344774422283805854628774864645574223075309564129905544107459811288704862611","330", |
1864
|
|
|
|
|
|
|
"999866869350557363722458479004395830847953169240152118030482972984856254139343285563059710426142001310818604300278555911104883557186325333153917124330048368249458087059040520529706556642732809436335612822769043297715578151918469336944179483860946506334004186007324467864842978559250174108263899703085692274142353761805113570952308838426945093917953996642662776561930695988488695006166233701104386823791719249365863288962981240951731129450241042813203","798", |
1865
|
|
|
|
|
|
|
"-19435667946412236600006355752680318177378018998686558693047046847185922842569405850478643326624807107024135785299799674685846584030230598008329461654964640062557602833521189158599030670653044302429200521250792329717629531968392422269289900710918148435060503372045597753741275339144955223007618411222546697775810780747446478661790743019087588298611993809224843559412437328287256779856482337754827908028601591041648043989896358637724179061858684905231780173","5190", |
1866
|
|
|
|
|
|
|
"23574815095404701575006138342677814737611117002189168884514625588124591088321558700476292561495266316421750730681754426899890383276767887403267480686627676268685966493677023072554534770488586483642062259843015737466820417963854802166458232968082382836216212063844897312505105552626378830504014452088433926239997258280111620289793360632141212087877945966075033938687737132829040482438463044913103827680386355585682702291192692673999705957317036687127526488661","2082", |
1867
|
|
|
|
|
|
|
"-1946958244926408519819928540035312319794025231154312283846941445533833885684884185938663359749293528922631351379885288320544746558558870084671027543542465268801245629638273090846490014696481293058172945225573249920181321736453062629022981688433233577329127459928765113606300176648832109875139888454987326886636880988465878410619882237596781152380489370724295257792104332503696582825373077048086525583941198173749084587321884232599450628448598711165788748886648206781","56213430", |
1868
|
|
|
|
|
|
|
"502172089109637973079905157308517324166048351810351159422375337574332573514046742139861365117790762795398322755462389540876498686325519933386024542998456467504352201616875674226702066988781736776780983675270711591178536297327588046501114273115924942240089195877277170211145955479537604561876530663522061491492548171664129861255728492613537859772665546205365872403842851465588616941966018356565181922169705164734493393477247978508055348618032704534473742084629023675","4686", |
1869
|
|
|
|
|
|
|
"-123595612458163473336102111542838674764831835495331502431774135351050074096606458390189947949855899933224956382090454659506523733852842909886351324966274684823091833542355636103776512914842749831251392589846063826895163366115470020631076054800071496634622909233303706997995125130120515859762839469193960001284685791277467069230539953616534532549898448827387071275667857164787765007253139087944551495091418632200084873393873944046407490699550148256008464127109223283763137247","368521410", |
1870
|
|
|
|
|
|
|
"44586958800126786790452414833451737276485269217604041493957832153847748776691019563443875873891685730191225792159808508144405955278309411839337401759278396174609624192685884123993968501104767184346477939067903846512439522927159649898761965816525286791728854346485686727420275292569511311545587705052888988969140031330003151200601432709893613802729701685072968681090703554561525613786761794587069881004247080811531298610122589066840923344874780872870506826198179146216889","42", |
1871
|
|
|
|
|
|
|
"-18249520604687390491188873019557839254274215818941916557220148305863171323999328631073000715354712349442824804877473011208435647924577393976121564194070391790525169749128982828132077146902780721841387850162775862442199934474879939605150425883830706636702361084052335568869843628198626221242494076538767614229186803516353130263179834649242288787960314531149564506544752097614513847899020629776701115098262552562151629993531946710430672386743677617308205579019072302696542508379","5370", |
1872
|
|
|
|
|
|
|
"23698146493089350432280213985162669959262841111102470546871456237323693618435911411642184657663645971277792033537906347762183635901158641375259341789919760310568146035244593237879245436647800609988327386298127942914981131212727307691555784531721623262685912374782653802898934200911324353096490548706043962852465907958751649549222286885339380268684947173053181005751121488921877337975992137735046528729900037937548187674111044469106308867226010497700021930277136809473041010432321","2154", |
1873
|
|
|
|
|
|
|
"-778920925563520089023277887716919839298513486135455047496265119151473505464734957690937635048394537294415972122421086877478533967411348994474171388256074145035237797802154822761617528172700015731068657547092679836095543042179681364991968425138238530710252585175316218097390905698054739393609117605669741881868029805237983772228322424502491583995084065878787104609542382045050185577023575049548616444750140539582676309391395859436260664778641733708499657047550739325300732722680932200039559718809","21626561658972270", |
1874
|
|
|
|
|
|
|
"715341102258098940319912343996707811685084551356244645540933308810413928160891724298276851619649551829973697033587181069271380692407132317161739109284011945227649892560360729074672778640720680874112214109997197387525352062913504682830983772725393570468326491083187300331970668449041594296073065276692887678729691114916079642579900288026881432235979137544823640729868705093774645241454622836223176904124630526882732099120398430089179339282190314646212515622936459121100998906169917551","6", |
1875
|
|
|
|
|
|
|
"-18399470428456050908014333117886494595730651014055636288722717429950917809500136272557117402977052839042105693597404693257617634201600598895359708213302738206862242849606975947076539483777341046657860376203296993121539300815161693660027527850273081527494673550440357634430596208643360358204371232957151165657607509017253243152916116719712350843286172274487990507840124030754833011930721808729659207188165402273267771908929719004881279785191361391914450528631012111465559730900716078151518537","46110", |
1876
|
|
|
|
|
|
|
"20813243679670197402657864594700362248333105628735574505407748752194329210363364029904045498683920274785904391711886368296491226342074760936891789529952828353712861964615536938434038079631985205838319830159148784466890765577478710750411239086707279314113340423502528151089538256774657292895067372560433868261285932669643784461912885034984352745012134324851266880718011466493208024572308839966018431480701067038072465848677106468318507151450224167148317101357641051334844151154035628560478914687","15414", |
1877
|
|
|
|
|
|
|
"-110725230879881321879568054811797526267115166186538309029826133137308115277324207270571040263441920262386242076342056949047866353534514266980024412370434220187359560062050493440457221035440089226046696014690219122751069156630764313360960761587856716000690131098571105908045239988081704908481660126863809763243757816063349431021332536632587298653399772920535661074013239670953426088742833252653499763654446938447050846790045870317112050534444840968778815676707175954631059728590843972403931253118799","23970", |
1878
|
|
|
|
|
|
|
"1054364681019267121830159662373420279818225480653781839149178920561555806813202030269003305294989784104213489890426332509828119920399712689187184649711689415835280384720994979874232796860338473523737136345243289020296312370876276856303158404225225651223912805235434755784151235675589206423964860803286777387807480810963355146229723274524146948489417884118537852386976826754447246469153480716621041563108596300892747446848622658459755002905969181236655822204297783975692352381312064835994355860201685","66", |
1879
|
|
|
|
|
|
|
"-56868988747972506254659596935683883463716573524427146597376366171981802233487630537261600452515928180502785214820124586232687460333822056190451678107485446400177877446417556715711032055230455854240595868388654451080202675047744244991416192115524025084813812227930163123287145588705727429456779082968390877093897979160965323905993195706278985485896440595636775123847679345910845046714163301325224520710766325936895600819434580574518875433796519293151389916795779147962584026929392606854485528272956190655743","1018290", |
1880
|
|
|
|
|
|
|
"27233521998844117466571164441681703778822231688822656418920849017523981696494911618651082582707143082377020546888216407884466480834780583096823087696141619926246646927066679156637706667759198043548965512948036645725109831717082230384665542660596536212413188407637782216353393129995452568219713750918323446571634462816666446106121343241772625570723451925602179037604045813434065564118195563426039220880907100156027093090547687363620867038635244235643402355449232121698090257432456131056504444320853157345201","138", |
1881
|
|
|
|
|
|
|
"-21144886325968847421136862640933605790730878065158231117894812330764874940817232709655287449203776974910988576503561661800249278991319113309582335281592647442495030553208258548341339318764197461147432848991686338242711098654931144304725148541437215370995347051713517773502906169174089944259231510484935144428438091067266131242394201122670888252772064856423958372374082615970685597386991737179844349495505700142239123902982043714578671787314293339023048726217119025452344630237832665698519639606247957083240801","30", |
1882
|
|
|
|
|
|
|
"4202152324841490851582198491734154054898910989229835692416027795481485467411812516892366095348619673337490550280425989691409092856177027846893427878738640633197809375983848427036487478678839362355759610808529212110936501477008097429319817529927993776215011685533261432410077791728458394351343228912812829117361997697793433448908490531697660725893829519644454139967318758247135377025444352170089166553939801451419735179550891309557305319624844923751198154628001739638691998206529289924753014269328705445340396548203417533","1651635762", |
1883
|
|
|
|
|
|
|
"-585016197049150516429606755440285431916223316191798033687181061470667150509536113671258201054717866226570169976401850360230659699699301963057743166370714339259000981058060988677132844370590538962044247092297537672905410985648312911796535010450651733583075122028847986584025427113069993778348629306554503407744980050377057969061170508810412927919930789637438916383763636475443274955653725558963454824998976936559504337387796596709727547538729277633022545136032386860825147973153846428111580196229784765036789760566304701","63030", |
1884
|
|
|
|
|
|
|
"78631979609289345055469501119395008379118096513723589634568877004799927202495863945986283823608714469880713486237817037414979036031006235383025032476262083964387973243898060840722936009590301165543812264089314197515688838727901018644687053389435289951515626740339208758682375061416597195951759290458697298602770109818453665947288873748972700580769864649544946817207071904078063454972954577208463927530056857030200986057709786810533019838606174872050746460837475834260566055441410395805129523481902672214740177851314801113","2298", |
1885
|
|
|
|
|
|
|
"-110754162756402172153014550168566972984876925083693264831143127544432717811904992984077240231351850620045442158975752476209437945003921292257289655906112174208294630503691959241009346814626779961417257948400146389011140929210993075671069409245612465372014808443841918963732454979635619634196765514065569765406021995951240364020270070411437377187081353045931837302854850452592893523482298799136698133585855070465304605234654821626817847160151252277371211732021978740981118935331815732788765628347320001270460720535171080710693555387","868841610", |
1886
|
|
|
|
|
|
|
"2879114883186609620826723532068276104139845449825894019948530676086618349883233245139084663416929458760597036667413717978530021472148264070597286070616857893183807259158771980877711836973364470227289919568822358886590073234578910075775184060367188577311832614887005612354400063672439629984465735358226535865532910705094242132700635264096296205052370626838252677418749801518077664289390262828965585623070897002640768910479324438878660938953441067263764560452279108930457475258025425810584201571774449957241464340109525100976383","6", |
1887
|
|
|
|
|
|
|
"-21299114788094757397153706724714536413292077775222009197296487570276368549767668483739905654759629794289722059088574391474394384116388842393472198779890845792835783368209072403070166818305644992935634095949389005892015797599060514475400351300665686095027668428158520105490245612578226308332064019874832238296603858849991741989885454092253889660892754436759635904520725519771622791567806625636568537908996210911982475409155309551762403125143065067389753960600797968698009862634474184891040512288957749239742206998790145616588343479389","11670", |
1888
|
|
|
|
|
|
|
"1039554412204304060999050471842935871664238236129525031050621197904673190252061816306076783004652192616133527774723493749394461545816137751676691165637363944930483826319036927422553141330104483296290342476507053344206817648719129001417301179730182909494636606795995576156560517060235847592695182729113023238975218843912996538779543747649999358252604590089345118921257104639445913236211149024538216358616556115899687337155136781007563112551684977465108319504450250735437471011340987371661862741413337000516697089619657504784045957077408711185","148218378", |
1889
|
|
|
|
|
|
|
"-4666956320257517816926480178489878702719387148900232522527912339796188714409776663856362141719980502875970806945762712937180144475887677992558175799481301586019202060028185307056311432687319799854135340241062231395259919629305490635354239890090217072557890791528689479267987496699263598146171495893203013485575227547175970131771602894568516495986613037151863666577390670765165933422564746168996994413125484969251071189411262200344536746879649016328422523901374916569404613335757056186544409616787583076594896302119414868190918059336879970513","171390", |
1890
|
|
|
|
|
|
|
"640808912350356174378073333715330795309912947431801296035514496305956924194050478724997308276302531933458844716623312895516343306208024932183790655351844102967791249508631724180677304236114904329953319103713608769803340518450516179464461284806009110502342220743568034682133273443656465906102058462073733441986152637932219455262690498783033366796807895595451968974170018589790265173871732540219203496470134837096254721957294282692027321105998231580155273075570903000709400332769684568638209079266772432973508791091418552966827434770217964847","6", |
1891
|
|
|
|
|
|
|
"-98872162196656114876533219362632891391774839342005000436956938726481191695417122725991435991920485003784886516420949151408274403750897124053086048470809705387715020563676318491207223028465413318847625119271235350352217955302858427960756286710348612322463571556662841990100314844270405671459605112346068263402145070889841697007530455932282600691314028702416310723147417755942945877131986599840610369192441659461647425950295710718456957848137284733782503430592302360661270817820862416426647830439342025098395116603056716015807642935747540566951812504354652379","233649143825370", |
1892
|
|
|
|
|
|
|
"10161900313215566319953421591388637402328180425349211048816698980319072816903521145345726221163084105611450343443221137527690722856383209708142471452342875346539666863558482835019156804751669116932322755085721460877938790181414341174421583630169802248409852214724801939766701626707662229904797008779706437578874336997303238218116573968772216970036489561373747407630110362020821819680854208929607112013855668348426244596961480597381595137016528270815603652018778457314919825182032768360703403384404569260876760458965758437801728169587522360995301639","6", |
1893
|
|
|
|
|
|
|
"-63783639210289998710088973624588233946566075008131539459746377225328551512763402330278905606150965942861218654753440979855135225080751599455762303374322801376784474875903535720147084146967619965166480436166324915138652313161158459147438440579563255414402868679468643443725452316589751257887343519347376962412796543353378510329227640325960354800434372777469890448460017461964152127411007649663198873691188302850776549851095445319674329831032713432828366945325817352958745749412125525231627662590308189489017131904402298383855303749523779093820302379681027746367","9315635010", |
1894
|
|
|
|
|
|
|
"1174239835539994552190497513182360535032387583605057260007722004883059102557958144704940674287492304226247212849059989833910250445125922032127665436388239538661698487981932513000579577766999325929606223291472664224576178291713742872723127632853994169543584403270186239889883934311766077803787140536031309605772620994720158177432481254737877501095184402972656917745175226661913130878960138618730840741958163788195850901560843232573640710143138001159729682511610291187234554610346621711370121346135534129198492308718185558865166313048808914617330314355609497","42", |
1895
|
|
|
|
|
|
|
"-3459038918426949807320150484933956945853243159595350413053075601122470521916955664973829953506019998422380872167968566067266857401026670310184013796611289015884412134623896705526558633772056365694507697389600886696154015160862337140032194111117938579681157914085424486545326355341017764587852271884318010152210498883089816668030790992239717499457275164513815414692072356653908445653642502944394623033131400812242246305136709927393331111317205972671896631185417486747798871333208226992838344653421293924893416433794558513589011611309370041563779286876725823001","30", |
1896
|
|
|
|
|
|
|
"170003857441113621055924711218201581479060969973774823543550655221015298985029713903581691625806778175064153013683952617568923683195904825491671562597778394848940698100060988046881674679194048284424046096930240621809667552628402886187489064670995742803216624905991737595831860741767548013712391467620520309900241319253287943675129083092747241525094828376937402590205346662298390862562643436019735148452642958172300132516340448730506554851256643796686115524433824609798825320819953662000059899761347431172299049404919145053054118348793890650129877368554102264664237","354", |
1897
|
|
|
|
|
|
|
"-31826882167847269036795264135997035261326106742393531631262513546951621739538129483912871462979086464612269631159787510831358937051013784806855551647371523568233230776308094926266913151377871925647720334390123342313810138336493293789276924639127443823386014514502682882716709333886588047556737429630427737978891250291212164857441066067952971934975332936367526583068834875982474415309122221371543750940258579267452360489050995048217629796997409692793673935051432353130414145045187876172429836566644615416398029958336369046123993446514393441794181039041943485420490171529217309","15755919270", |
1898
|
|
|
|
|
|
|
"47002375233508680615492575022874518250580216595322188118729388581779057270357890909757660925961204865010764157357677339640679419801075529375841405834200075859710151539426985792722765113963198773076233038710305332376160833224527455197843754378242330663125902354233318353062799203163603734366135826055833545210943663972100422012871119726280972153082552774282015316310107675884741591238987329522432070124995685585469794166878230612009713252291615918394199230644202167695522574730295764175556463982949470912949002495605091357997599244798045099081157657094553333043809915382015","5478", |
1899
|
|
|
|
|
|
|
"-1104074382679040449322457640474906559564674033012018040552761693975196623398701263395843134574919063111979334979001689856745801791431844835192880349897217288293513020820761816536292340772895413243616457931467439624320619545324679396693426479472670415005491693729301629890910865952928640236591593400805258179861429283108782677380853799729252550169975507441841656878779871922009807575659278905966164200037561186284335874588669047079319694680280463911923325143499841983743646211629813016265241858462427586701167961402272877528256110590588675820001821779929699856406082793746601","30", |
1900
|
|
|
|
|
|
|
"830966056816864165219563221691255172504816245427194942775778460297239574008254673723276280782798993878568376502765275874049468633347470545478154168815827272595416765071482194437630416545142455883532025709379623773918422191234979559992742090527602639659473260751398640580101548381014113971979542275363074811349527026580264739170503267212543977947471780118824749687917395812884246155157646166836076504356150965742303158590029916282708649948973023160673477590749360021799996465506161348017383225242179003450331850903647117458837892565999818223864269663453594385683125383821474811083023","5213334", |
1901
|
|
|
|
|
|
|
"-18840632174653835864968232583541556084424607654449238363350816356454780409921315489669153042640423571904583615446707687427327682018540206290243741793046153140931788677169249364676259458302231885326120895149522010431725107071591063425627272025446059167464033814661996655342902404678020463898666363623366708637084399729725592271785009331862696316729612579245598615561813162507665448387066401343329999818243511962109583265019621658883154231991893552479038765074765515515428784392050898556152995633956321371743766583910838111997813677461374152418833832478425757962198139801618258600291701","27030", |
1902
|
|
|
|
|
|
|
"177948829071244383748461224300047737954439245366393998814954157666837290036442548237545354559654248140762601235025124016956688571054331709927511568833209554328300942088687575803158770352778902946800416194092364129368960809507136675944946524355529271391513095831833834095214141413201872443533465259338559071060276534081662109185490926535115165429017697889522123426359409741271701359896235732490827288153220352311977810488328925043422296933754175073177948425972950246944493271200423473793223213272148300689418662045121140562185310116950518967585206995379939580805302928813353440147414740763","57822", |
1903
|
|
|
|
|
|
|
"-6126914449391766463123273102284652981370509248391971126816109275821466096976801669348238710361647712578179757979414761992440067232917335164055107920780363262942782633482006999971350591213671109122331751122081373688391335194625200099100643843244514246383231743873282258287892336340426940736781587230644995704054335003998425945469627545685623200550970324534080404065484535299953386337281009271537528001339179644699195404880031646796095372570028624110131487675467842335793522121252328612723178264941963550114480615755660790108038424472918326815297861578110970433546154844146996383907171442617576638221916277","446617991732222310", |
1904
|
|
|
|
|
|
|
"370417641649773203811105792421530317349989434553176611030631322780037740921920903496806496686319103807921979015270437429241936687918394087764863038019578527638851481686403847480960464641545840936004289242306394237365086284210791291343989458767793541220855587660095196948191905734357956461535121861354233393019487098593606068830314737953863466706245485662337370451037774820208643752612698330292374600196793018724057118532300846184682702881492970790966220893763118615367891028920559173128847556946881708070136133779182213573320504698972245409107308503781210793753700634159761806826499289415831","6", |
1905
|
|
|
|
|
|
|
"-900309704889057549412703055487959300250691255243632314995356843469409197586598181836315775665695203810817228257767800995208832223406044287944134381117528642679552487333128252142131375359121793415508211496537834167452784284536412724329064314223405159310288664698829339128075019109308684058290006604682848685269913509631592635991061291910848588896849609801431590823098722376633326783362640890294817117428008250878447534568070706275064939211743430644145531251375121140903646902567865610094036531542192311798685900713287395549217317410664958760801352234360088468504559813801913565013476710034147368107","3210", |
1906
|
|
|
|
|
|
|
"54022537803660305299034619951080701815883244369748020425073564798052876966542443431399087275857901045210724481101594546860129641620399468102807793533371090463155019439376300426001111110082554857406340378848339696012824680258786824575893953186081095194738031315027987901599699063076400850373460929533644671669856383541718682959908309284048987253429549866158169260473899283324734840555471844451471581906629081405048357875350755464695286397907639138344100989311969291336190793916170606327076279174475858929332637620247498179721571404122810497608597392310341741689230018260320576738940580419471886026121","42", |
1907
|
|
|
|
|
|
|
"-178631832601908536171004558032761096296603555642069337022466657948224618220000462860819307447255038425012723042570990636159393162920489265496945881843415223197089039558399046230412722134470564185454526546692168928856644009854678892565378884116563496393911506002791803756925372034984042436244890477408434546164564440123159575118382731762120541349243900708792397436983071602078285813659425066659156365690242457074462226267478374244243395380526750495191218544888861880143020865916520055167383158922400486128739977249726236354738468036532667283720083951543434880992597829033564904575040629182418739065389001","30", |
1908
|
|
|
|
|
|
|
"791452428000395052990463674367408774641299277169449382275797418384963666743647706199968141726577699871535620647877271680371011363641725875016441804003162706216814077280766553803448788712737779201122868425785256450531121303233116813021906603098871081632396261587905577208955217566658493203885877312418398060846091120975165767009344894679683148265158035296420969642632188332444968324025169811975004853721487927435823390089679208323886268818820308870377103259885100640557295098484358112295185600733503211183865432570364543715288518332255545140994972346903247999234036372815320143622542006284391778075614230370915","28446", |
1909
|
|
|
|
|
|
|
"-14750577990707069090892640643627890396790588057597932870361312797605339877218555318290483697927533647647152620207786705312787195868985834595937926758107692208298403338603695989231215167692521223914659443461688651180043473122600527834618929052569980773595567060954830287077779819370475900148020136696922033144977602316267162377565896641961582226753571000379259049438007003714263998786954349001656043288757745179230747108219268158244213583535560775121257993743283335146172958812409641851314398652207671071800026121000251318559834563893238437683153099891646143428578083417759291169439869395337214083816200847999672131739013721","112409792943630", |
1910
|
|
|
|
|
|
|
"3747779487230132491900784839670360702621969953197210049501251358419118141986190115493564102700854690955620245536804192644210548283959203482329576239229460642292110251158496706142540965642461705544532623844725391336993674360586090434899264849404330015359243509766947985382840962057755044491819343032537950612194324352600097426145059000885091707883730246793387324549656578506520410600783165826659781478577755966537904539285939024535631431583555662911156572916830417427298791392192762504813321994018595884981406242206002171583618182559028568019214315784771237935918859841167713230012475726056827372638626381963585567","6", |
1911
|
|
|
|
|
|
|
"-90024360230387232926513776967323326794697521699014742623495978698606015115117275163938036449925194916848722477911818639649193586017040660336424190717814222779195576374240102808595115759449145109628358599211511306846046027111627976699604296466038648254628913968475783753631135765609682725844055075467512860033319632741902401109514097069147699670253945763189080474357381924555174022637039432337932007567967360013189225484557699891500723386807516891972255376800483482791579348941380904127063436404359870716285253826928676282091132256974170075250937201408937099856598602948280585945432968199829410867368026769199252595801","30", |
1912
|
|
|
|
|
|
|
"268255361246337126367778228815259545045868431029437849645589178925638795843497414272945160749514714084165426561127725005493039810079480452517290207498185200717509668055892683546318815665341535697032808106797631781867079778636900617376382054640817598394038676153517033958597909974830544311249490853122270098045783563026899566057862076965478508567587449877041567729076139718636854981066664507897053160317558190734639340443419436918626125596334898307900637096349388220502296543130848656587202710882968136604232104512201075293126007959863944130551986019010434312311477565523149656237135607816533477227160969517648113475415388407","18438", |
1913
|
|
|
|
|
|
|
"-1971549561515498045945281707781358725202052418820469210287100375124408635052889958528421462206148998040363604314916692108315970766317682360194568697651597939992942608607863240436440670587263898825900455009148047595679837461799849465343687138591048044960789240368282898014290879082621858961237901928382366671020037189395193173411370422088058940123720113875828797411348581899556685938975754080936775135639140747303520886284176117348920517204041675362641162399925576576653291783247744987573436710429594592096815313807926352292662762861675065257056115521036077036706726455044401225578559120921795944351508096992367201543994966078858397","27695910", |
1914
|
|
|
|
|
|
|
"934217844394639862121876161182125782629662966798874841047916685310521671553962326103991809647198275117953002131456853984058360472753503867675200497447364861473654065939291320525986944570166180778722315422080724702421323386482784126733369118721815203984881266971497573448614086191554625693617723971683850141789064565402372607797348631247017594179350444633051496340472506374723019936564961282558140233726105870589191017887960191293607258806456016263231512800235871497605920995641449875958591869460832774676734017514779283735936104646380107986104389604327378999649850427118391694149262577932479289635308490619974233553612397882181813","2658", |
1915
|
|
|
|
|
|
|
"-158845135682583637310050414378214595799174539534413035558457927180260655307343938945950776141757261524377755785578389794390713400424204955224064287421714210308705949074744929596932632241358688262813726174958748320025797188191224303535908875129465586234092629175800592249211106320935394054787272761311671502199224520443098879151573888801771623192883526328927129807622792528335792700318705689540933290598347707055522491251314640804320693900281215224262309217387438431268666875059083616022905739177343532424279695920452691897028237708410245697642781733124304062104070106669202262888345577753573178251769219880004565578924500260455594131928657","90709710", |
1916
|
|
|
|
|
|
|
"52820988550912804071451884491873707077611397679084704441786148606552305037050330902476831330763618274617948135285949957728028695870688501651855365293214261665763024004555565085202897776922988749231163862901818153108264790734253251559229193150038194654616836673701295399639842711610882623238385854157477150420529686140635722118527587063478286467506193498289348590140209058848431175257465051090606564081140432276211107220257560552836024246626312132223879207171064190421730933829702220468746118116687590172977326777807226148473634828964585294322560361223896420954749054906526495733099883401725824247665659378641424764700866014787892724263","6", |
1917
|
|
|
|
|
|
|
"-33509969560310951077673300385182939173120218233464878294252193880216174489593173505823838246617056145585882555706860451887313675357842060706217782059762885287365030658978615168275599290138352468354789757259008089648541137547348110439089815672768327313180473534796888815851856313394644427062261422524265399511451721069073409293158382781768172256354047772889044225230507510811482737634673210381142106400974943160605739571810507050337114409751599167906471400307782233953490003352622899793151422802066630790773271959078676470883432223098011999197297967048507289842238199051754189231014498571762573655266437187969662451821328060350075608863875769571341","750400230", |
1918
|
|
|
|
|
|
|
"9391055572765375337084396117314557817718180166181509161271561059129443589397485081513018424705071474206174166639082356181454829444072491877870552062694059378849770958442322223463829270989901750468144609171516219648902784638712130372569713998758894226403154437364546237046936234486878313444740508912905759996491085406313529674400225188471243945850641568659710670402270969430805001894842922440442618558016542494360661268867597331176547554831945263940482855409773467788716571946235493331362953065136196925332392537268524281812660120686916907551456071718059004900562940126515655638458838017179782433551203385736031994621640626329584486625252298313721425","41089818", |
1919
|
|
|
|
|
|
|
"-8036788600329789637554905408606434751151763343827636999239373595458189088012226087443084910869936431803106244357312755090962116368482475276694252905815888538084063223859971526076599239358507163699508542178943276854150562290682856423508900798777112787185623445870747150615150782172422604213843730688721433197193927654307261557625517124764287228841421171512634534585391620401335799765458353101463743603983062786131145017655611914534755704275915462765633857066185411573999789535405190641054970837982446446314245641839258145246102021303507933166787126508119006984137728812640057612823780541560848078401500756860998000273851310662643557278203530509156427","6810", |
1920
|
|
|
|
|
|
|
"36887651095190359395978631707450897701552180104326675120919609694820560648030474979171133539537862210662044736026621541679008373532300695155313150561362479551904410240432070856446263923979299500092444516028968803538104878672539814981236198854450478175391010338000353791751383268673072000938944246515277386132140583257856132696558562847161814996976075174769694748695438632575090586824991284249542651404132205213670261425227222486264304182560679963038720949995579422933796694986011135385677383318542530506241731018476230796808445574699332521366132935744942092063737117719972419446305379041821531028902499051591918182645467840089773846410376436748099927","6", |
1921
|
|
|
|
|
|
|
"-9231251497205337786805280106627035365614237424730160108604924651736976180075798896215248792654225922031690989989936814428616639799004585592248516552105228745115600772090469618649949110864874437364870818222898493364585027928374556652768749981360929058298243205794495656723748164403781748730579086335638752417431277593473211309077070359896017274789066550552469547698979828077256389389589765286385150263946322137435703489322701057413339409715907420401015745559280769997899350755949293570194811595617539775432300877948131084500469766803745905331871839118178605120693482483577762003279580322707699760471279269534859347690610372106577357727353920929624706796074041823","285702690", |
1922
|
|
|
|
|
|
|
"1027825635381261025084137509518564962560728450132223539521526948817353636181702656928583828828717439941582449877622669707429906934288552278291471518913824570952553234368789724603442838567318141441615655257676812187239952554217908948438076178377910225560489116748839886969453337695309781684455928141552611581080216941930192968523416897195063762538557409287539980661256894009392408089358915496977576627225148859236468505369342003480428366798569334698706219583396397757047422466674537196192952267180837549901710490935337309113676890484857602521544773316821275084647927509602731787989854783170081148513873085444058741939360926584684355544622280387129474006982319","6", |
1923
|
|
|
|
|
|
|
"-6550760154113509955322519520324689762818345309330319372044343946911206397745316500483812442237014438941335293944750087907405849513426436624910542114024406950056919447434524096723352448017446297358873710248617421245570015225121262135612027972284197922153718331776532945085169610851088437877134878008919341980631531214431991715959299563428081327762284421994333768251921757188656927704213872171465925501861603885110199062495929817244864046765240300372782070942306808931353298237329193104023648523727135025613272860312485759776097808925561726646874622086120677449738708016595010877049123286575216517173385795826972669505322466175106064791167244415577645190187783109558537","7150110", |
1924
|
|
|
|
|
|
|
"6368886588855890529015573157270243329857473927510055032448029799766753973277733490743802481131249684574480516536707396064341401134831688716527812955468642497995612469570965195817160487421985680788793411096140356661976146745150228102075529102340373723482996983265766606390143860966670113764902836475227042342140853703902690953653738071098617987052339494008437294258743953709135498602090607507693690330811502343804351805921729587694688949530767925472547494085687987805410410505963373499481785590861551304643751957929639863906451583045448988420712969430083368919548554903489673904877295745230080254098114031395040280378645921227902389659674535661931328259201472684713522055433","1288550298", |
1925
|
|
|
|
|
|
|
"-188572988301799749241127705615416162812212213841895020766690762649760470928083270444552850572643956114497215752611047787304109375175847805695151784532184851620320647579855705925496701761448465808354795813973779680808888167818764964700925538842134054390992956001669225520942778629366261309269472085949866705644243058822229069911401050274835800403163105897188918692416516840686738234446171587614205164199212128303162013809506690718962024295099161224082167003915292076143373222944136866167556404170101140178710147326875675233494871699877286279336655831877302931691870727029196060937873178589575033953909097962613832380524097498719417990532304114093172036385627503846689476887699","7010970", |
1926
|
|
|
|
|
|
|
"413664867987222956244209355804553132010737311619873937552617773013514076367023256312176160835062661892330568050774492900833764272232882273128949537336490168744752502048943049241434525025420643944559491826884487174091266835019079457750298308269731643882842579624683236689298288625957015934020852065186333120537819299541510992711232749590370342660947186143661434743740645683801183663840994358198551336011498396150912151423938206307866725487635171065947029616755552973030152102744795495331947296938243287814790516243968203740094323906300807997945263580249967044922095488324059855868304323339162224087731767838889133184638682384777584272685488996638922752221799803151101166568141","2802", |
1927
|
|
|
|
|
|
|
"-1031107841715829258343463911912030698033011526937248355743056689674697602723540112990172956648590063031143260600724004347065027947507100488450593390705595096537384272550134562580809036689346664720973019306107636742232165503223693884139986374204369981544077656811163988149479258369895200746359684803254154401124622678491322587940166253688363451761279210145812935556959005617096357884154904315169217040557989251752098016262897990226072225936970292748900280469462419239068829802849814616525273947160256662458312243507612184481586372693712226732955571148746164223940290646509705984881548422992991644255618458312931517172972824955609103863870050004830358982153156128215328921678827090764016307","1261596819210", |
1928
|
|
|
|
|
|
|
"301188512670574409973522039731799774332284237966284386701245748565406164428681036128926063056095855532173991462477799681429260898037617758622985941710976235577943559100259786932475830383970536995316845412258295246742979426181833225367398491810295210078233611825547244385629725708901995508766557190851612705431746456650510895626334976810141560416672624945285953742157497174172068239724208754377218814505115022247180573164262593883452362474468782982223281207823275802362572430210812017251300349771480681113489830696638136842926883664618708287688430079713258060558978096084995295625323965331459365135957743350303225791768643943305879602716567061428469743627314569410061103860282955485","66", |
1929
|
|
|
|
|
|
|
"-770937004570847542710916650565931789612450235859854061364164699012203056638918055135259895416107273426948797500232897203853071790393885116465171393875976673693385000879337198213556447794398434782352654738563122022624642967864571454383814267648876048449590603480115693689162580755992686116534563663816203506520969500954741353683081691871170841572853932684457019190727452579388269518761070066012225637906766598808889134766906870857170491069727522854987604110140202165701028056317715546755482888281141979064206161119893213557441124682697844058662867837317718568074632672139404775850673801367503450134341628737627508058275331031355246875710092188894581462212753275513865164976897399277601","30", |
1930
|
|
|
|
|
|
|
"6129522921698903924225094098894493975355342495202583967070268649960491527425425546286128994652359747795614576729300901193288468364098351921425898605865990737737763196859623939630382031884908027628137877044490771874628629780057338048896492947577968007519815003168246395643465584343043193237880881635998419368585273823574720837496255282601496997088803126305575254814207239481124819310777601851780008004534530982225452330277362311532174615219685651873091360796309808900938980799843045197724124205459703692404692815206856959614667498156439854860378606039596585529438689777885628862162187008631192421450307071680585728728072572580947780239520470275779631590328798136283209653623721740978652009","42", |
1931
|
|
|
|
|
|
|
"-173794233423007364057178441776478220477329295247992746246194028033098955394598434863688615219916214324301023001093357893746330083903744204991166650812061841423746487587175286790822799578241212757499312100323647899801856816587814694250535160608651214203178715194330829602196319299830498255481024809653516681647938371069642056989453238492194899464534194575984259211778777474726825907276342679607943595029925764974686120493830750858815144111018156639748863065679944594300279690320295481014774768770077734050367942856894507914571711299927762683035011101547081082113463840150439878440505062095907817860452253434600485043521832982039217192780017205043143542812887267054217968944656636429743815938366731","207930", |
1932
|
|
|
|
|
|
|
"13873674832923745170636547493407974778812031787162484396922203584245099363875266410392579249977654901546226138255725682890165166445534326211967788770965050606335620329629392266509006667636060346080828403980900870728472844701200849051031032721110383896992993960600720447264177011379489696922012639234054945046493515830646916075528778995875263891724422324224871104321292779816866047869594198817075501831319907776354543266924566231340617726210269713505336228589002649382821152876769886796237625064939931597087898226387660507299139385252112368241337865982079462586705656758449262979906152409703115811425535504703782935179149721682887228861005266932595149810184020272544138033841220106232249961984874041","2874", |
1933
|
|
|
|
|
|
|
"-26012984231082938122321205711106137025736836308811099420978321017146930273005671218213801512995150233049010223325808387207760652312185884489040204754381130425223206104908949348483694397053700779323806598166397483624967026385155584314813089275200872985931085543928822164664368156111249818285706698582816847860316768251385568355911376789419906820360322920270272727732554866797105317523759568495736021299387762599572352567156747373223964524139683333489545030164669822955224449969772265055374313158826483073058617899550929715104043848380098396583498089878468223019258239295983312553586622706514962679548326500707178484227310027019877548445744372693423428185302230083093969160616600533454208539007576331211435405256579","925269860885370", |
1934
|
|
|
|
|
|
|
"990616118004405209547336756803741296643221987382321931721822820900299097210222317336001831102939236490395767769383589450743538317573906480157831910388399026009549363482047723522295682385225255084608513720106406633464966275709378145660935302980557499077874664887504148114522460257788204486783699727500508138689641080038916313291730518751063292404119140988768624151887967557709255327422581104429283482510069570158085040668138860662778558327704232203358594262804010229103345601462990376149249652299540260177492690219461257167020609270211173637016502365724336529333125021542322561542486553234490872949324335738034611680591470710376104053043734142034650737431499785882884589522913671849942865299633710178111","6", |
1935
|
|
|
|
|
|
|
"-674583921974243806727583626605726893305001263343470277847644141353711283719144748396214643464815527720051176636837830641202715031912558545751272265963459158832678711777574436725109883048688054377892408030247686556398952252471378342025741011438575099484896341336771053946168596117603779433009583486087778261092733102095362575294914815257723299413552987428930625441349976483182063565793384408266465380474529520534826114954047630754878668040735849610788709880820541989250906334800119386014176221640220454426941644202670624599594997416757514254570930031264863092952803531973860879930032899029342578124854325385199562765121526103213588359312368828453688417972133504757523704888418645741605357575301183566273541023","690", |
1936
|
|
|
|
|
|
|
"369763997577304898527792056092078784633064579850215089906718927953975408532819407204558577594984146089620623998022051043813802512840569387856574528038951679028036813020229062675066916989178254799161955591299056486170972788431152654760791766791190599466061280142672740585701636947897534361260451582259758691868004875864277790983654375073056163053627813804545640618169241729192679530964042280652574338325670662894789508966565337142721844903092886592945025900894162911247219665577745221033424450158824779569415157792860757313903143859765449917326253963605938268777389669269349544451932422774330893531316131993509969738757701435869993709233337662014445697606454995935095546520785205839498933104702647973917548450654482159","63346038", |
1937
|
|
|
|
|
|
|
"-1054181687381409638131616910853911354455980657913781692616470855145305376442167447677966359041858772154880528891461759759408670524036867330393458847554077805022113371551512761301353668641881943315640673862411986402084705908271833037248441148559758203373649679290148162009307104085713861437407027770249084665069566424802818695978402723455508336525572007924797995088668996393412803006736971627889522618048536287908252622198057721526239638561752413227961375709262141133204448616567780414625262935283998346756442958214463663418419136319815181399963230777047415998079220041299699187067412714951204651656933821520847527577289722382000754063804433988042815372396860021515945936788059415457004917777955610189853432234056001","30", |
1938
|
|
|
|
|
|
|
"490708060345718168482949551065008296976352341812156850912460754793773228598743021163789697895339848508047563198613297970895771272423084451586762411542433689884882582217920150615320261296412657655420294950882472519077107436411891314989684272827405143453664676299901282427746214002776016429289992734596941647026794542862610180682813869753438462413802302318288921935542654412271101075502309306996459972517715826132089736597584320511669263794701105417099176436055541622722611853665479429929243382275785136760788118477444370781356616739167758192241507716005871662971992278037186350173271291067722673038829083878521474773044108789762491726385320922397469619970046438378452390321367551511627206765616414040686450916033159995734945","2300826", |
1939
|
|
|
|
|
|
|
"-295710682036368660462889828594612232955924955002201524705248520206592222985898208468564409024643552663319217301279279456599515167727625150606450018918397365866826625510003837807762234721907229268939728260753209578951485832358379661753320905096937054954098245328282838820612002927999827875337943367582502020545668956501113411001279555402079055392887648432396357270387066730514118593546561439603919778742559512015901475146476123141564243291327909428505227081149290897384800809797729594081307795911125761034063373560371910341119307145118793762233074626775908914657621875311827273319354160489425009975655550242275976199551186361927525119846700395907422799296606519248369841030425783198567324724905036753320437659605858401058641353","226590", |
1940
|
|
|
|
|
|
|
"48304952056070024985817756788239978908682438355340656791822950062590796355241246689448963611728938505601369463215719576289607035969877364225474402150107267021033472617633002498666739540719726067208908400868629471652429458078768484626439283884479517280978247192859399400878296914805548929586054952054550941690046726387385343252474507896205536559285343999286125673465838911018803676968634234058996143076453319007358347695097769648224143191413651220988411012365741972645136470905240747776225223601701498704103140362659865756058524036705273180849600017203422636276522059566343973347678362590339657974928808786150211385800610012387411013195229675295096785833478392423958039918096194458403331849842918089944679987935690252652536647","6", |
1941
|
|
|
|
|
|
|
"-25535109222241698972694173193973518774716242178265877234279078154218306288190453574391345349607020347701104389306082727640662249328994752154372973422361999092715922759633521270378541507790769763357456276378726595626459724623679603915577643947700472106673593583118436960062894166402312867190376592931480464022802240967436286930003098509086131781553808335933575272888361402715107788113154287996385861486207257531899222760762747086758473894396360217594584387656887231071811145643960111628458232775253525983817907496407600357182919744162523813712195436135703038816616947504736640465073624938220282345566631808140813969037396579578863663701714202683178828730441933582773514024218332915875259194767588507001149870106803558286434937883617","510", |
1942
|
|
|
|
|
|
|
"1098651228481515846116735605942901657544418942763685605483819128454976385464899434737242367240952385067444749008365642568063670579728409673461751272924549125285602795045413203741844230426358616759853983294227411821897092348333446120995756339616373490620446536298890167517709746328742870299157366295356390032576984786436553789735950197578753614711411671045054914305425293539519785975913292188458435472840034103326532984267720997838197057411785852422605414587329459898626238314431604983174665957920693815755227736013545929781603072985638923688324355299338791368472239159091263112230452362400314432752766640687084000308229806355172210181524971644942859893996940410875091940649202106109066788663807627887433701124817799811432100659519242101309","3499986" |
1943
|
|
|
|
|
|
|
); |
1944
|
1
|
|
33
|
|
|
7
|
my $P = shift || $DECIMALS; |
1945
|
1
|
|
|
|
|
14
|
my $x = Math::BigFloat->new( $bernoulli[ $n - 2 ] ); |
1946
|
1
|
|
|
|
|
236
|
my $y = Math::BigFloat->new( $bernoulli[ $n - 1 ] ); |
1947
|
1
|
50
|
|
|
|
114
|
return wantarray ? ( $x, $y ) : $x->bdiv( $y )->bfround( -$P ); |
1948
|
|
|
|
|
|
|
} |
1949
|
|
|
|
|
|
|
|
1950
|
|
|
|
|
|
|
1; |
1951
|
|
|
|
|
|
|
__END__ |