The Wayback Machine - https://web.archive.org/web/20220320210446/https://github.com/topics/prolog
Skip to content
#

prolog

Here are 1,525 public repositories matching this topic...

triska
triska commented Mar 11, 2022

Currently, we have:

?- X is 0.1.
   X = 0.1.

which is conforming. However, 0.1 cannot be represented exactly as a floating point number.

It would therefore be useful to have a predicate that lets us inspect a floating point number in such a way that we can see what it "actually" is. For example, it would be useful to see the floating point number expressed as a

fpopineau
fpopineau commented Jul 29, 2020

Hi there,

Thanks for this amazing module.

I think there is a problem with the way terms are printed.
I run some Prolog code from Python, querying Prolog with:

H = pyswip.Variable()
induce = pyswip.Functor('induce', 1)
q = Query(induce(H))
q.nextSolution()
print(H.value)

I get a result like this for H:

[Functor(319757,2,
 [Functor(9048461,3,_10560234,_10560236,_1056023

Improve this page

Add a description, image, and links to the prolog topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the prolog topic, visit your repo's landing page and select "manage topics."

Learn more