Bug with simple number comparisons with new number systems

Toby Thurston <[email protected]>
Newsgroups gmane.comp.tex.metapost
Message-ID <[email protected]>
I'm getting strange results comparing numbers with the new number systems.

Consider this program:

    show 0.0001 < 0.001, numbersystem, mpversion; end.

With the default number system this gives

>> true
>> "scaled"
>> "1.999" )

on my log. But with the other number systems I get: 

>> true
>> "double"
>> "1.999" )

>> false
>> "binary"
>> "1.999" )

>> false
>> "decimal"
>> "1.999" )

which is a bit unexpected...

I'm using a version I compiled myself from source after you fixed the normaldeviate bug a couple of months ago.
Testing with V1.902, the only other version I have on hand, I only get the error with "decimal". But it does not appear to matter what numbers I use.  I get the same results  with "1<2", or "1/4<1/2", etc

This is MetaPost, version 1.902 (TeX Live 2014) (kpathsea version 6.2.0)
>> true
>> "scaled" )
This is MetaPost, version 1.902 (TeX Live 2014) (kpathsea version 6.2.0)
>> true
>> "double" )
This is MetaPost, version 1.902 (TeX Live 2014) (kpathsea version 6.2.0)
>> true
>> "binary" )
This is MetaPost, version 1.902 (TeX Live 2014) (kpathsea version 6.2.0)
>> false
>> "decimal" )

I've posted an entry on the tracker.  Toby
--
http://tug.org/metapost/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.