Re: [Ql-Users] Bevaiour of DIV with negative numbers in SBASIC (QPC2)

2017-01-06 Thread George Gwilt
> On 5 Jan 2017, at 15:27, Martyn Hill wrote: > > Hi everyone > > Can anyone tell me the expected behaviour for the integer-divide operator > 'DIV' in SBASIC, when provided with a negative dividend/numerator? > > My number-theory is a bit rusty, but I would have

[Ql-Users] Bevaiour of DIV with negative numbers in SBASIC (QPC2)

2017-01-05 Thread Martyn Hill
Hi everyone Can anyone tell me the expected behaviour for the integer-divide operator 'DIV' in SBASIC, when provided with a negative dividend/numerator? My number-theory is a bit rusty, but I would have thought that, say, -1 DIV 10 should result in 0 (with remainder/MOD of -1). Instead, on