fix: complete the Double math suite with missing C wrappers and registrations#1558
Open
sqrew wants to merge 1 commit into
Open
fix: complete the Double math suite with missing C wrappers and registrations#1558sqrew wants to merge 1 commit into
sqrew wants to merge 1 commit into
Conversation
b1273d2 to
cda5ed9
Compare
cda5ed9 to
887775c
Compare
hellerve
suggested changes
May 31, 2026
hellerve
left a comment
Member
There was a problem hiding this comment.
A few more things:
- Add tests for
Double.round. - Reduce churn in
carp_double.h. Your description says that functions were previously not defined in C, but this is not true. You just reordered them all over.
| (implements sqrt Double.sqrt) | ||
| (implements tan Double.tan) | ||
| (implements tanh Double.tanh) | ||
| (implements to-int Double.to-int) |
| #include <string.h> | ||
|
|
||
| const double CARP_DBL_MAX = DBL_MAX; | ||
| const double CARP_DBL_MIN = DBL_MIN; |
Member
There was a problem hiding this comment.
This is not registered, so currently dead code?
Comment on lines
+1
to
+2
| #ifndef CARP_DOUBLE_H | ||
| #define CARP_DOUBLE_H |
Member
There was a problem hiding this comment.
We don’t have this guard anywhere else.
Comment on lines
+4
to
+7
| #include <float.h> | ||
| #include <math.h> | ||
| #include <stdbool.h> | ||
| #include <string.h> |
Member
There was a problem hiding this comment.
We rely on include order, so this is odd.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses several dangling definitions in the Double module where functions were registered in the Lisp layer but missing their corresponding C wrappers in carp_double.h.
Changes: