Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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

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 about the Monastery: (10)
As of 2016-06-29 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (385 votes). Check out past polls.