Numerically compare values

asked 8 years ago

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?

Preview: (hide)

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 ( 8 years ago )

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

slelievre gravatar imageslelievre ( 8 years ago )