Questions tagged [floating-point]
18 questions
1
vote
0 answers
How to calculate x^y (x & y are fixed point numbers) with ABDKMath library? [request of specific example]
Let's say I have 2 decimals numbers, x and y. I have found this answer about how to calculate x^y: Is there any efficient way to compute the exponentiation of an fractional base and fractional exponent? and that part is pretty clear. My question…
Hiperfly
- 459
- 4
- 11
0
votes
1 answer
Attempting to calculate a majority vote
I am trying to create a small voting system in a smart contract where a vote is passed when the majority of admins have voted. I now realise that this is not as easy as I thought, as there are no floats in Solidity, so I cannot simply do…
Severin
- 173
- 5