mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
Fix brace style for bf9d30f3c3
This commit is contained in:
parent
c6b1171c6b
commit
24116be822
1 changed files with 26 additions and 22 deletions
|
@ -5120,17 +5120,19 @@ SCM_DEFINE (scm_ash, "ash", 2, 0, 0,
|
|||
? SCM_INUM0 : SCM_I_MAKINUM (-1);
|
||||
else if (scm_is_true (scm_zero_p (n)))
|
||||
return SCM_INUM0;
|
||||
else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX)) {
|
||||
/* We exclude MIN to ensure that 'bits_to_shift' can be
|
||||
negated without overflowing, if INT32_MIN happens to be LONG_MIN */
|
||||
long bits_to_shift = scm_to_long (count);
|
||||
if (bits_to_shift > 0)
|
||||
return left_shift_exact_integer (n, bits_to_shift);
|
||||
else if (SCM_LIKELY (bits_to_shift < 0))
|
||||
return floor_right_shift_exact_integer (n, -bits_to_shift);
|
||||
else
|
||||
return n;
|
||||
} else
|
||||
else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX))
|
||||
{
|
||||
/* We exclude MIN to ensure that 'bits_to_shift' can be
|
||||
negated without overflowing, if INT32_MIN happens to be LONG_MIN */
|
||||
long bits_to_shift = scm_to_long (count);
|
||||
if (bits_to_shift > 0)
|
||||
return left_shift_exact_integer (n, bits_to_shift);
|
||||
else if (SCM_LIKELY (bits_to_shift < 0))
|
||||
return floor_right_shift_exact_integer (n, -bits_to_shift);
|
||||
else
|
||||
return n;
|
||||
}
|
||||
else
|
||||
scm_num_overflow ("ash");
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
@ -5166,17 +5168,19 @@ SCM_DEFINE (scm_round_ash, "round-ash", 2, 0, 0,
|
|||
/* If N is zero, or the right shift count exceeds the integer
|
||||
length, the result is zero. */
|
||||
return SCM_INUM0;
|
||||
else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX)) {
|
||||
/* We exclude MIN to ensure that 'bits_to_shift' can be
|
||||
negated without overflowing, if INT32_MIN happens to be LONG_MIN */
|
||||
long bits_to_shift = scm_to_long (count);
|
||||
if (bits_to_shift > 0)
|
||||
return left_shift_exact_integer (n, bits_to_shift);
|
||||
else if (SCM_LIKELY (bits_to_shift < 0))
|
||||
return round_right_shift_exact_integer (n, -bits_to_shift);
|
||||
else
|
||||
return n;
|
||||
} else
|
||||
else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX))
|
||||
{
|
||||
/* We exclude MIN to ensure that 'bits_to_shift' can be
|
||||
negated without overflowing, if INT32_MIN happens to be LONG_MIN */
|
||||
long bits_to_shift = scm_to_long (count);
|
||||
if (bits_to_shift > 0)
|
||||
return left_shift_exact_integer (n, bits_to_shift);
|
||||
else if (SCM_LIKELY (bits_to_shift < 0))
|
||||
return round_right_shift_exact_integer (n, -bits_to_shift);
|
||||
else
|
||||
return n;
|
||||
}
|
||||
else
|
||||
scm_num_overflow ("round-ash");
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue