From cde99e526d532d622938ff701974b3c98b40cf46 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 18 Jun 2024 13:44:48 +0000 Subject: [PATCH] Auto-generated commit --- .gitattributes | 29 ++- .github/workflows/publish.yml | 4 + CHANGELOG.md | 107 +++++++++- CONTRIBUTORS | 11 +- README.md | 88 +++++++++ benchmark/benchmark.native.js | 60 ++++++ benchmark/c/native/Makefile | 146 ++++++++++++++ benchmark/c/native/benchmark.c | 136 +++++++++++++ binding.gyp | 170 ++++++++++++++++ examples/c/Makefile | 146 ++++++++++++++ examples/c/example.c | 31 +++ include.gypi | 53 +++++ include/stdlib/math/base/special/vercos.h | 41 ++++ lib/native.js | 58 ++++++ manifest.json | 72 +++++++ package.json | 5 +- src/Makefile | 70 +++++++ src/addon.c | 22 +++ src/main.c | 34 ++++ test/test.native.js | 225 ++++++++++++++++++++++ 20 files changed, 1499 insertions(+), 9 deletions(-) create mode 100644 benchmark/benchmark.native.js create mode 100644 benchmark/c/native/Makefile create mode 100644 benchmark/c/native/benchmark.c create mode 100644 binding.gyp create mode 100644 examples/c/Makefile create mode 100644 examples/c/example.c create mode 100644 include.gypi create mode 100644 include/stdlib/math/base/special/vercos.h create mode 100644 lib/native.js create mode 100644 manifest.json create mode 100644 src/Makefile create mode 100644 src/addon.c create mode 100644 src/main.c create mode 100644 test/test.native.js diff --git a/.gitattributes b/.gitattributes index 10a16e6..1c88e69 100644 --- a/.gitattributes +++ b/.gitattributes @@ -40,10 +40,27 @@ *.mov binary # Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false +/lib/node_modules/** -linguist-vendored -linguist-generated -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false +# Configure directories which should *not* be included in GitHub language statistics: +/deps/** linguist-vendored +/dist/** linguist-generated +/workshops/** linguist-vendored + +benchmark/** linguist-vendored +docs/* linguist-documentation +etc/** linguist-vendored +examples/** linguist-documentation +scripts/** linguist-vendored +test/** linguist-vendored +tools/** linguist-vendored + +# Configure files which should *not* be included in GitHub language statistics: +Makefile linguist-vendored +*.mk linguist-vendored +*.jl linguist-vendored +*.py linguist-vendored +*.R linguist-vendored + +# Configure files which should be included in GitHub language statistics: +docs/types/*.d.ts -linguist-documentation diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ad3a3e0..b1d4bb8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -94,6 +94,10 @@ jobs: # Replace branch in README.md link definitions for badges with the new version: find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g" + # Rewrite CHANGELOG.md to replace "Unreleased" with the new version: + sed -Ei "s/Unreleased/${NEW_VERSION}/g" CHANGELOG.md + sed -Ei "s/unreleased/v${NEW_VERSION}/g" CHANGELOG.md + # Create a new commit and tag: git add package.json README.md git commit -m "Release v${NEW_VERSION}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af16c6..d4545cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,4 +2,109 @@ > Package changelog. -See [GitHub Releases](https://github.com/stdlib-js/math-base-special-vercos/releases) for the changelog. \ No newline at end of file +
+ +## Unreleased (2024-06-18) + +
+ +### Features + +- [`a4b2764`](https://github.com/stdlib-js/stdlib/commit/a4b276428bdc454a9412550375813f92bd242540) - add C implementation for `math/base/special/vercos` [(##2397)](#2397 ) + +
+ + + +
+ +### Commits + +
+ +- [`a4b2764`](https://github.com/stdlib-js/stdlib/commit/a4b276428bdc454a9412550375813f92bd242540) - **feat:** add C implementation for `math/base/special/vercos` [(##2397)](#2397 ) _(by Gunj Joshi)_ +- [`41d41e9`](https://github.com/stdlib-js/stdlib/commit/41d41e959b4eaad3c631e6898e3144a4015a5458) - **test:** include trailing newlines in Julia-generated JSON fixtures _(by Philipp Burckhardt)_ +- [`9ed7d0e`](https://github.com/stdlib-js/stdlib/commit/9ed7d0e7d57edb5ad0dfb65c944bed87d475cbf3) - **chore:** add missing trailing newlines _(by Philipp Burckhardt)_ + +
+ +
+ + + +
+ +### Contributors + +A total of 2 people contributed to this release. Thank you to the following contributors: + +- Gunj Joshi +- Philipp Burckhardt + +
+ + + +
+ + + +
+ +## 0.2.1 (2024-02-24) + +
+ +### Features + +- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9) - update minimum TypeScript version + +
+ + + +
+ +### BREAKING CHANGES + +- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9): update minimum TypeScript version +- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9): update minimum TypeScript version to 4.1 + + - To migrate, users should upgrade their TypeScript version to at least version 4.1. + +
+ + + +
+ +### Commits + +
+ +- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9) - **feat:** update minimum TypeScript version _(by Philipp Burckhardt)_ +- [`ce7e336`](https://github.com/stdlib-js/stdlib/commit/ce7e3367c0f9477773fe76dd0eca64dc6ad33c02) - **docs:** update equations _(by Philipp Burckhardt)_ +- [`c5da1f9`](https://github.com/stdlib-js/stdlib/commit/c5da1f9a22b1033d40115798acf13a09acf9410d) - **docs:** render equations via math code blocks _(by Philipp Burckhardt)_ + +
+ +
+ + + +
+ +### Contributors + +A total of 1 person contributed to this release. Thank you to this contributor: + +- Philipp Burckhardt + +
+ + + +
+ + + diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4500383..7ec15a7 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -5,6 +5,7 @@ Adarsh Palaskar Aditya Sapra AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com> +Aleksandr <112382387+alextes90@users.noreply.github.com> Ali Salesi Aman Bhansali Amit Jimiwal @@ -18,6 +19,7 @@ Chinmay Joshi <86140365+JawHawk@users.noreply.github.com> Christopher Dambamuromo Dan Rose Daniel Killenberger +Daniel Yu <40680511+Daniel777y@users.noreply.github.com> Dominik Moritz Dorrin Sotoudeh EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com> @@ -25,6 +27,7 @@ Frank Kovacs Golden Kumar <103646877+AuenKr@users.noreply.github.com> Gunj Joshi Harshita Kalani +Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com> Jaimin Godhani <112328542+Jai0401@users.noreply.github.com> James Gelok Jaysukh Makvana @@ -60,6 +63,7 @@ Pushpendra Chandravanshi Raunak Kumar Gupta Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> Ricky Reusser +Ridam Garg <67867319+RidamGarg@users.noreply.github.com> Robert Gislason Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> Rutam <138517416+performant23@users.noreply.github.com> @@ -69,8 +73,11 @@ Seyyed Parsa Neshaei Shashank Shekhar Singh Shivam <11shivam00@gmail.com> Shraddheya Shendre +Shubh Mehta <93862397+Shubh942@users.noreply.github.com> Shubham Mishra -Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com> +Sivam Das <100067002+Sivam2313@users.noreply.github.com> +Snehil Shah +Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com> Spandan Barve Stephannie Jiménez Gacha Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com> @@ -79,8 +86,10 @@ Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com> Utkarsh Utkarsh Raj Varad Gupta +Xiaochuan Ye Yernar Yergaziyev naveen nishant-s7 <97207366+nishant-s7@users.noreply.github.com> orimiles5 <97595296+orimiles5@users.noreply.github.com> +rainn <88160429+AmCodesLame@users.noreply.github.com> rei2hu diff --git a/README.md b/README.md index a8f5ec2..530b47d 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,94 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/vercos.h" +``` + +#### stdlib_base_vercos( x ) + +Computes the [versed cosine][versed-cosine] of a `number` (in radians). + +```c +double out = stdlib_base_vercos( 0.0 ); +// returns 2.0 + +out = stdlib_base_vercos( 3.141592653589793 / 2.0 ); +// returns 1.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_vercos( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/vercos.h" +#include + +int main( void ) { + const double x[] = { 0.0, 0.523, 0.785, 1.047, 3.14 }; + + double y; + int i; + for ( i = 0; i < 5; i++ ) { + y = stdlib_base_vercos( x[ i ] ); + printf( "vercos(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +