bug-gawk
[Top][All Lists]
Advanced

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

"-nan + 0" Problem in inf-nan-torture unit test might result in check fa


From: WeissonHan
Subject: "-nan + 0" Problem in inf-nan-torture unit test might result in check failure
Date: Fri, 02 Sep 2022 18:36:30 +0800

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]