bug-gawk
[Top][All Lists]
Advanced

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

Re: Testsuite failures of gawk 5.2.0


From: Letu Ren
Subject: Re: Testsuite failures of gawk 5.2.0
Date: Tue, 20 Sep 2022 21:42:24 +0800

Hi Arnold,

>Adding zero changes the sign of the value passed.
>
>Sheesh, what a headache.
>
>I'm not sure yet what to do about this, but at least now I
>can point a finger at the hardware.

I recently investigated a similar glibc testsuite failure on riscv.
-nan will be changed to nan when converting from float to double.

The reason is according to RISC-V ISA manual in chapter 11.3 of
riscv-isa-20191213,

Except when otherwise stated, if the result of a floating-point operation is
NaN, it is the canonical NaN. The canonical NaN has a positive sign and all
significand bits clear except the MSB, a.k.a. the quiet bit. For
single-precision floating-point, this corresponds to the pattern 0x7fc00000.

which means that conversion -NAN from float to double won't keep the signbit.

I think the intuition of this behavior on riscv64 is that those
developer of RISC-V doesn't think the sign bit of NAN matters which is
according to IEEE 754. Although they don't realize that a lot of
software will test -NAN in their test suite.

There is still no progress on the glibc similar problem. Software
consistency matters while the sign bit of NAN doesn't. Really look
forward to a solution for this issue.

Thanks
Letu Ren



reply via email to

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