atrosinenko added inline comments.
================
Comment at: compiler-rt/test/builtins/Unit/divdf3_test.c:80
+ // divisor is 1.0 as UQ1.31
+ if (test__divdf3(0x1.0p+0, 0x1.00000001p+0, UINT64_C(0x3fefffffffe00000)))
return 1;
----------------
sepavloff wrote:
> atrosinenko wrote:
> > sepavloff wrote:
> > > Is 0x1.00000001p+0 equal to 1.0 in UQ1.31?
> > Divisor is `1.(31 zeroes)1` after restoring the implicit bit, so it is
> > **truncated** to 1.0 as UQ1.31. Instead of counting bits carefully, it
> > would probably be better to add several tests with the `1` bit shifted 1-2
> > places left/right as well as if the divisor is round up instead of
> > truncating - //just in case//. :) So, with table-driven test it would
> > probably be simpler to not make extra assumptions on the implementation.
> > Divisor is 1.(31 zeroes)1
>
> So it is **not** `1.0` and the comment is misleading. Try rewording the
> comment to avoid confusion. Maybe `divisor is truncated to 1.0 in UQ1.31` or
> something like that.
Now got it, thank you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84932/new/
https://reviews.llvm.org/D84932
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits