Plutus provides arithmetic functions for Integers through the modules
PlutusTx.Builtins. Are there floating-point arithmetic functions which can be used on chain? If not, why is it so?
My opinion would be that:
Floating point operations are typically resource-consuming and expensive to compute.
I mean, even 1 ADA had to be made a million Lovelace in order for the possibility to have fractional amount of ADA.
I'd suggest you follow the same approach
- Let the onchain code deal with Integer and carry-out floating point operations off-chain.