in reply to Rounding With sprintf anomaly?
What I'm thinking of is that a floating point value not always kan be represented exactly and that your first and second case might be represented as 4.499999999999999..... in your box, which would explain the rounddown.
You could look into the Posix routines for a possibly alternate route to achieve your aim.
---
I would like to change the world but God won't let me have the source code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Rounding With sprintf anomaly?
by oakbox (Chaplain) on Feb 19, 2002 at 09:57 UTC | |
by riffraff (Pilgrim) on Feb 27, 2002 at 14:39 UTC |