Introduce a Rational
Type
#407
Closed
fallen-icarus
started this conversation in
Core language features
Replies: 3 comments 1 reply
-
Cool idea, do you already have some idea on how to define this and what functions should go along with it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
PlutusTx has |
Beta Was this translation helpful? Give feedback.
1 reply
-
Rational Type is currently in the std lib 😄 |
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
-
Idea
Add the
Rational
type to the standard library. TheRational
type is a good way of representing decimals on-chain. Use cases:Current Alternative
The current alternative is to implement the
Rational
type yourself. This has the following issues:Rational
type for themselves.Rational
in slightly different ways which can cause unexpected behaviors when using another developer's version.It would be better if there was a single standard implementation we all used.
Beta Was this translation helpful? Give feedback.
All reactions