-
Notifications
You must be signed in to change notification settings - Fork 97
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
better trigonometric functions' implementation #1559
Merged
Lampese
merged 7 commits into
moonbitlang:main
from
Kaida-Amethyst:better_trig_func_impl
Feb 5, 2025
Merged
better trigonometric functions' implementation #1559
Lampese
merged 7 commits into
moonbitlang:main
from
Kaida-Amethyst:better_trig_func_impl
Feb 5, 2025
Conversation
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
Pull Request Test Coverage Report for Build 5167Details
💛 - Coveralls |
2ad2022
to
90a0ef9
Compare
90a0ef9
to
3cc82ee
Compare
|
3cc82ee
to
22e45b1
Compare
bobzhang
approved these changes
Jan 24, 2025
inkydragon
reviewed
Jan 29, 2025
b8b0f39
to
e70d3e2
Compare
e70d3e2
to
f32edd5
Compare
0e3ea6b
to
5f1ea09
Compare
Lampese
approved these changes
Feb 5, 2025
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 aims to address the issue raised in #1488, where inconsistencies in trigonometric functions were identified. The current implementation shows deviations from JavaScript V8 and glibc, which could lead to precision-related issues in the future.
To resolve this, I have implemented custom versions of
sin
,cos
, andtan
based on the well-established fdlibm library. These implementations have undergone extensive testing in the Moonbit-Math repository, demonstrating high consistency with JavaScript V8's results.References:
update in 01/31/25, add
asin
,acos
,atan
,atan2
.update in 02/01/25, add
sin
,cos
,tan
for floating-point