Skip to content

For domain info cast int64 to double if overflowing#370

Merged
eddelbuettel merged 3 commits intomasterfrom
de/sc-14995/int64_domain_cast
Feb 24, 2022
Merged

For domain info cast int64 to double if overflowing#370
eddelbuettel merged 3 commits intomasterfrom
de/sc-14995/int64_domain_cast

Conversation

@eddelbuettel
Copy link
Copy Markdown
Contributor

@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
Copy Markdown

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.

2 participants