Discussions related to Visual Prolog
mdosnov2016
VIP Member
Posts: 73
Joined: 19 Nov 2016 7:58

the operators rem and mod don't function correctly after 238 operand

Unread post by mdosnov2016 »

I am having trouble with mod/rem don't work correctly for numbers higher than 238.
e.g. Modulo5 = 239 mod 5
fails.
Shall I use functions from different class?
PrologUser
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Re: the operators rem and mod don't function correctly after 238 operand

Unread post by Harrison Pratt »

If Modulo5 = 239 mod 5 fails it is because Modulo5 is already bound to a different value and you are asking if the mathematical expression gives the same result as is already bound to Modulo5.

Mod and rem are built-in functions.
Post Reply