Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000247ILNumerics[All Projects] Bugspublic2018-02-06 18:252018-05-26 21:19
Reporterho 
Assigned Toho 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0000247: ILMath.Max() depending on argument order
Descriptionoutput of ILMath.max() differs by the order of arguments when at least one of the arguments has NaN values.
Steps To ReproduceILMath.max(double.NaN*ILMath.zeros(1,4), ILMath.ones(4,4))
<Double> [4,4]
    [0]: 1 1 1 1
    [1]: 1 1 1 1
    [2]: 1 1 1 1
    [3]: 1 1 1 1
ILMath.max(ILMath.ones(4,4), double.NaN*ILMath.zeros(1,4))
<Double> [4,4]
    [0]: ¤¤¤ ¤¤¤ ¤¤¤ ¤¤¤
    [1]: ¤¤¤ ¤¤¤ ¤¤¤ ¤¤¤
    [2]: ¤¤¤ ¤¤¤ ¤¤¤ ¤¤¤
    [3]: ¤¤¤ ¤¤¤ ¤¤¤ ¤¤¤

, i.e. the order of the input matters when NaNs are involved.
Additional Informationreported
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000264)
ho (administrator)
2018-02-06 18:28

Check with other accumulating functions (min()). This may be an issue with the code generation template.
(0000265)
ho (administrator)
2018-02-18 17:00

This also affects Min().
(0000266)
ho (administrator)
2018-05-24 17:11

Fixed in 5.0
(0000267)
ho (administrator)
2018-05-26 21:19

In version 5.0 max(A,B) and min(A,B) for floating point types receive an additional parameter determining how to deal with 1 NaN value when comparing 2 elements: either the NaN value found or the non-NaN value is taken. If both are NaN the first NaN value is returned.

- Issue History
Date Modified Username Field Change
2018-02-06 18:25 ho New Issue
2018-02-06 18:28 ho Note Added: 0000264
2018-02-18 17:00 ho Note Added: 0000265
2018-02-18 17:00 ho Assigned To => ho
2018-02-18 17:00 ho Status new => acknowledged
2018-05-24 17:11 ho Note Added: 0000266
2018-05-26 21:19 ho Note Added: 0000267
2018-05-26 21:19 ho Status acknowledged => resolved
2018-05-26 21:19 ho Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker