Skip to content

Commit

Permalink
Fix default precision with pari<=2.15
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-rojas committed Oct 5, 2024
1 parent 40a65d9 commit 3612d39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cypari2/pari_instance.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ cpdef long prec_bits_to_pari(unsigned long prec_in_bits) noexcept:
>>> [(32*n, prec_bits_to_pari(32*n)) for n in range(1, 9)] == (ans32 if bitness == '32' else ans64)
True
"""
return nbits2prec(prec_in_bits) or LOWDEFAULTPREC
if not prec_in_bits:
return prec
return nbits2prec(prec_in_bits)


cpdef long default_bitprec() noexcept:
Expand Down

0 comments on commit 3612d39

Please sign in to comment.