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

For domain info cast int64 to double if overflowing #370

Merged
merged 3 commits into from Feb 24, 2022

Conversation

eddelbuettel
Copy link
Member

@eddelbuettel eddelbuettel commented Feb 24, 2022

Using uint64_t one can create domain bounds larger than what R can represent. So far we have savely errored but that blocks e.g. the schema display of the MTA demo. An alternative is to (only in the overflow case) cast to double instead which, while lossy in values beyond the max for the (signed or unsigned) integer types offers greater range.

The change has not shown any side effects in testing so far but may merit another discussion.

Marking this as draft for now. Upon further reflection, this is a net-improvement and ready for review, and I'd argue, merging.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #14995: Cast-not-error on overflow dimension.

@eddelbuettel eddelbuettel marked this pull request as draft February 24, 2022 15:14
@eddelbuettel eddelbuettel marked this pull request as ready for review February 24, 2022 20:00
@eddelbuettel eddelbuettel merged commit 7e390bd into master Feb 24, 2022
@eddelbuettel eddelbuettel deleted the de/sc-14995/int64_domain_cast branch February 24, 2022 21:30
@eddelbuettel eddelbuettel mentioned this pull request Mar 25, 2022
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.

None yet

2 participants