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

pillar_shaft.integer64() warning with 0 #319

Closed
DavisVaughan opened this issue May 5, 2021 · 2 comments · Fixed by #324
Closed

pillar_shaft.integer64() warning with 0 #319

DavisVaughan opened this issue May 5, 2021 · 2 comments · Fixed by #324
Labels
Milestone

Comments

@DavisVaughan
Copy link
Member

pillar::pillar_shaft(bit64::as.integer64(0))
#> Warning in `*.integer64`((x[equal] - y[equal]), 2^-l2x[equal]): NAs produced by
#> integer64 overflow
#> <pillar_ornament>
#> 0

This comes from this line

out[equal] <- abs((x[equal] - y[equal]) * 2 ^ -l2x[equal]) <= eps_2

Which is eventually called with:

bit64::integer64(0) * Inf
#> Warning in `*.integer64`(bit64::integer64(0), Inf): NAs produced by integer64
#> overflow
#> integer64
#> [1] <NA>

Created on 2021-05-05 by the reprex package (v1.0.0)

@krlmlr krlmlr added this to the 1.6.2 milestone May 24, 2021
@krlmlr krlmlr added the bug label May 24, 2021
@krlmlr
Copy link
Member

krlmlr commented May 24, 2021

The underscores are also weird in the following example:

pillar::pillar_shaft(bit64::as.integer64(c(0, 1e7)))

krlmlr added a commit that referenced this issue May 24, 2021
- Fixed warning occurring with zeros of type `"integer64"` (#319).
krlmlr added a commit that referenced this issue May 24, 2021
- Fix warning with zero of type `bit64::integer64()` (#319).
@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants