Skip to content

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