Bug introduced in 7.0 or earlier and fixed in 10.2.0
I found an unexpected behavior (that I think of as a bug) in evaluation of the equality operator applied to mathematical functions with exact arguments (i.e. not containing any approximate floating-point numbers):
AppellF1[1/2, 1/2, 1/2, 3/2, 1/2 + I √3 / 2, 1/2 - I √3 / 2] == EllipticK[3/4] / 2
(* False *)
This result is wrong. In fact, these two expressions are equal, so the ideal correct result would be True. I understand that Mathematica may not be able to immediately prove this equality, so it could return it unevaluated.
I guess that the wrong answer False is a result of round-off errors occurred when Mathematica tried to evaluate both operands numerically. But I believe that numerical approximations should only be used to decide equality if precision is enough to establish provably non-zero difference.
Here are some excerpts from Mathematica help confirming this point:
When given precise numbers, the Wolfram Language does not convert them to an approximate representation, but gives a precise result.
When
Equalcannot decide whether two numeric expressions are equal it returns unchanged.
I reported this issue to support@wolfram.com (CASE:3353933), but received a response saying this is not a bug. Update: we followed up on this issue and agreed that it's indeed a bug.
So I would like to know your opinion, whether this behavior is indeed by design?
Equalis usingN[]internally, try doingInputForm[N[(* number *)]]on each constant. You might also want to try varying the setting of the system variableInternal`$EqualTolerance. – J. M.'s missing motivation Jun 02 '15 at 22:58Equaldoes what it's supposed to, the incorrect result is due to theAppelF1evaluation at high precision not being sufficiently accurate. It should definitely be looked at and I'll let the developers know. – ilian Jun 03 '15 at 00:57Table[]of the Appell function value evaluated at different levels of precision… the elliptic integral I would expect to be very accurately evaluated, as that is computed using AGM. – J. M.'s missing motivation Jun 03 '15 at 02:21AppellF1evaluation at high precision not being sufficiently accurate). – ilian Jul 14 '15 at 18:01