bug-gawk
[Top][All Lists]
Advanced

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

Re: "-nan + 0" Problem in inf-nan-torture unit test might result in chec


From: arnold
Subject: Re: "-nan + 0" Problem in inf-nan-torture unit test might result in check failure
Date: Sun, 04 Sep 2022 06:19:13 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Hi.

Thank you for the report. It appears that on the RiscV system, when
"-nan" is converted from string to number, the sign is not kept.
As Nelson, pointed out, this is apparently legal.

What I've done is move this test into the "machine dependent" group
of tests, and added a message that "if these tests fail don't worry
too much" when those tests run. I've also made that group the last set
of tests to run so that the message and results are more visible at the
end of "make check".

In short, there isn't anything I can do about this code-wise, so I've
tried to make the test case less scary.

Much thanks,

Arnold

"WeissonHan" <Weisson@linux.alibaba.com> wrote:

> Maintainers and developers from community:
> Greetings. I just failed in building awk on riscv64 platform based on
> QEMU, recently. And the task died on unit case inf-nan-torture. The
> inf-nan-torture.awk expects that "-nan + 0 = -nan", but the vm turnned
> out "-nan + 0 = nan" instead. I read 2008 IEEE-754 spec and it does
> not include the standard about behaivor like that. And I have tried the
> "-nan + 0" on several platform, it doesn't always return "-nan" as what
> inf-nan-torture.ok contains.
> Some tests are as following:
> -----------------------------------------------------------------------------------
> macbook pro 2019: -nan + 0 = nan +nan + 0 = nan
> -----------------------------------------------------------------------------------
> Alibaba ECS of aarch64: -nan + 0 = -nan +nan + 0 = +nan
> -----------------------------------------------------------------------------------
> Alibaba ECS of x86: -nan + 0 = -nan +nan + 0 = +nan
> -----------------------------------------------------------------------------------
> QEMU RISC-V: -nan + 0 = +nan +nan + 0 = +nan
> -----------------------------------------------------------------------------------
> I do think this problem is very interesting and worth attention. For we
> could simply correct or disable this test case to pass the check phase,
> for those who want their awk scripts run on different platform however,
> this might be a problem. Thus I send this email for better solution of
> this ploblem.
> Looking forward to hearing from you.
> Weisson Han,
> Sep 2nd, 2022



reply via email to

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