DaySim icon indicating copy to clipboard operation
DaySim copied to clipboard

OMXReader creates different SkimMatrix than text_ij

Open PeterVermont opened this issue 6 years ago • 1 comments

It turns out that casting a double to ushort can truncate in unexpected ways.

For example .57 scaled by 100 became 56 rather than 57

Using Convert.ToUInt16 works correctly and should be used in all places rather than a cast

image

SkimReaders currently use a mix of casts and Convert.ToUInt16. Because it is anticipated that changing all casts to convert will change the results for many regression targets (and customers) it has been decided to defer this bug fix until we have another breaking change.

PeterVermont avatar Feb 08 '19 16:02 PeterVermont