Very strange? Code generation bug?

Ivan Senji ivan.senji_REMOVE_ at
Tue Apr 11 23:51:14 PDT 2006

Thank you guys for replying and especially Tom S for explaining this, I
get it now. It wasn't D it was me.

What works great is what Dave suggested
return (cast(float)(rand()%101)-50)/50;
but this shorter version works also
return (rand()%101)-50.)/50;

What I have learned is to be more careful with unsigned numbers and - :)

More information about the Digitalmars-d-bugs mailing list