bug-prolog
[Top][All Lists]
Advanced

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

The evaluable function (^)/2.


From: Jan Burse
Subject: The evaluable function (^)/2.
Date: Sat, 7 Nov 2015 21:36:15 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38

Dear GNU Prolog Developer,

Accidentially, by some testing, I saw that GNU Prolog
produces the following results:

GNU Prolog 1.4.4 (64 bits)
Compiled Apr 23 2013, 16:05:07 with cl
?- X is 2^(-2).
X = 0
?- X is 2^(-1.5).
X = 0.35355339059327379

To my understanding supporting negative values and/or
non integer values for the second argument of (^)/2 is optional.

But returning zero in the first case above seems a little bit
odd to me. SWI Prolog produces the following results:

Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.3.10)
Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam
?- X is 2^(-2).
X = 0.25.
?- X is 2^(-1.5).
X = 0.3535533905932738.

Bye




reply via email to

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