-
-
Notifications
You must be signed in to change notification settings - Fork 115
Automatic arithmetic promotion #588
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
base: main
Are you sure you want to change the base?
Automatic arithmetic promotion #588
Conversation
82e1d75 to
19d08bc
Compare
|
I'll also aim to add missing Clojure test suite test cases for some of the arithmetic promotion operators. |
|
Interestingly enough it looks like Clojure doesn't seem to support automatic arithmetic promotion from a |
359cba1 to
452e148
Compare
Seems like Clojure intentionally chooses to not promote to |
jeaye
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good. CI is failing, though.
f78df29 to
22fd3dd
Compare
|
CI fails due to: jank-lang/clojure-test-suite#828 (comment). |
|
I've commented the Clojure test suite test cases for these operators, the CI passes now. |
After discussing with the Clojure core team we found out that Clojure intentionally chooses not to support automatic promotion for `real` values to `big_decimal`. - Clojure Q/A: https://ask.clojure.org/index.php/14752/support-for-automatic-promotion-to-bigdecimal-in-etc. - Slack thread: https://clojurians.slack.com/archives/C053AK3F9/p1762684740564009.
Resolves jank-lang#604.
22fd3dd to
9a39ef7
Compare
Initial work at arithmetic promotion. The PR still requires tests but I'm creating this so that I can get some early feedback, especially on the overflow detection logic.
Requires a repoint.
Resolves #359, #604.