The float number is represented as (-1)^s * 1.f * 2^(-127) for 32-bit,
where s is the signed flag, f is the mantissa. When the exponent bits
are all zeros, the float number is represented as (-1)^s * 0.f *2^(-126)
for 32-bit, in which case, the intPart is '0'.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
There is a unittest that is failing with the buildbots:
/var/lib/buildkite-agent/builds/llvm-project/flang/unittests/Evaluate/real.cpp:43: FAIL: Real4{Integer4{table[j].raw}}.DumpHexadecimal() == table[j].expected 11 /var/lib/buildkite-agent/builds/llvm-project/flang/unittests/Evaluate/real.cpp:43: FAIL: Real4{Integer4{table[j].raw}}.DumpHexadecimal() == table[j].expected 12 16839176 tests pass, 2 tests FAIL
Comment Actions
Thanks @jeanPerier . Not noticed these test cases are not in fir-dev. The failed test cases are just what this patch fixes. For them, the exponent bits are all zeros. Fix the test cases.