[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rounding error in gawk 3.1.1 & 3.1.4
From: |
Ratcliffe, Jeffrey (Peters) |
Subject: |
Rounding error in gawk 3.1.1 & 3.1.4 |
Date: |
Thu, 6 Oct 2005 14:08:35 +0200 |
With:
gawk '
BEGIN {
print "int(log(1000)/log(10))", int(log(1000)/log(10))
print "log(1000)/log(10)", log(1000)/log(10)
}
'
I get:
int(log(1000)/log(10)) 2
log(1000)/log(10) 3
under both Redhat Linux (2.4.21-27.0.2.ELsmp) and HP-UX (B.11.11)
Both results should, of course, be 3.
Is there a workaround?
Regards
Jeff Ratcliffe
- Rounding error in gawk 3.1.1 & 3.1.4,
Ratcliffe, Jeffrey (Peters) <=