« Return to Thread: strange behaviour of compare/3

Re: strange behaviour of compare/3

by Simon Strobl :: Rate this Message:

Reply to Author | View in Thread

Hello,

thank you for the interesting discussion. The most straightforward solution for my problem was to convert all my numbers to floats before comparing them. I suppose an analogous solution can be used in the vast majority of cases in which someone has a problem with compare/3. I just think that programmers could find their solutions quicker, if the Swi manual contained a sentence about the difficulties of comparing numbers (or other entities) of different types.

Simon

 « Return to Thread: strange behaviour of compare/3