Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Dividing and format

by hotshot (Prior)
on Nov 27, 2003 at 14:06 UTC ( #310538=note: print w/ replies, xml ) Need Help??


in reply to Re: Dividing and format
in thread Dividing and format

I don't need to display the result, I first want to store the result, do some calculations with it and than display another result.


Comment on Re: Re: Dividing and format
Re: Re: Re: Dividing and format
by edan (Curate) on Nov 27, 2003 at 14:14 UTC

    Normally, intermediate calculations are done without rounding, to gain maximum accuracy - you round at the end for display purposes. If for some reason you actually need to round the number for intermediate calculations, then you use sprintf.

    --
    3dan

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-07-03 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls