users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug conc. number_codes


From: Remy Haemmerle
Subject: Re: bug conc. number_codes
Date: Fri, 08 Mar 2002 11:03:18 +0100

hi, 

It's the RIGHT values.
In fact GNU-prolog prints 16 significant digits and so doesn't round
floatting point imprecision.

Remenber that the binary codings of 1.4 and 1.56 and 0.2 have an
infinity of numbers after the point.

example: 0.2 = 1/5 = 1b/101b = 0.00110011001100110011....b
   

Rémy.


Johannes Middeke a écrit :
> 
> hi,
> 
> there seems to be a bug within number_codes/2 as follows:
> 
> > | ?- number_codes(N,"1.4").
> >
> > N = 1.3999999999999999
> >
> > yes
> > | ?- number_codes(N,"1.56").
> >
> > N = 1.5600000000000001
> >
> > yes
> 
> is there a way to get the right values?
> 
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/users-prolog



reply via email to

[Prev in Thread] Current Thread [Next in Thread]