users-prolog
[Top][All Lists]
Advanced

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

Discrepancy also in exception handling, not only result type (Was: rando


From: Jan Burse
Subject: Discrepancy also in exception handling, not only result type (Was: random/3)
Date: Fri, 11 Jan 2013 23:18:18 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Jan Burse schrieb:
Hi,

Just comparing random/3 across different systems.

GNU Prolog 1.4.2: float arguments give integer result:

     ?- random(0.0,999.0,X).
     X = 349


SWI-Prolog 6.3.6: float arguments give float result:

     ?- random(0.0,999.0,X).
     X = 741.3122108222138.

Bug or feature.

Bye

Also discrepancy with exception handling:

GNU Prolog 1.4.2

        ?- random(0,0,X).
        no

SWI-Prolog 6.3.6

        ?- random(0,0,X).
        ERROR: random/1: Domain error:
         `not_less_than_one' expected, found `0'

Bye





reply via email to

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