Skip to content

Converting Micrograms to Milligrams for 5x values create non-rounded results #532

Description

@royashcenazi

an example worth a 1000 words
Micrograms(30).toMilligrams
results in
0.029999999999999995 instead of 0.03

This does not happen for numbers that are not divided without a remain by 5.

It seems to occur when multiplying the value in the conversion factor Micro = 1e-6

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions