users-prolog
[Top][All Lists]
Advanced

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

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


From: Daniel Diaz
Subject: Re: Discrepancy also in exception handling, not only result type (Was: random/3)
Date: Sun, 13 Jan 2013 19:26:54 +0100

Hi,

I will modify random/3 to conform to SWI and Yap behavior.

Thank you

Daniel


Le 11 janv. 2013 à 23:18, Jan Burse <address@hidden> a écrit :

> 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
> 
> 
> 
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/users-prolog
> 
> -- 
> Ce message a ete verifie par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ete trouve.
> 


-- 
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.




reply via email to

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