ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 17 Apr 2016 16:57:24 +0200Numerically compare valueshttps://ask.sagemath.org/question/33117/numerically-compare-values/I was wondering whether there is a way to numerically compare values. I don't want to use `==` due to the limited precision of floating point arithmetic. There are some possible solutions, for example here:
http: // floating-point-gui.de/errors/comparison/
My question is, is something like this already implemented in sage?Fri, 15 Apr 2016 14:17:25 +0200https://ask.sagemath.org/question/33117/numerically-compare-values/Comment by B r u n o for <p>I was wondering whether there is a way to numerically compare values. I don't want to use <code>==</code> due to the limited precision of floating point arithmetic. There are some possible solutions, for example here:</p>
<p>http: // floating-point-gui.de/errors/comparison/</p>
<p>My question is, is something like this already implemented in sage?</p>
https://ask.sagemath.org/question/33117/numerically-compare-values/?comment=33123#post-id-33123Your question is quite too vague: What are the values you are trying to compare? How were they defined? In Sage, there are a lot of solutions for numerical values: multiple-precision floating-point arithmetic (using mpfr), interval arithmetic, ball arithmetic, exact representation for algebraic numbers, etc.Fri, 15 Apr 2016 17:21:25 +0200https://ask.sagemath.org/question/33117/numerically-compare-values/?comment=33123#post-id-33123Comment by slelievre for <p>I was wondering whether there is a way to numerically compare values. I don't want to use <code>==</code> due to the limited precision of floating point arithmetic. There are some possible solutions, for example here:</p>
<p>http: // floating-point-gui.de/errors/comparison/</p>
<p>My question is, is something like this already implemented in sage?</p>
https://ask.sagemath.org/question/33117/numerically-compare-values/?comment=33132#post-id-33132@bmoi: please give an example of your use case, this will help others give relevant answers.Sun, 17 Apr 2016 16:57:24 +0200https://ask.sagemath.org/question/33117/numerically-compare-values/?comment=33132#post-id-33132