Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

erfc for arbitrary precision real field

The following code raised a runtime error:

R = RealField(500)
print(erfc(R(28.0)))

Output:

/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/rings/real_mpfr.pyx in sage.rings.real_mpfr.RealNumber.erfc (build/cythonized/sage/rings/real_mpfr.c:31648)()
   5047         """
   5048         cdef RealNumber x = self._new()
-> 5049         sig_on()
   5050         mpfr_erfc(x.value, self.value, (<RealField_class>self._parent).rnd)
   5051         sig_off()

RuntimeError: Aborted

However, it would work if the RealField is removed:

print(erfc(28.0))

Output:

6.56321584032878e-343

Is there a way to make erfc work also for arbitrary precision real fields?