Skip to content

Add unnormalized sinc/sinhc functions #492

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mattsignorelli
Copy link

Julia currently does not have any official implementations for the unnormalized sinc function, nor the hyperbolic sinc function. There has been much discussion about this (see JuliaLang/julia#55981, JuliaLang/julia#36954 (comment), https://discourse.julialang.org/t/unnormalized-sinc/25015/15, etc etc). My interpretation is that these functions for Julia v1.0 should go in SpecialFunctions.jl. If this is correct, then I have implemented the sincu and sinchu functions which are the unnormalized sine cardinal and hyperbolic unnormalized sine cardinal respectively. These functions are basically copy-pasted from the Boost C++ library (sinc and sinhc). Appropriate tests checking each of the thresholds have also been added.

I imagine we will want coscu as well as a sinhc at some point, but this PR would at least get the ball rolling and provide an "official" implementation of the sincu and sinhcu functions to interested downstream users.

Copy link

codecov bot commented Apr 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.17%. Comparing base (f8fd782) to head (4377c7a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #492      +/-   ##
==========================================
+ Coverage   94.11%   94.17%   +0.05%     
==========================================
  Files          14       15       +1     
  Lines        2905     2934      +29     
==========================================
+ Hits         2734     2763      +29     
  Misses        171      171              
Flag Coverage Δ
unittests 94.17% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mattsignorelli mattsignorelli changed the title Add unnormalized sinus cardinal functions Add unnormalized sinc/sinhc functions Apr 6, 2025
@mattsignorelli
Copy link
Author

@stevengj hello! I am sure you are quite busy, but just wanted to send a ping and see if this would be merged. Thanks!

@ViralBShah
Copy link
Member

Perhaps @oscardssmith can take a look

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.

2 participants