On Sat, 08 Oct 2011 at 01:05AM -0700, achrzesz wrote: > The exact integral > > 1/2*(erf(pi - 1/2*I) + erf(pi + 1/2*I))*sqrt(pi)*e^(-1/4) > > contains *real* expression > > (erf(pi - 1/2*I) + erf(pi + 1/2*I)) > > but maxima/sage can't check that it is real > > In WolframAlpha one can check that > > Im[Erf[Pi-1/2*I]+Erf[Pi+1/2*I]] > > iz zero
Hrm...but I get: (erf(pi - 1/2*I) + erf(pi + 1/2*I)).n() resulting in "TypeError: Unable to convert 3.14159265358979 - 0.500000000000000*I", which, as I've figured out, comes from the first erf(). It seems like .n() should return CC values when necessary, but the obvious workaround doesn't, well, work around the problem: erf(pi - 1/2*I).real_part().n() gives the same TypeError -- and suggests I use real_part()! Neither CC(erf(pi - 1/2*I)) nor CC(erf(pi - 1/2*I).real_part(), erf(pi - 1/2*I).imag_part()) work. We need to work on the numerical approximation stuff for the error function! Dan -- --- Dan Drake ----- http://mathsci.kaist.ac.kr/~drake -------
signature.asc
Description: Digital signature
