Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Format floats to allow for very large/small values#52

Merged
shadowspore merged 1 commit into
shadowspore:masterfrom
buddy-sandidge:master
Oct 3, 2022
Merged

Format floats to allow for very large/small values#52
shadowspore merged 1 commit into
shadowspore:masterfrom
buddy-sandidge:master

Conversation

@buddy-sandidge
Copy link
Copy Markdown
Contributor

This is to resolve issue 51 #51

Using strconv.FormatFloat(val, 'g', 10, 64) to format floats means that very large or very small numbers will be rounded. For example, a value of 123456789012345680 will be saved as 123456789000000000. By using -1 for precision means the smallest number of digits will be used to represent a float exactly.

Using `strconv.FormatFloat(val, 'g', 10, 64)` to format floats means
that very large or very small numbers will be rounded. For example, a
value of 123456789012345680 will be saved as 123456789000000000. By
using -1 for precision means the smallest number of digits will be used
to exactly represent a float.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants