GithubHelp home page GithubHelp logo

Comments (12)

rhaamo avatar rhaamo commented on May 27, 2024

I tried the web sim and with the built one and I can only get "undef"

How to reproduce that ?

selection_038

from epsilon.

OLaurent-Maths avatar OLaurent-Maths commented on May 27, 2024

Wrong order of the functions in the issue description:
asin(acos(atan(ans)))

from epsilon.

rhaamo avatar rhaamo commented on May 27, 2024

Thanks! I'm getting the same with the built simulator.
I will try tomorrow with the real calc if there is the same issue.

from epsilon.

rhaamo avatar rhaamo commented on May 27, 2024

I've done more "tests", sim vs "another calc"

sin(9), 0.156434 vs  0.412118
cos(9), 0.987688 vs -0.911130
tan(9), 0.158384 vs -0.452315

Using KCalc on KDE, I got the same results as the simulator (web or "desktop app"), maybe this could be related to endianess of the platform.

from epsilon.

OLaurent-Maths avatar OLaurent-Maths commented on May 27, 2024

Works fine for me on another calculator (TI)
My guess is that when calling ANS, it tried to parse again the previous result : 0.017455 instead of getting the complex number behind it.
If you just try to do: asin(acos(atan(tan(cos(sin(9))), it works perfectly

from epsilon.

rhaamo avatar rhaamo commented on May 27, 2024

Still imprecise.
A casio responds with "0.4247779608", the sim "9", a single cos(), tan() or sin() is even wrong in the sim.
About the wront re-usage of "Ans" I think this is a separate issue.

from epsilon.

OLaurent-Maths avatar OLaurent-Maths commented on May 27, 2024

"A casio responds with "0.4247779608", the sim "9",-> this is normal : your CASIO calculator is set to radian so 0.4247779608 is also correct.

from epsilon.

Ecco avatar Ecco commented on May 27, 2024

Actual results from a device running 679CEA7.

asin(acos(atan(tan(cos(sin(9))))) gives 9

and

tan(cos(sin(9)))
-> 0.017455
asin(acos(atan(ans)))
-> 8.989918

This is indeed a rounding bug.

from epsilon.

OLaurent-Maths avatar OLaurent-Maths commented on May 27, 2024

Indeed, when evaluating the 'ans' value (Evaluation * LocalContext::ansValue()) it takes the last result of the calculation store with the precision of 7 digits.

from epsilon.

madhatter0 avatar madhatter0 commented on May 27, 2024

You can generate this even more simply: sqrt(2) followed by (Ans)^2 is 2.000001.

from epsilon.

madhatter0 avatar madhatter0 commented on May 27, 2024

This is now the oldest open bug. I hope OLaurent-Maths has put his finger on the problem, above: that Ans is evaluated with truncated precision. Please, is there any good reason not to carry forward all the available precision when operating on Ans? Or is something else going wrong here?

from epsilon.

artaxxx avatar artaxxx commented on May 27, 2024

This rounding bug is fixed in the new version 1.2.0

from epsilon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.