From 1a0f443cd4caa42ab2a89aeb201dd5a5b3490c1b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 28 Jul 2024 13:05:47 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 23 ++ base/special/fresnel/README.md | 90 ++++++ .../fresnel/benchmark/benchmark.native.js | 60 ++++ .../fresnel/benchmark/c/native/Makefile | 146 +++++++++ .../fresnel/benchmark/c/native/benchmark.c | 134 ++++++++ base/special/fresnel/binding.gyp | 170 +++++++++++ base/special/fresnel/examples/c/Makefile | 146 +++++++++ base/special/fresnel/examples/c/example.c | 32 ++ base/special/fresnel/include.gypi | 53 ++++ .../stdlib/math/base/special/fresnel.h | 38 +++ base/special/fresnel/lib/native.js | 65 ++++ base/special/fresnel/lib/rational_pcqc.js | 4 +- base/special/fresnel/lib/rational_pfqf.js | 4 +- base/special/fresnel/lib/rational_pgqg.js | 4 +- base/special/fresnel/lib/rational_psqs.js | 4 +- base/special/fresnel/manifest.json | 84 +++++ base/special/fresnel/scripts/evalrational.js | 60 ++++ base/special/fresnel/src/Makefile | 70 +++++ base/special/fresnel/src/addon.c | 41 +++ base/special/fresnel/src/main.c | 288 ++++++++++++++++++ base/special/fresnel/test/test.native.js | 226 ++++++++++++++ 21 files changed, 1734 insertions(+), 8 deletions(-) create mode 100644 base/special/fresnel/benchmark/benchmark.native.js create mode 100644 base/special/fresnel/benchmark/c/native/Makefile create mode 100644 base/special/fresnel/benchmark/c/native/benchmark.c create mode 100644 base/special/fresnel/binding.gyp create mode 100644 base/special/fresnel/examples/c/Makefile create mode 100644 base/special/fresnel/examples/c/example.c create mode 100644 base/special/fresnel/include.gypi create mode 100644 base/special/fresnel/include/stdlib/math/base/special/fresnel.h create mode 100644 base/special/fresnel/lib/native.js create mode 100644 base/special/fresnel/manifest.json create mode 100644 base/special/fresnel/src/Makefile create mode 100644 base/special/fresnel/src/addon.c create mode 100644 base/special/fresnel/src/main.c create mode 100644 base/special/fresnel/test/test.native.js diff --git a/CHANGELOG.md b/CHANGELOG.md index fabc22aec..65a128a50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3588,6 +3588,28 @@ This release closes the following issue: +
+ +#### [@stdlib/math/base/special/fresnel](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/fresnel) + +
+ +
+ +##### Features + +- [`f2f6164`](https://github.com/stdlib-js/stdlib/commit/f2f6164bcb23e3f0babda8fc651d2b3bc91be599) - add C implementation for `math/base/special/fresnel` + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/fresnelc](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/fresnelc) @@ -5707,6 +5729,7 @@ A total of 30 people contributed to this release. Thank you to the following con
+- [`f2f6164`](https://github.com/stdlib-js/stdlib/commit/f2f6164bcb23e3f0babda8fc651d2b3bc91be599) - **feat:** add C implementation for `math/base/special/fresnel` _(by Gunj Joshi, Philipp Burckhardt)_ - [`62e247d`](https://github.com/stdlib-js/stdlib/commit/62e247daf7eb45f201cad1784619a344cbdcaff6) - **feat:** add C implementation for `math/base/special/powm1` [(#2660)](https://github.com/stdlib-js/stdlib/pull/2660) _(by Gunj Joshi)_ - [`f5d15f7`](https://github.com/stdlib-js/stdlib/commit/f5d15f7e0d12169f3016f1d499674b0ce9b2e0ea) - **feat:** add C implementation for `math/base/special/sincospi` [(#2687)](https://github.com/stdlib-js/stdlib/pull/2687 ) _(by Gunj Joshi)_ - [`3fa6956`](https://github.com/stdlib-js/stdlib/commit/3fa69566a55e9cbb28650eea285d90a73b06db36) - **bench:** fix makefile to allow for dependency resolution _(by Athan Reines)_ diff --git a/base/special/fresnel/README.md b/base/special/fresnel/README.md index eb95d1300..cebc9b0b6 100644 --- a/base/special/fresnel/README.md +++ b/base/special/fresnel/README.md @@ -116,6 +116,96 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/fresnel.h" +``` + +#### stdlib_base_fresnel( x, &S, &C ) + +Simultaneously computes the [Fresnel integrals][fresnel-integral] S(x) and C(x). + +```c +double S; +double C; + +stdlib_base_fresnel( 4.0, &S, &C ); +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **S**: `[out] double*` destination for S(x). +- **C**: `[out] double*` destination for C(x). + +```c +void stdlib_base_fresnel( const double x, double *S, double *C ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/fresnel.h" +#include + +int main( void ) { + const double x[] = { 0.0, 1.57, 3.14, 6.28 }; + + double S; + double C; + int i; + for ( i = 0; i < 4; i++ ) { + stdlib_base_fresnel( x[ i ], &S, &C ); + printf( "x: %lf => S(x): %lf, C(x): %lf\n", x[ i ], S, C ); + } +} +``` + +
+ + + +
+ + +