Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Help me make a test case for Math::BigFloat

by spiritway (Vicar)
on Mar 07, 2006 at 06:37 UTC ( [id://534838]=note: print w/replies, xml ) Need Help??


in reply to Help me make a test case for Math::BigFloat

Wow, this is mighty strange... I added some more prints of calculations, as so:

printf "%3.5g %3.5g %3.5g %3.5g\n", ($e+0), (0+$e), (0-$e),($e-0); printf "%3.5g %3.5g %3.5g %3.5g\n", ($e+1), (1+$e), (1-$e),($e-1); printf "%3.5g %3.5g %3.5g %3.5g\n", ($e+$e), ($e-$e), ($e*$e),($e/$e); printf "%3.5g %3.5g %3.5g %3.5g\n", ($e**2), ($e**0), (0/$e),($e/0);

The output was:

0 0 0 0 1 1 1 -1 2 0 1 1 0 1 0 0

In particular, note that the final calculation is ($e/0). The anomaly is more than just $e having an ambiguous value, it seems.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://534838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found