Ask Your Question

WhatsUp's profile - activity

2020-08-01 17:53:27 +0200 commented answer erfc for arbitrary precision real field

I'm running on the sage cell server https://sagecell.sagemath.org/ and the version() command gives 'SageMath version 9.1, Release Date: 2020-05-20'. Still it doesn't work at this moment. If the issue is solved in version 9.2, then I would be happy to wait for the sage cell server to update to 9.2.

2020-07-18 03:13:56 +0200 received badge  Student (source)
2020-07-17 17:27:58 +0200 asked a question 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?