Numerically compare values

asked 2016-04-15 07:17:25 -0600

bmoi gravatar image

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?

edit retag flag offensive close merge delete

Comments

Your 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.

B r u n o gravatar imageB r u n o ( 2016-04-15 10:21:25 -0600 )edit

@bmoi: please give an example of your use case, this will help others give relevant answers.

slelievre gravatar imageslelievre ( 2016-04-17 09:57:24 -0600 )edit