Skip to content

Fix isinteger #165

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

Merged
merged 1 commit into from
Jan 14, 2020
Merged

Fix isinteger #165

merged 1 commit into from
Jan 14, 2020

Conversation

kimikage
Copy link
Collaborator

@kimikage kimikage commented Jan 12, 2020

This fixes the issue #120 by means of the commonized function trunc.

This is for early feedback, so let's merge PR #163 first. Done.

Obviously this is slower than the method proposed in PR #123. However, I guess that isinteger is limitedly used, because the discovery of #120 was somewhat late and (parhaps) there was no need to rush to fix it. Even Integer, which is the rare use case of isinteger, is already broken (cf. #154 (comment)).

The trunc is SIMD-suitable, so the slowdown is not fatal. FYI, floor may be faster but may throw errors in the cases of Fixed{Int8,8} and so on.

@kimikage kimikage merged commit 930f19a into JuliaMath:master Jan 14, 2020
@kimikage kimikage deleted the isinteger branch January 14, 2020 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants