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

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

Merged
merged 1 commit into from
Oct 3, 2022
Merged

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

merged 1 commit into from
Oct 3, 2022

Conversation

buddy-sandidge
Copy link
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.

None yet

2 participants