more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yes - I think this is generally considered to be a perl bug. (That's how I, at least, regard it.)
If perl's nvtype is 'double', perl will print floating point values rounded to 15 decimal digits - whereas the correct thing would be to round them to 17 decimal digits. Hence the surprising result that you see. Perl will correctly tell you that 3336.0 != 3335.9999999999995, yet will print both of those values identically (as 3336) ... which is rather absurd. If you want to see the values rounded to 17 decimal digits then the best solution currently is to printf() 17 decimal digits - eg: Cheers, Rob In reply to Re: Variables are automatically rounded off in perl
by syphilis
|
|