Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: perl floating number addition

by poolpi (Hermit)
on Jul 20, 2009 at 06:57 UTC ( #781545=note: print w/ replies, xml ) Need Help??


in reply to perl floating number addition

May be of interest ;)

#!/usr/bin/perl use strict; use warnings; use Math::BigFloat; my $base = Math::BigFloat->new(q{895.3}); my $incr = Math::BigFloat->new(q{0.01}); while ( $base->bcmp(900) ) { print $base->bstr(), "\n"; $base->badd($incr); }


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb


Comment on Re: perl floating number addition
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-09-02 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls