Skip to content

Commit 527f217

Browse files
committed
Merge #49
2 parents b58b7b7 + ce896ef commit 527f217

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gfloat/round.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def round_float(
7373

7474
else:
7575
# Extract exponent
76-
expval = int(math.floor(math.log2(vpos)))
76+
expval = math.frexp(vpos)[1] - 1
7777

7878
# Effective precision, accounting for right shift for subnormal values
7979
if fi.has_subnormals:

0 commit comments

Comments
 (0)