Overview
| Artifact ID: | fcfb9584761d96833db5a06648e2bd872c4b0064d0105bc4c77f61f3db30c258 |
|---|---|
| Ticket: | bf029ced86b614a4c29dc15b0ddc2b222e489004
binary.test 40.3 signed NaN fails on IRIX/MIPS machines |
| User & Date: | anonymous on 2026-10-13 09:22:23 |
Changes
- icomment:
binary-40.3 fails the same way on RISC-V (riscv64, SiFive U74 on a StarFive JH7110), with Tcl 9.1.0 & 8.6.18 built by the Yocto Project: ==== binary-40.3 ScanNumber: NaN FAILED ---- Result was: 1 NaN ---- Result should have been (glob matching): 1 -NaN* On RISC-V the sign loss is required by the ISA rather than varying by implementation: unless an instruction says otherwise, any floating-point operation that produces a NaN returns the canonical NaN, which is positive. ScanNumber passes the float to Tcl_NewDoubleObj(), & GCC compiles that float-to-double widening to fcvt.d.s, so a negative single-precision NaN always becomes a positive double NaN. A standalone test of the same widening (0xffffffff in, 0x7ff8000000000000 out) confirms it under qemu-riscv64. IEEE 754 does not define the sign of a NaN produced by a conversion, so I agree with dropping the sign from the expected result, or accepting both.
- login: "anonymous"
- mimetype: "text/plain"
- username: "OOHehir"