integer division with float result
0ffh
frank at frankhirsch.youknow.what.todo.net
Mon Nov 19 14:48:34 PST 2007
0ffh wrote:
> then it will make actual integer division slow (three casts
> and the float division) unless you have the compiler do type
Hrmm, probably int division and two casts would suffice, which
might be reduced by the optimiser to just the division. Still,
this works only for for some cases and does not invalidate the
overall argument (bit like some kind of type inference through
the back door, with the same weakness).
regards, frank
More information about the Digitalmars-d
mailing list