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

"Big calculations" sanity-tests #89

Open
saxbophone opened this issue May 25, 2022 · 1 comment
Open

"Big calculations" sanity-tests #89

saxbophone opened this issue May 25, 2022 · 1 comment
Labels
testing Related to unit tests

Comments

@saxbophone
Copy link
Owner

Currently most thorough arithmetic testing relies upon randomly-generated inputs. This is fine for thorough and varied coverage, however gigantic values (that exceed uintmax_t on test system) are not used.

I'd like to write some additional separate unit tests that use the custom literals to test certain hardcoded sums on huge numbers, something like exponentiation would be a good idea, but most arithmetic operations should be tested in this way. An online calculator offering full precision in its results should be used to generate the expected return values —something like Wolfram Alpha wouldn't be a bad choice.

@saxbophone saxbophone added the testing Related to unit tests label May 25, 2022
@saxbophone
Copy link
Owner Author

We better choose our choices of calculations real carefully here, with exponentiation we are likely to run afoul of some limit somewhere for the maximum literal length, as these things reach thousands of digits very very quickly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to unit tests
Projects
None yet
Development

No branches or pull requests

1 participant