Questions tagged [floating-point]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
15 views

Create token exchange by defining decimal values

I just learnt a lot about solidity and decided to put it into practice. Something I truly don't understand is how I can bypass the limitations of this programming language. Assume the following ...
2
votes
1answer
53 views

Any way to do compile-time computation using rational_const and a constant value?

Of the following three declarations ufixed constant TEST1 = 256; uint constant TEST2 = 256; uint[] testTable1 = [uint(0.001 * TEST1), uint(0.01 * TEST1), uint(1.1 * TEST1)]; uint[] testTable2 = [uint(...
0
votes
2answers
93 views

What parameter type should I use for contract methods that specify floating point amounts?

In my dApp the user sets the entry fee for the game they are creating. The entry fee for games will usually be between $5 USD and $50 USD. What unit should I use for the contract method that accepts ...