bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] [Fwd: BUG REPORT]


From: Aharon Robbins
Subject: Re: [bug-gawk] [Fwd: BUG REPORT]
Date: Wed, 22 Feb 2012 21:50:52 +0200
User-agent: Heirloom mailx 12.4 7/29/08

Hi. I am catching up on old mail. I believe that this was answered.
The reason is that gawk uses double precision floating point and does
not do exact decimal arithmetic. This is described somewhat in the floating
point issues appendix in the gawk manual.

Thanks,

Arnold

> From: cyrus <address@hidden>
> To: address@hidden
> Date: Mon, 06 Feb 2012 14:59:30 -0400
> Subject: [bug-gawk] [Fwd: BUG REPORT]
>
> BEGIN {
> a=0.93
> b=0.62
> c=0.31
> d=b+c
>         if (a == d)
>                 print "success" a d
>         else print "Failure"
> }
>
> I'm using UBUNTU 11.1. and I have a 64bit OS.
>
> The script above returns failure. But it should be success. If you
> change the integers to round #'s then it returns success!!



reply via email to

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