upiterbarg / mpmath

Automatically exported from code.google.com/p/mpmath
Other
0 stars 0 forks source link

identify returns the term sqrt(0) #196

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
mpmath.identify(e**e**e)
'1/log(((2-sqrt(0))/2))'

I know it's silly to ask PSLQ to identify e^e^e, but regardless, it shouldn't 
return sqrt(0), which is undefined. =)

Original issue reported on code.google.com by donmorri...@gmail.com on 8 Jul 2010 at 3:28

GoogleCodeExporter commented 9 years ago
Sorry, what I meant to say is, the resulting expression is undefined....a 
divide by zero exception.  sqrt(0) is of course defined.

1/log(1) == 1/0 --> divide by zero error.....maybe identify() should check that 
the denominator is not zero...

Original comment by donmorri...@gmail.com on 8 Jul 2010 at 4:31

GoogleCodeExporter commented 9 years ago
Yes, this should be dealt with better.

Perhaps both some sanity check on the number's magnitude, and a check for 0 in 
log, should be performed.

Original comment by fredrik....@gmail.com on 9 Jul 2010 at 9:42