You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: