-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make π < π work as expected (#27797)
Methods are added for < and <= comparing Irrationals. (The corresponding > and >= are then handled by existing fallback methods.) Currently, expressions like `ℯ < π` result in promotion to Float64. This works most of the time. However, `π < π` does not result in promotion and throws an error. This commit introduces a method for comparing an Irrational to itself. This commit also introduces a test to make sure that incorrect results are not being returned due to different user-defined irrationals rounding to the same Float64.
- Loading branch information
1 parent
b610f42
commit 3a27c52
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters