DaySim
DaySim copied to clipboard
OMXReader creates different SkimMatrix than text_ij
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
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.