3 ms·
Integers are right there in the table on the page you're linking to. If you don't believe me, perhaps you'll believe output from the machine. https://tio.run/
by recursive 6y ago
Integers are right there in the table on the page you're linking to.
If you don't believe me, perhaps you'll believe output from the machine.
https://tio.run/##K0vSTc4vSv3/3zc/pTQnVcEjNScnn4szuDRJwTcxM09Dk4uTMyUzVyFPIbFYITOvJDU9tUjBVsHQACqegipuAhR2zs8rzs9J1QsvyixJ9cnMS9UwNFDQVzABGuWal6IANJoLREMs/P8fAA https://tio.run/##K0vSTc4vSv3/3zc/pTQnVcEjNScnn4szuDRJwTcxM0...
* edited for guideline compliance
- MaxBarraclough 6y agoLooks like you're right. In my defense the page I linked states that The / operator is defined only for the Decimal, Single, and Double data types. I suppose it accepts integer types by means of 'widening'? > Did you read it? The HN guidelines ask that you don't do that.
- recursive 6y agoI've edited my comment for guideline compliance. I don't think it settles anything, but a trivial function that divides two integers and returns the result compiles to this: IL_0000: ldarg.1 IL_0001: conv.r8 IL_0002: ldarg.2 IL_0003: conv.r8 IL_0004: div IL_0005: ret conv.r8 is an explicit conversion to double precision float in the target language, MSIL.
- MaxBarraclough 6y agoI was already convinced by your earlier tio.run example, but I'm still a bit baffled by the page saying The / operator is defined only for the Decimal, Single, and Double data types.