digitalmars.D - number not representable as a `float` in Phobos unittest
- Paolo Invernizzi (14/14) Apr 30 2023 Hi everybody,
- max haughton (3/6) Apr 30 2023 If you are on MacOS this is because of a change in the macos libc
- Paolo Invernizzi (2/12) May 01 2023 Thank you, good to know.
Hi everybody, I'm having that when compiling a project with unittests enabled: ``` /Users/pinver/dlang/dmd-2.103.0/osx/bin/../../src/phobos/std/math/exp nential.d(3791,36): Error: number `0x0.8p-126f` is not representable as a `float` /Users/pinver/dlang/dmd-2.103.0/osx/bin/../../src/phobos/std/math/exp nential.d(3791,36): https://dlang.org/spec/lex.html#floatliteral /Users/pinver/dlang/dmd-2.103.0/osx/bin/../../src/phobos/std/math/exp nential.d(3791,75): Error: number `0x0.8p-126f` is not representable as a `float` /Users/pinver/dlang/dmd-2.103.0/osx/bin/../../src/phobos/std/math/exp nential.d(3791,75): https://dlang.org/spec/lex.html#floatliteral /Users/pinver/dlang/dmd-2.103.0/osx/bin/../../src/phobos/std/math/exp nential.d(3793,36): Error: number `0x0.555556p-126f` is not representable as a `float` /Users/pinver/dlang/dmd-2.103.0/osx/bin/../../src/phobos/std/math/exp nential.d(3793,36): https://dlang.org/spec/lex.html#floatliteral /Users/pinver/dlang/dmd-2.103.0/osx/bin/../../src/phobos/std/math/exp nential.d(3793,80): Error: number `0x0.555556p-126f` is not representable as a `float` ``` I've searched a little, but I don't know if it's a known bug or regression. /Paolo
Apr 30 2023
On Sunday, 30 April 2023 at 08:59:02 UTC, Paolo Invernizzi wrote:Hi everybody, I'm having that when compiling a project with unittests enabled: [...]If you are on MacOS this is because of a change in the macos libc string to float functions, it's been fixed in DMD master
Apr 30 2023
On Sunday, 30 April 2023 at 14:04:23 UTC, max haughton wrote:On Sunday, 30 April 2023 at 08:59:02 UTC, Paolo Invernizzi wrote:Thank you, good to know.Hi everybody, I'm having that when compiling a project with unittests enabled: [...]If you are on MacOS this is because of a change in the macos libc string to float functions, it's been fixed in DMD master
May 01 2023