Skip to content
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

Solve falsely returns zero for simple expressions containing BigFractions #919

Open
HannesWell opened this issue Feb 21, 2024 · 1 comment
Assignees
Labels

Comments

@HannesWell
Copy link
Collaborator

Describe the bug

Symja's Solve function returns result zero for simple expressions if the expression contains fractions whose numerator and denominator are integers exceeding the int value range and are therefore represented by a BigFraction.

To Reproduce

Example input Symja input expression:

>> Solve(x==Sqrt(9810/(2758454771764429/2251799813685248*2*6250796477692329/562949953421312)),x)

Error result:

{{x−>0}}

Expected behavior

The same result as if I were just evaluating the expression by itself.

>> Sqrt(9810/(2758454771764429/2251799813685248*2*6250796477692329/562949953421312))

as symbolic result

1125899906842624* sqrt(1635/5747513123739563366932509455047)

or numeric result

18.9897250155989157898553301222607618072295268142120...

Java

  • Version [e.g. Java 11]

Maybe this also relates to #918? But I haven't checked the latest snapshot yet.

axkr added a commit that referenced this issue Feb 21, 2024
@axkr
Copy link
Owner

axkr commented Feb 21, 2024

I changed isZERO() which uses PossibleZeroQ to isZero().
The main problem is that PossibleZeroQ uses a very weak numerically approx. for comparison.

axkr added a commit that referenced this issue Feb 23, 2024
- 916 create 2nd root solution
- 919 improved `Power(Times(...)`, fraction evaluation
@axkr axkr self-assigned this Mar 10, 2024
@axkr axkr added the bug label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants