Skip to content

feat: add math/base/special/tanf #5371

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

0PrashantYadav0
Copy link
Contributor

@0PrashantYadav0 0PrashantYadav0 commented Feb 22, 2025

Resolves None.

Description

What is the purpose of this pull request?

This pull request:

  • add benchmarks, examples, tests and docs for maths/base/special/tanf
  • add C implementation for tanf

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
  - task: run_javascript_examples
    status: na
  - task: run_c_examples
    status: na
  - task: run_cpp_examples
    status: na
  - task: run_javascript_readme_examples
    status: na
  - task: run_c_benchmarks
    status: na
  - task: run_cpp_benchmarks
    status: na
  - task: run_fortran_benchmarks
    status: na
  - task: run_javascript_benchmarks
    status: na
  - task: run_julia_benchmarks
    status: na
  - task: run_python_benchmarks
    status: na
  - task: run_r_benchmarks
    status: na
  - task: run_javascript_tests
    status: na
---
@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review. labels Feb 22, 2025
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Feb 22, 2025

Coverage Report

Package Statements Branches Functions Lines
math/base/special/tanf $\color{green}165/165$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}165/165$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@0PrashantYadav0
Copy link
Contributor Author

0PrashantYadav0 commented Feb 22, 2025

@kgryte @gunjjoshi I need help on how to add main implementation for tanf. Do you have to add base functionality like tan or we can use tanf as wrapper function on tan. ( Like i implemented for now, will changes according to your feedback ).

@0PrashantYadav0
Copy link
Contributor Author

/stdlib update-copyright-years

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Feb 22, 2025
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Feb 22, 2025
@kgryte
Copy link
Member

kgryte commented Feb 22, 2025

@0PrashantYadav0 You need to implement the single-precision variant based on a reference implementation. What you did in this PR is not what we are looking for.

As can be seen by reading the source of tan, we use msun as the reference implementation.

* The following copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/s_tan.c}. The implementation follows the original, but has been modified for JavaScript.

Accordingly, I suggest you follow that link and find the corresponding single-precision implementation, as it is that implementation which should serve as the basis on this package.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Feb 22, 2025
@0PrashantYadav0 0PrashantYadav0 marked this pull request as draft February 22, 2025 13:21
@Planeshifter Planeshifter added the Potential Duplicate There might be another pull request resolving the same issue. label Mar 15, 2025
@Planeshifter
Copy link
Member

⚠️ Tracking Issue Closure Warning ⚠️

I noticed your PR description contains closing keywords ("Resolves", "Closes", or "Fixes") referencing a "Tracking Issue".

Why this matters:
Tracking issues should typically remain open until all related sub-issues are completed. GitHub automatically closes issues with such closing keywords when the PR is merged.

Required action:
Use "Progresses:" or "Ref:" instead to reference the tracking issue without automatically closing it.

Thank you for your contribution to the project!

@stdlib-bot stdlib-bot removed the Potential Duplicate There might be another pull request resolving the same issue. label Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Math Issue or pull request specific to math functionality. Needs Changes Pull request which needs changes before being merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants