abs evaluation bug
Hi, automatic evaluation of the abs() function returns wrong results: ginsh - GiNaC Interactive Shell (ginac V1.5.8) __, _______ Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, (__) * | Germany. This is free software with ABSOLUTELY NO WARRANTY. ._) i N a C | You are welcome to redistribute it under certain conditions. <-------------' For details type `warranty;'. Type ?? for a list of help topics.
abs(Pi+I); I+Pi
abs_eval() thinks that I + Pi is nonnegative, since numeric::is_negative() returns false for complex numbers: http://www.ginac.de/ginac.git?p=ginac.git;a=blob;f=ginac/numeric.cpp;h=f0576... Any suggestions for a fix? Would it be acceptable to raise an error when comparing complex numbers? This was reported to Sage: http://trac.sagemath.org/sage_trac/ticket/11155 Cheers, Burcin
participants (2)
-
Alexei Sheplyakov
-
Burcin Erocal