Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: to-integer problem

From: smith:munsterman at: 16-Apr-2003 12:26

Hi Ladislav, You are correct. Thanks for the link to some of your code. I appreciate your response. -Jeff PS 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]> wrote:
> Hi Jeff and Will, > >> I get the same results on REBOL/View 1.2.1.3.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 ) > > Regards > -Ladislav > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes. >
-- -Jeff Smith 770-565-5462