Questions tagged [integers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11
votes
4answers
6k views

Can't do any integer division

I'm building a new smart contract but really can't figure out how to perform integer division. I know that fixed point haven't been implemented yet but damn it should be possible to perform 100/3 = 33 ...
7
votes
1answer
560 views

Difference between the assembly code generated for uint and uint32?

I wrote a simple contract with a single state variable with type uint and the generated assembly code is quite straight forward. But when I changed the type to uint32 the generated assembly becomes ...
6
votes
2answers
5k views

Max/min values of standard data types

Where can I find the maximum and minimum values that various types can store? And an epsilon value for floats? I'm looking for something like C's limits.h, but for Solidity / EVM.
7
votes
3answers
4k views

Type casting msg.value to uint248

I am new to solidity programming and sorry if my question is very basic. I am wondering if we can cast msg.value to uint248 Example below ; uint value; value = (uint248) (msg.value);
4
votes
1answer
142 views

int256 range on geth command line

When I do the following on the geth command line: 20000000000000000000-19999999999999999989 it returns 0 I'm guessing this is because of a 64 bit limit on ints. Is there a way to get it to return ...