This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/33197] Fortran 2008: math functions and other small changes



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]