Skip to content

Commit cfe4427

Browse files
t-a-kkhwilliamson
authored andcommitted
sv.c: Remove redundant PERL_ABS in S_hextract.
It seems redundant to take the absolute value of the first argument of frexp() here, because the sign of the first argument will only affect its return value which is discarded in this case.
1 parent c9cfa58 commit cfe4427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11735,7 +11735,7 @@ S_hextract(pTHX_ const NV nv, int* exponent, bool *subnormal,
1173511735
assert(HEXTRACTSIZE <= VHEX_SIZE);
1173611736

1173711737
PERL_UNUSED_VAR(ix); /* might happen */
11738-
(void)Perl_frexp(PERL_ABS(nv), exponent);
11738+
(void)Perl_frexp(nv, exponent);
1173911739
*subnormal = FALSE;
1174011740
if (vend && (vend <= vhex || vend > vmaxend)) {
1174111741
/* diag_listed_as: Hexadecimal float: internal error (%s) */

0 commit comments

Comments
 (0)