You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A lot of sophisticated applications require fractions. This is not native to UPLC and hence not easy to represent in python
Describe the solution you'd like
A sample implementation of fractionals similar to the Plutus implementation would be good and simple to use
Optimally, this uses UPLC primitives and is thus fast and efficient.
Describe alternatives you've considered
One could also write a prelude-like implementation of fractions that uses a PlutusData or Tuple Object to represent fractions instead. Since we could exploit the native Pair structure of UPLC though it might make sense to use a native UPLC implementation instead.
Is your feature request related to a problem? Please describe.
A lot of sophisticated applications require fractions. This is not native to UPLC and hence not easy to represent in python
Describe the solution you'd like
A sample implementation of fractionals similar to the Plutus implementation would be good and simple to use
Optimally, this uses UPLC primitives and is thus fast and efficient.
For the user this should be importable as
from fractions import Fraction
or something in this directionhttps://docs.python.org/3/library/fractions.html
Describe alternatives you've considered
One could also write a prelude-like implementation of fractions that uses a PlutusData or Tuple Object to represent fractions instead. Since we could exploit the native Pair structure of UPLC though it might make sense to use a native UPLC implementation instead.
Additional context
https://github.com/input-output-hk/plutus/blob/master/plutus-tx/src/PlutusTx/Ratio.hs
https://github.com/Plutonomicon/pluto/blob/main/examples/field-of-rationals.pluto
The text was updated successfully, but these errors were encountered: