gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Behaviour of DIV and MOD in PIM4


From: Xin Wang
Subject: [Gm2] Behaviour of DIV and MOD in PIM4
Date: Tue, 22 Mar 2016 12:25:58 +0800

Hi,

Behaviour of DIV and MOD in PIM4 seems to be not consistant with document[1].

When compiling with gcc-4.7.4+gm2-1.1.5:

31 DIV (-10) = -4
31 MOD (-10) = -9
(-31) DIV (-10) = +3
(-31) MOD (-10) = -1

Which is different from document:

lval    rval    DIV    MOD
 31    -10    -3    1
-31    -10    4    9

[1] http://www.nongnu.org/gm2/dialect.html

-- 
Xin Wang (http://dram.me/)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]