We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b58b7b7 + ce896ef commit 527f217Copy full SHA for 527f217
1 file changed
src/gfloat/round.py
@@ -73,7 +73,7 @@ def round_float(
73
74
else:
75
# Extract exponent
76
- expval = int(math.floor(math.log2(vpos)))
+ expval = math.frexp(vpos)[1] - 1
77
78
# Effective precision, accounting for right shift for subnormal values
79
if fi.has_subnormals:
0 commit comments