https://bugs.llvm.org/show_bug.cgi?id=51396

            Bug ID: 51396
           Summary: __divdf3 returns zero with some extreme values
           Product: compiler-rt
           Version: 11.0
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

I've found that __divdf3 returns an incorrect result for a specific input.
Specifically:

    a = 1.7112092293746032e-193 (raw bits: 0x17E8FBBB7CBDC600)
    b = 8.858903059828881e+116  (raw bits: 0x58367bbed68d8223)
    result = __divdf3(a, b)

I've found that the output is 0, while all hardware implementations I've tested
this code with return a non-zero value: 1.9316265431712e-310 (raw bits:
0x0000238ee05c879e). Therefore, I think this is a bug in __divdf3.

In practice, this issue causes the math package in Go to fail the tests when
compiled with TinyGo and when using the compiler-rt library on a baremetal
system.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to