Oh Dear

Michiel Helvensteijn m.helvensteijn.remove at gmail.com
Sun Jul 12 13:52:43 PDT 2009


Walter Bright wrote:

>> I don't have a D compiler
>> installed, and I don't really have time for this.
> 
> Thanks to Ary, there's now a one click installer for Windows:
> 
> http://ftp.digitalmars.com/dinstaller.exe

That's nice. But I run Linux.

Walter, surely this test shouldn't take more than a minute for you (or
anyone else with a D compiler installed). Just see what DMD outputs for:

  8  /   3
  8  / (-3)
(-8) /   3
(-8) / (-3)
  8  %   3
  8  % (-3)
(-8) %   3
(-8) % (-3)

If D uses DIV instead if IDIV, this should be immediately visible. In any
case, we will see exactly what kind of division and modulo D uses. You can
compare with the table on the bottom of page 3 of:

http://www.cs.uu.nl/~daan/download/papers/divmodnote.pdf

That's an informative article, by the way.

-- 
Michiel Helvensteijn




More information about the Digitalmars-d mailing list