Ok I ran your suggestion, with the only change that the top line is my $numerator = Math:BigFloat->new('etc..'); The following is the output from that:
numerator: 21870577150530061764992964086154170371291288972142382561136
+983444049083343369446319177410339000963705410329813528974794149028917
+796716909528358808344846743188027.33584241646881139793416728178209809
0127033581814271708569400601328616984193260382932770387188042899011550
+894245553293461838921611078461617347606684150327638383700337990394156
+8669190776279824783435928019360618178076885689415041227681
8446707649008533782606319999155922737975837211409433592932894129983821
+736527017232653521016258297747915878323970901479428587529263155523617
+8335246013656297975051588700684768403541023195036481891450
2590711655366289482609717574837339905541901751286406418328318293008678
+171684392671085100451990131991851475002542698170815681092942517642292
+6165775177862224171041495549862008650592604166929542174211
9523636180161632297653091372254124577566138184421784877430704105285817
+913486193962161495507937288053699039378006674483273529742432126440239
+9647634986599223736661814927327512892111811467257097624814
6352589850735126304920589015974048643716498515109840201155340280219344
+7837576587046088366626941267521
numerator: 21870577150530061764992964086154170371291288972142382561136
+983444049083343369446319177410339000963705410329813528974794149028917
+796716909528358808344846743188026.33584241646881139793416728178209809
0127033581814271708569400601328616984193260382932770387188042899011550
+894245553293461838921611078461617347606684150327638383700337990394156
+8669190776279824783435928019360618178076885689415041227681
8446707649008533782606319999155922737975837211409433592932894129983821
+736527017232653521016258297747915878323970901479428587529263155523617
+8335246013656297975051588700684768403541023195036481891450
2590711655366289482609717574837339905541901751286406418328318293008678
+171684392671085100451990131991851475002542698170815681092942517642292
+6165775177862224171041495549862008650592604166929542174211
9523636180161632297653091372254124577566138184421784877430704105285817
+913486193962161495507937288053699039378006674483273529742432126440239
+9647634986599223736661814927327512892111811467257097624814
6352589850735126304920589015974048643716498515109840201155340280219344
+7837576587046088366626941267521
denominator: 100000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000
2.187057715
2.18705771505300617649929640861541703712912889721423825611369834440490
+833433694463191774103390009637054103298135289747941490289177967169095
+283588083448467431880263358424164688113979341672817820980901270335818
+142717085694006013286169841932603829327703871880428990115508942455532
+934618389216110784616173476066841503276383837003379903941568669190776
+279824783435928019360618178076885689415041227681844670764900853378260
+631999915592273797583721140943359293289412998382173652701723265352101
+625829774791587832397090147942858752926315552361783352460136562979750
+515887006847684035410231950364818914502590711655366289482609717574837
+339905541901751286406418328318293008678171684392671085100451990131991
+851475002542698170815681092942517642292616577517786222417104149554986
+200865059260416692954217421195236361801616322976530913722541245775661
+381844217848774307041052858179134861939621614955079372880536990393780
+066744832735297424321264402399647634986599223736661814927327512892111
+8114672570976248146352589850735126
The following is my code with my numerator and denominator whereby I attempt the same series of divisions and accuracy changes, (Also tried increasing the accuracy even more):
my $numerator = Math::BigFloat->new($rho)->bpow(Math::BigFloat->new($c
+[$i]));
my $denominator = Math::BigFloat->new(Factorial($c[$i], \@fact))->bmul
+($G);
printf("numerator: %s\n", $numerator );
printf("denominator: %s\n", $denominator );
my $x = $numerator->copy();
$x->accuracy(10);
print scalar $x->bdiv($denominator), "\n";
$x = $numerator->copy();
$x->accuracy(1000);
print scalar $x->bdiv($denominator), "\n";
exit();
Output:
numerator: 131254331066182.0671680983636563623093384645074900631038196
+916724632735210716611428572612616761979022584315623777773238891425361
+932674318752893801
denominator: 200000000000000
1.6 #<--- Way wrong should be around .65
Thanks,
bW |