Replies: 1 comment
-
We've created the topic #590 for implementing this idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
💡 The idea
We would like to introduce an explicit type system for representing floating-point numbers represented by the
Double
type.This type system should have the following types:
NonZeroDouble
representing floating-point numbers represented by theDouble
type other than zero.PositiveDouble
representing positive floating-point numbers represented by theDouble
type, including zero.NegativeDouble
representing negative floating-point numbers represented by theDouble
type, including zero.StrictlyPositiveDouble
representing positive floating-point numbers represented by theDouble
type, excluding zero.StrictlyNegativeDouble
representing negative floating-point numbers represented by theDouble
type, excluding zero.All types of this type system should be comparable and serializable, and should have at least the following functions:
toDouble
for returning the floating-point number as aDouble
.toString
for returning the string representation of the floating-point number.Here's an example of what this new type system could look like:
🙏 Help needed
Please give this post a reaction if you are interested in this feature, or comment it below if you have any suggestion.
We would love to have your feedback!
Beta Was this translation helpful? Give feedback.
All reactions