MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000942MetaPostbugpublic2015-07-27 01:032015-08-03 09:28
Reportertoby 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version1.890 
Target VersionFixed in Version 
Summary0000942: Simple numeric comparison fails with "binary" and "decimal" numersystems
DescriptionConsider 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.
Steps To ReproduceRun

 show 0.0001 < 0.001, numbersystem, mpversion; end.

with the 4 different number systems.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0001389)
toby (reporter)
2015-07-27 19:57

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 (ie same bug 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" )
(0001390)
luigi scarso (manager)
2015-07-30 10:53

It should be fixed in trunk.
(0001391)
toby (reporter)
2015-08-02 22:51

Thanks - looks good from here. Can you share any details about where the bug was?
(0001392)
luigi scarso (manager)
2015-08-03 09:28

IIRC, it should be a patch from Akira. See
"better patch for to_boolean for decimal and binary number system (A. Kakuto)"
in the svn repo.

- Issue History
Date Modified Username Field Change
2015-07-27 01:03 toby New Issue
2015-07-27 19:57 toby Note Added: 0001389
2015-07-30 10:53 luigi scarso Note Added: 0001390
2015-08-02 22:51 toby Note Added: 0001391
2015-08-03 09:28 luigi scarso Note Added: 0001392


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker