This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33197] Fortran 2008: math functions and other small changes
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Mar 2008 14:21:37 -0000
- Subject: [Bug fortran/33197] Fortran 2008: math functions and other small changes
- References: <bug-33197-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from fxcoudert at gcc dot gnu dot org 2008-03-04 14:21 -------
A bit of experimentation reveals that we can use the asymptotic expression at
http://en.wikipedia.org/wiki/Error_function#Asymptotic_expansion for arguments
larger than 7, and it does converge with less than 100 terms (for x86 long
double, arg = 7.0 requires 30 terms, arg = 8.0 requires 22, arg = 10.0 requires
16 and arg = 18.0 requires 10 terms; allow a bit more for ppc long doubles).
So, I rank this as costly but doable, and we frankly don't care too much about
the cost at the moment (people relying on heavy simplification of ERFC_SCALED
intrinsic, well... I don't see that coming too soon). For smaller arguments,
using mpfr_erfc and mpfr_exp should be fine. Does that sound like a plan?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197