Skip to content

Conversation

@pozdnyakov
Copy link
Contributor

@pozdnyakov pozdnyakov requested a review from mourner December 5, 2018 16:29
@pozdnyakov pozdnyakov force-pushed the mikhail_fix_overflow_at_project branch from b75f25e to 85a426e Compare December 5, 2018 16:31
@pozdnyakov
Copy link
Contributor Author

This issue is detected by sanitizer when passing the tests.

Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the sanitizer error is division by zero, can we avoid it without introducing an epsilon? E.g. if (sine == 1.0) return 1.0;

@pozdnyakov
Copy link
Contributor Author

If the sanitizer error is division by zero, can we avoid it without introducing an epsilon? E.g. if (sine == 1.0) return 1.0;

std::sin could give us 0.9999999999999... that won't be exactly 1.0 but will still lead to an overflow error, epsilon solution looks safer.

@maxammann
Copy link
Contributor

@pozdnyakov which variable overflows here?

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.

3 participants