[REBOL] Re: to-integer problem
From: smith:munsterman at: 16-Apr-2003 12:26
You are correct. Thanks for the link to some of your code.
I appreciate your response.
Perl (sorry :=}) treats this issue exactly the same way. In this case,
1.13-1.16 are all 1 less than you might expect.
On Wed, 16 Apr 2003 15:33:43 +0200, Ladislav Mecir <[lmecir--mbox--vol--cz]>
> Hi Jeff and Will,
>> I get the same results on REBOL/View 22.214.171.124.1. I do believe there is a
>> problem. Have you sent feedback to the Rebol folks?
>> -Jeff Smith
> actually, there is no problem. This behaviour is "forced" by the fact,
> that binary floating point numbers cannot exactly represent a number like
> 1.14 If you want to get 114, you can do as follows:
> to integer! round 1.14 * 100
> Or use any similar expression. ( see
> http://www.fm.vslib.cz/~ladislav/rebol/rounding.r )
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.