|Subject:||Bug in Math::BigFloat - gives wrong results for bpow and bexp|
Hello, I'm working with Perl 5.10 and tried it on Ubuntu and Feodora. bexp gives wrong result for high numbers (negative) and takes ages to calculate, if it is a real negative number such as -394.84010945716266885 (or even -394.8). bpow gave also wrong result for power -394.8 of e. For numbers like -394 it would give the right result. The code: my $i=Math::BigFloat->new(-394.84010945715266885, 20)->bexp(); print ("exp: ".exp(-394.84010945715266885).", BigFloat exp: $i\n"); I'd expect it to give the same results, no? The output: exp: 3.33517962278651e-172, BigFloat exp: 19871330168979164802000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000 Would be happy to hear from you. Best regards, Nir.