2022-03-31 10:31:33 +0100 | received badge | ● Famous Question (source) |

2021-11-04 20:32:48 +0100 | received badge | ● Notable Question (source) |

2021-01-14 22:19:16 +0100 | received badge | ● Popular Question (source) |

2020-09-24 14:21:23 +0100 | commented answer | Incorrect result for comparison (precision issues?) I guess it may be impossible to handle the case when |

2020-09-23 22:48:23 +0100 | commented answer | Incorrect results for comparison expression For some reason, |

2020-09-23 21:31:39 +0100 | commented answer | Incorrect results for comparison expression Doesn't |

2020-09-23 21:30:23 +0100 | commented answer | Incorrect results for comparison expression Here's the earlier question: https://ask.sagemath.org/question/323... — I can't post it as a link from the account that asked the question, it's a new account with not enough karma, and I can't find a way to merge the accounts. |

2019-11-16 02:07:12 +0100 | commented question | Different results with for loop and while loop Related question: https://ask.sagemath.org/question/307... |

2019-11-15 23:38:34 +0100 | answered a question | Different results with for loop and while loop Figured out the the reason as well: with the type of On the other hand, with the type of |

2019-11-15 23:35:56 +0100 | asked a question | Different results with for loop and while loop While writing a Sage script, I ran into a strange case where code worked correctly with specific constants, but when I looped over them in a Here's the code: In short, the problem is that |

2016-02-17 19:30:11 +0100 | received badge | ● Famous Question (source) |

2016-01-31 03:27:23 +0100 | received badge | ● Notable Question (source) |

2016-01-30 00:56:06 +0100 | received badge | ● Popular Question (source) |

2016-01-29 17:46:21 +0100 | received badge | ● Scholar (source) |

2016-01-29 17:46:17 +0100 | commented answer | Incorrect result for comparison (precision issues?) I also tried this |

2016-01-29 17:20:49 +0100 | commented answer | Incorrect result for comparison (precision issues?) Very useful; thank you very much! I'll use this (will also mark this answer as accepted). But I'm wondering why |

2016-01-29 14:59:36 +0100 | received badge | ● Student (source) |

2016-01-29 08:24:29 +0100 | commented question | Incorrect result for comparison (precision issues?) This is extremely odd: but the correct value is (with But the odd part is that if I try log(1024)/log(10) * 82553493450 - 248510777753 > 0 http://www.wolframalpha.com/input/?i=log%281024%29%2Flog%2810%29+*+82553493450+-+248510777753+%3E+0 (on Wolfram Alpha) it correctly says True, but shows the approximate form of the difference as exactly the same wrong value: -0.0000610352 !! How are both Sage and Wolfram Alpha getting to the same wrong answer? |

2016-01-29 08:10:23 +0100 | commented question | Incorrect result for comparison (precision issues?) Trying "arbitrary precision" doesn't help either: or: both return False, versus which correctly returns True. It's beginning to look like a bug in Sage's |

2016-01-29 07:05:28 +0100 | asked a question | Incorrect result for comparison (precision issues?) Consider this session: or more simply: But this is wrong, as we can see with higher-precision arithmetic: I guess this is happening because Sage is computing to some finite precision. But when writing some bigger program, it's scary that a condition involving variables, like say, can without warning give the wrong result and take the wrong path. Is there a way to prevent this from happening, i.e. to make sure that in the program, comparisons are done using as many bits of precision as are necessary to evaluate them correctly, without us having to pre-specify a precision (which may be both too large and wasteful, or too small and give incorrect results)? |

2014-01-23 02:12:21 +0100 | received badge | ● Supporter (source) |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.