Skip to content

fix(sin): Update to latest complex.js to improve sin(z) for small im(z)#2525

Merged
gwhitney merged 2 commits into
developfrom
fix/sin_complex_small_im
Apr 13, 2022
Merged

fix(sin): Update to latest complex.js to improve sin(z) for small im(z)#2525
gwhitney merged 2 commits into
developfrom
fix/sin_complex_small_im

Conversation

@gwhitney
Copy link
Copy Markdown
Collaborator

Resolves #2523.

@gwhitney
Copy link
Copy Markdown
Collaborator Author

@yifanwww, the update to complex.js seems to have improved the situation for sin(a+bi) for b very small. However, there is still one test case of lgamma -- the one where I left the CEPSILON in place in this branch -- where lgamma still does not even have 1e-9 accuracy. It would be much appreciated if you could look into that sometime, especially given how the other cases of inaccuracy in lgamma led to uncovering a bug elsewhere in mathjs (and ultimately complex.js). Thanks!

Copy link
Copy Markdown
Owner

@josdejong josdejong left a comment

Choose a reason for hiding this comment

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

Looks good Glen, thanks!

I suppose any additional improvements in lgamma can be addressed separately from this PR? I think it's ready to merge.

@yifanwww
Copy link
Copy Markdown
Contributor

yifanwww commented Apr 13, 2022

@gwhitney got it, and thanks! I'll check that test case if I have time.

@gwhitney gwhitney merged commit 80571b7 into develop Apr 13, 2022
@josdejong josdejong deleted the fix/sin_complex_small_im branch April 14, 2022 18:08
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.

sin for complex numbers doesn't have extremely high precision, it's less accurate than that of real numbers

3 participants