Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: COBOL to PERL

by pg (Canon)
on Sep 25, 2005 at 03:23 UTC ( [id://494846]=note: print w/replies, xml ) Need Help??


in reply to COBOL to Perl

When you translate COBOL to Perl or any other c family languages, you need to be careful with the math. c family languages are not designed to take care of the precision to great details, and rounding could also be an issue.

To resolve this kind of issues, one way is to use bignum pragmas in certain modules.

For example:

use strict; use warnings; #use bignum; print 215.88-214.89;

Without bignum it gives you 0.990000000000009, but with bugnum it gives you 0.99. In certain aplication areas, this makes a big difference.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-23 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found