Re: Limiting Decimal Places in a Floating Variable?
Re: Limiting Decimal Places in a Floating Variable?
- Subject: Re: Limiting Decimal Places in a Floating Variable?
- From: Michelle Steiner <email@hidden>
- Date: Thu, 23 Nov 2000 10:26:42 -0800
On 11/23/00 3:34 AM, Nigel Garvey <email@hidden> wrote:
>
>set x to -2134.2399999
>
>set x to (round (x * 100) rounding toward zero) / 100
>
>
Just out of curiosity, does this work with the number 8348.39 on your
>
machine? Or 8348.29?
Sadly, no, it doesn't work with either of them.
>
Incidentally, if you're in the market for a really fast way of
>
multiplying by 100 and rounding towards zero:
>
>
x div 0.01
Neat!
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------