2020-09-24 14:29:23 +0200 | commented question | Incorrect results for comparison expression Incidentally, |
2020-09-24 14:17:27 +0200 | commented answer | Incorrect results for comparison expression Unfortunately the Sage versions I have access to will all happily declare |
2020-09-23 21:26:28 +0200 | received badge | ● Editor (source) |
2020-09-23 21:23:50 +0200 | answered a question | Incorrect results for comparison expression I found a work-around in a question I had myself asked about 5 years ago (but apparently forgotten its lesson): "Incorrect result for comparison (precision issues?)" at ask.sagemath.org/question/32371 — the solution is to avoid the "<" operator for comparison (what a gotcha!), and define one's own Then it works correctly: Note that this function assumes that a ≠ b: |
2020-09-23 19:16:18 +0200 | asked a question | Incorrect results for comparison expression Sage incorrectly evaluates In more detail, consider this: What is going on? Why does the last boolean evaluate to False? This results in the failure of the assertion that Is there a way to compare two quantities that will result in a correct answer, using as much precision as necessary? |