Repository navigation
Conversation
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This branch has not been deployed
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.
Resolves a part of #649.
Description
This pull request:
@stdlib/math/base/special/cschf, which computes the hyperbolic cosecant of a single-precision floating-point number, with JavaScript and C implementations1 / sinhf( x ), mirroringmath/base/special/csch(1 / sinh( x )) and the structure ofmath/base/special/sechftest/fixtures/julia/runner.jl): decimal values in[-80, 80](an even number of points, sox = 0is not included), large negative and positive values (|x|in[50, 88]), and tiny negative and positive values (|x|in[1e-38, 1e-30])NaN,+-0(returns+-Infinity),+-Infinity(returns+-0),|x| > ~89.416wheresinhfoverflows (returns+-0), subnormal inputs whose reciprocal overflows (returns+-Infinity), and that the function is oddRelated Issues
This pull request has the following related issues:
Reference Packages
This pull request followed these packages:
math/base/special/sechfmath/base/special/cschmath/base/special/cothfsechfcsch+-0, odd-function and subnormal tests fromcothfcschhas a pole at zero, so the decimal fixture uses an even number of points to avoidx = 0, whose value (Infinity) cannot be stored in JSON; zero is tested separatelysinhfoverflows for|x| > ~89.416, so the result is+-0)Questions
No.
Other
test/test.js.-O2 -Wall -Wextra(no warnings) together with its dependencies and checked against the same fixtures with a small harness: at most 2 ULP on the decimal and large sets, exact on the tiny sets, and all special cases above pass. The C example and C benchmark compile and run.test/test.native.jswas not run here.sechffixtures.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, which adapted the package from
math/base/special/sechf, generated the fixtures with Julia, and ran the JavaScript tests and a C harness against them. I reviewed the diff before submitting.@stdlib-js/reviewers