View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0000942 | MetaPost | bug | public | 2015-07-26 23:03 | 2015-08-03 07:28 | 
| Reporter | toby | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always | 
| Status | new | Resolution | open | ||
| Product Version | 1.890 | ||||
| Summary | 0000942: Simple numeric comparison fails with "binary" and "decimal" numersystems | ||||
| Description | 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.  | ||||
| Steps To Reproduce | Run show 0.0001 < 0.001, numbersystem, mpversion; end. with the 4 different number systems.  | ||||
| Tags | No tags attached. | ||||
| 
		 | 
	
	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" )  | 
| 
		 | 
	It should be fixed in trunk. | 
| 
		 | 
	Thanks - looks good from here. Can you share any details about where the bug was? | 
| 
		 | 
	
	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.  | 
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2015-07-26 23:03 | toby | New Issue | |
| 2015-07-27 17:57 | toby | Note Added: 0001389 | |
| 2015-07-30 08:53 | luigi scarso | Note Added: 0001390 | |
| 2015-08-02 20:51 | toby | Note Added: 0001391 | |
| 2015-08-03 07:28 | luigi scarso | Note Added: 0001392 |