Link to home
Start Free TrialLog in
Avatar of djc2
djc2

asked on

how to convert from a floating point number to a decimal number?

I have a floating point variable $fp.
I want to copy its value in decimal integer format to the variable $di.
For example, if $fp=354.34, I want $di=354
             if $fp=354.55, I want $di=355
How do I do this? Thanks.
ASKER CERTIFIED SOLUTION
Avatar of flivauda
flivauda

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of djc2
djc2

ASKER

Thanks! Just what I needed.