Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMXReader creates different SkimMatrix than text_ij #208

Open
PeterVermont opened this issue Feb 8, 2019 · 1 comment
Open

OMXReader creates different SkimMatrix than text_ij #208

PeterVermont opened this issue Feb 8, 2019 · 1 comment
Labels

Comments

@PeterVermont
Copy link
Contributor

PeterVermont commented Feb 8, 2019

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 added a commit that referenced this issue Feb 8, 2019
@PeterVermont
Copy link
Contributor Author

Warning - there are numerous other places in the code that use a cast on ushort rather than the more accurate Convert.ToUInt16.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant