Mail Archives: djgpp/1997/06/06/14:17:55
On 4 Jun 1997, Real Email in Sig! wrote:
> POULAIN Vincent (vpoulain AT club-internet DOT fr) wrote:
> : Only if you want the integer part of your float.
> : If you want a rounded value, this will not work of course :-)
>
> How about a=(b+0.5); for a rounded answer? Seems right, but I've been
> wrong on easier stuff before.
a=(b+0.5005) is better to handle rounding of values not exactly
representable in IEEE float formats.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -