Questions tagged [decimals]

The tag has no usage guidance.

4 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
2answers
55 views

How can I multiply a fixed decimal var by a uint in solidity?

In base to this example: Dealing with multiplying fractions in solidity I am adding th DSMath correctly. I can operate and compile with integers but if I try to compile a contract with any decimal ...
1
vote
1answer
17 views

Vyper binary fixed point vs Decimal fixed point

there is something i do not understand in Vyper documentation: https://vyper.readthedocs.io/en/stable/index.html Binary fixed point: Decimal fixed point is better, because any decimal fixed point ...
0
votes
0answers
43 views

Division and floor rounding with 18 decimals

I am recreating a UNISWAP-like AMM and have encountered problems anytime I want to divide the balances of tokens in my pool. For example: I want to require() that tokens are deposited in the correct ...
0
votes
0answers
17 views

IERC1155Views - whether and how to use it?

Do I need to have IERC1155Views interface in my ERC-1155 contract to determine the number of decimals after the dot for the exchanges? If I don't specify IERC1155Views, what number of decimals will ...