Le 08/01/2017 à 09:42, Ralf Stephan a écrit :
On Sunday, January 8, 2017 at 9:14:15 AM UTC+1, Emmanuel Charpentier wrote:

Le dimanche 8 janvier 2017 08:48:33 UTC+1, Ralf Stephan a écrit :

You mean doing floating point computations to determine if an
expression is real?


Aaarghh..


That was tongue in cheek, sorry. Actually the cos case can be implemented
easily,
similarly to what we have done with
sage: log(pi/7).is_real()
True

Let's just ask, which functions result in any irreal with real argument,
not many I guess.

Making is_real works on the image of most functions would be good. It would in particular let Sage recognize that cos(pi/7) is a real number. Would it be easy to make is_real works on builtin functions?

However, an expression such as exp(I*pi/7) + exp(-I*pi/7) would still be considered as not being real. Even if

sage: (exp(I*pi/7) + exp(-I*pi/7)).imag()
0

Please, put me in cc if you open related tickets.

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to