[comp.sys.mac.hypercard] Bug in the mod operator?

sjs@wucs1.wustl.edu (Steven J. Sadoff) (03/20/89)

While using the mod operator in Hypercard 1.2.1 (under system 6.0.3),
I think I have encountered a nasty bug.
Example #7 reveals the problem.

Example	Command			Result
------- -----------		-----------------------
1)	1    mod 60		1	(expected)
2)	1    div 60     	0	(expected)
3)	1.0  mod 60		1	(expected)
4)	1.0  div 60     	0	(expected)
5)	-1   mod 60		-1	(expected)
6)	-1   div 60     	0	(expected)
7)	-1.0 mod 60		59	(NOT EXPECTED)
8)	-1.0 div 60     	0	(expected)

One would desire that it is reasonable to assume that for all x and y
	y * (x div y) + (x mod y)  = x

Is this a bug, or am I doing something incorrectly ?

Steven Sadoff   (314)652-3200
Central Institute for the Deaf, 818 S. Euclid, St. Louis, MO 63110
INTERNET: sjs@wucs1.wustl.edu   BITNET:  sjs@wunet
UUCP:     sjs@wucs1.UUCP        or    ..!{ihnp4,uunet}!wucs1!sjs