>From this program.............

num = 4
x, u = symbols('x u')
Irr = Function('Irr')(u)
Irr = 4*pi**2*u**2*Abs(integrate(0.25*(1-cos(2*pi*x*num))*exp(-I*2*pi*u*x), 
(x, 0, 1)))**2 # Notice the use of Abs function.
print(N(Irr.subs(u,1.1)))

The result is ..................

0.0279388389446924 + 1.23479674389006e-24*I
But it is supposed to be a real number, not a complex, even with an imaginary 
part close to zero !!!

On the other hand, the same program on PyCharm - Python 3.5 is  
0.0279388389446924 (just real number)

Am I doing something wrong?

My system is.............
The version of the notebook server is *4.2.3* and is running on:
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/0e640955-2525-466e-9437-3dc14b05ee8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to