mirror of
https://github.com/vale981/arb
synced 2025-03-06 09:51:39 -05:00
add an extra overflow check
This commit is contained in:
parent
6d18eb53ed
commit
a1e54756a1
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ arb_bernoulli_poly_ui(arb_t res, ulong n, const arb_t x, slong prec)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* small integer x */
|
/* small integer x */
|
||||||
if (arb_is_int(x) && arf_cmpabs_ui(arb_midref(x), n) < 0)
|
if (arb_is_int(x) && arf_cmpabs_ui(arb_midref(x), n) < 0 && n < WORD_MAX)
|
||||||
{
|
{
|
||||||
if (arf_sgn(arb_midref(x)) >= 0)
|
if (arf_sgn(arb_midref(x)) >= 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue