Subject: [SWIPL] random/1

From: Pablo Lopez <[email-masked]>
Date: Wed, 21 Nov 2001 10:00:25 +0100

Hi,

I'm using SWI Prolog 4.0.10. The arithmetic predicate
random/1 behaves as follows:

   % zero argument

   ?- X is random(0).
   ERROR: Floating point exception
   [PROLOG STACK:
   ]
   % Execution Aborted

   % negative argument

   ?- X is random(-5).

   X = 4 ;

   No
   ?- 

Jan, I wonder whether that's the intended behavior or 
just  a simple bug.

Best,

  - Pablo