Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigNumber comparison #2949

Closed
shmsula opened this issue May 10, 2023 · 2 comments
Closed

BigNumber comparison #2949

shmsula opened this issue May 10, 2023 · 2 comments
Labels

Comments

@shmsula
Copy link

shmsula commented May 10, 2023

Tried to compare two big numbers (1000000000000), however only last version works.

image

Is it correct behavior?

@josdejong
Copy link
Owner

The equality operators use an epsilon to compare numbers, which is 1e-12 by default. You will want to use a smaller epsilon.

See docs: https://mathjs.org/docs/datatypes/bignumbers.html#usage

@josdejong
Copy link
Owner

See also #2608, discussing the introduction of a separate epsilon for bignumbers to prevent the issue you're running into.

Repository owner locked and limited conversation to collaborators Oct 2, 2023
@gwhitney gwhitney converted this issue into discussion #3039 Oct 2, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants