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

bug(NODE-5047): fix rounding error #560

Closed
wants to merge 2 commits into from

Conversation

hconn-riparian
Copy link
Contributor

@hconn-riparian hconn-riparian commented Feb 7, 2023

Description

input: 37.499999999999999196428571428571375
output (w/o fix): 48.50000000000000020753968253968248
output (w/ fix): 37.49999999999999919642857142857138

What is changing?

It needs to break the loop when it finds the first non-9 digit during rounding

Is there new documentation needed for these changes?

What is the motivation for this change?

Double check the following

  • Ran npm run lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@hconn-riparian hconn-riparian changed the title bug(NODE): fix rounding error bug(NODE-xxxx): fix rounding error Feb 7, 2023
@dariakp dariakp changed the title bug(NODE-xxxx): fix rounding error bug(NODE-5047): fix rounding error Feb 7, 2023
@dariakp dariakp added External Submission tracked-in-jira There is a ticket in Mongo's Jira instance tracking this issue/PR labels Feb 7, 2023
@W-A-James
Copy link
Contributor

Hi @hconn-riparian! Thanks so much for providing this fix. We will be including it as part of #617 and related work, but we will be doing so along with a set of other changes and so will be closing this pull request. We will be sure that you are appropriately credited as the reporter of this bug and author of the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Submission tracked-in-jira There is a ticket in Mongo's Jira instance tracking this issue/PR
Projects
None yet
3 participants