[PPL-devel] Bignums
Roberto Bagnara
bagnara at cs.unipr.it
Wed Dec 25 20:43:48 CET 2002
Hi there,
I believe the following behavior of the CVS version of YAP
witnesses a bug (or, quite possible, a misunderstanding on my part):
$ yap
[ Restoring file /usr/local/lib/Yap/startup ]
[ YAP version Yap-4.3.23 ]
?- current_prolog_flag(bounded,X).
X = false ?
?- X is 333333333333333, integer(X).
no
?- X is 33333333, integer(X).
X = 33333333 ?
?- X is 333333333333333, float(X).
no
?- X is 333333333333333, number_chars(X,L).
X = 333333333333333,
L = [51,51,51,51,51,51,51,51,51,51,51,51,51,51,51] ?
In words, the Prolog engine first declares it is employing
unbounded integers, then it silently converts an integer
numeral to... to what?
Is this a bug? Am I missing something?
All the best
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
More information about the PPL-devel
mailing list