about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-04-16 18:43:25 +0000
committerTrevor Gross <t.gross35@gmail.com>2025-04-16 15:28:10 -0500
commite4d716c84801d1d91d473aaa28692f595f352b34 (patch)
tree9242e1f01022c673c15348b86824ee7d43f03ab8 /tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs
parent14ab2453f235ce66074d54e4040ce06febfe54f4 (diff)
downloadrust-e4d716c84801d1d91d473aaa28692f595f352b34.tar.gz
rust-e4d716c84801d1d91d473aaa28692f595f352b34.zip
fmod: Correct the normalization of subnormals
Discussed at [1], there was an off-by-one mistake when converting from
the loop routine to using `leading_zeros` for normalization.

Currently, using `EXP_BITS` has the effect that `ix` after the branch
has its MSB _one bit to the left_ of the implicit bit's position,
whereas a shift by `EXP_BITS + 1` ensures that the MSB is exactly at the
implicit bit's position, matching what is done for normals (where the
implicit bit is set to be explicit). This doesn't seem to have any
effect in our implementation since the failing test cases from [1]
appear to still have correct results.

Since the result of using `EXP_BITS + 1` is more consistent with what is
done for normals, apply this here.

[1]: https://github.com/rust-lang/libm/pull/469#discussion_r2012473920
Diffstat (limited to 'tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs')
0 files changed, 0 insertions, 0 deletions