3 ms·
Looks 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
by MaxBarraclough 6y ago
Looks 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.