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

Calc Package - wrong scientific value #473

Closed
lasgor opened this issue Oct 15, 2020 · 3 comments · Fixed by Keypirinha/Packages#39
Closed

Calc Package - wrong scientific value #473

lasgor opened this issue Oct 15, 2020 · 3 comments · Fixed by Keypirinha/Packages#39

Comments

@lasgor
Copy link

lasgor commented Oct 15, 2020

Calc package shows wrong scientific value for some numbers: e.g. 12e6*2048 shows as 2.4576e+1.
For this particular example, multiplying number with 12e6, it shows wrongly for 12e6*834 though 12e6*4999 it seems, whereas 12e6*833 and 12e6*5000 work fine.

@sam97
Copy link

sam97 commented Oct 18, 2020

At a cursory glance it seems that right-most "trailing" zeroes in the power are getting stripped off. Someone will have to look into how the Calc package is handling it. I'll see if I can take a crack at it tonight.

Some repros:

  • 12e6*2048 should give 2.4567e+10 but gives 2.4576e+1.
  • 100000000000e6*2048 should output 2.048e+20 but gives 2.048e+2.

@polyvertex
Copy link
Member

@sam97's patch has been merged. Reopening this until Keypirinha's next release. Thanks!

@polyvertex
Copy link
Member

Issue should be fixed in v2.26. Please try it out and thanks to both for reporting this and providing a patch! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants