bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gawk 3.1.5h test results on interix


From: Martin Koeppe
Subject: Re: gawk 3.1.5h test results on interix
Date: Wed, 17 Oct 2007 00:59:01 +0200 (CEST)


On Tue, 16 Oct 2007, Aharon Robbins wrote:

Greetings. Re this:

I just test built gawk 3.1.5h on interix 3.5. Building was fine, but 2
tests failed, see below.

Martin


--- fmtspcl.ok  Mon Oct 15 09:12:50 2007
+++ _fmtspcl    Mon Oct 15 09:12:50 2007
@@ -5,5 +5,10 @@
  gawk: ./fmtspcl.awk:6: warning: [s]printf: value NaN is out of range for `%d' 
format
  gawk: ./fmtspcl.awk:6: warning: [s]printf: value NaN is out of range for `%x' 
format
  gawk: ./fmtspcl.awk:6: warning: [s]printf: value NaN is out of range for `%d' 
format
+sprintf(%f,NaN) = NaN (!= -NaN)
+sprintf(%s,NaN) = NaN (!= -NaN)
+sprintf(%g,NaN) = NaN (!= -NaN)
  gawk: ./fmtspcl.awk:6: warning: [s]printf: value NaN is out of range for `%x' 
format
+sprintf(%x,NaN) = NaN (!= -NaN)
  gawk: ./fmtspcl.awk:6: warning: [s]printf: value NaN is out of range for `%d' 
format
+sprintf(%d,NaN) = NaN (!= -NaN)

It would appear that your library doesn't distinguish negative and positive NAN 
values.
Is that true?

Yes, I verified that now. Interix libc printf doesn't distinguish between NaN and -NaN, it always prints "NaN".

Andy:
This seems rather bewildering to me (that 'sprintf("%f",-nan)' returned '-NaN' in the first instance inside BEGIN, but then behaved differently inside the display function). I hope that I'm reading the code improperly. Does anybody else understand what's going on here?

But Andy is also right. NaN or -NaN isn't the problem, the test compensates for it. The real problem is that log(0) isn't -Inf but NaN for me. The reason is, however, the libm I'm using. If I use the system libm, everything is fine, also the tweakfld test. The system libm has other problems with single precision floats, that's why I'm now using libm from newlib.

Unfortunaly, newlib's libm has a bug which I just found now. For log(0) the docs says it returns -Inf, but the source says it returns NaN.

Thank you both.

On Interix there is a problem with "long double", for details see:
http://www.debian-interix.net/techdocs/#ldbl

Apparently, this is not the case here, but just to verify: Does gawk make use of "long double" anywhere, besides in the configure script?


Martin


--- tweakfld.ok Fri Aug 11 14:05:50 2006
+++ _tweakfld   Mon Oct 15 09:13:45 2007

It seems that your library for sin and cos return small values where other
systems return zero. This code is a bit hard to follow, since it came in
a bug report, but that's what it looks like to me.

In any case, I think that for most things the version you've built should
be fine.  The tweakfld test is an old one --- if an older version of gawk
also fails on it under Interix then I don't think it's an issue.

Thanks,

Arnold





reply via email to

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