From e4445c8ba461456fa297618f2c9d0e1b0b4f48c5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 27 Jul 2024 18:25:21 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 23 ++ base/special/fresnelc/README.md | 88 +++++++ .../fresnelc/benchmark/benchmark.native.js | 60 +++++ .../fresnelc/benchmark/c/native/Makefile | 146 +++++++++++ .../fresnelc/benchmark/c/native/benchmark.c | 136 +++++++++++ base/special/fresnelc/binding.gyp | 170 +++++++++++++ base/special/fresnelc/examples/c/Makefile | 146 +++++++++++ base/special/fresnelc/examples/c/example.c | 31 +++ base/special/fresnelc/include.gypi | 53 ++++ .../stdlib/math/base/special/fresnelc.h | 41 ++++ base/special/fresnelc/lib/native.js | 62 +++++ base/special/fresnelc/lib/rational_pcqc.js | 4 +- base/special/fresnelc/lib/rational_pfqf.js | 4 +- base/special/fresnelc/lib/rational_pgqg.js | 4 +- base/special/fresnelc/manifest.json | 81 ++++++ base/special/fresnelc/scripts/evalrational.js | 56 +++++ base/special/fresnelc/src/Makefile | 70 ++++++ base/special/fresnelc/src/addon.c | 23 ++ base/special/fresnelc/src/main.c | 231 ++++++++++++++++++ base/special/fresnelc/test/test.native.js | 186 ++++++++++++++ 20 files changed, 1609 insertions(+), 6 deletions(-) create mode 100644 base/special/fresnelc/benchmark/benchmark.native.js create mode 100644 base/special/fresnelc/benchmark/c/native/Makefile create mode 100644 base/special/fresnelc/benchmark/c/native/benchmark.c create mode 100644 base/special/fresnelc/binding.gyp create mode 100644 base/special/fresnelc/examples/c/Makefile create mode 100644 base/special/fresnelc/examples/c/example.c create mode 100644 base/special/fresnelc/include.gypi create mode 100644 base/special/fresnelc/include/stdlib/math/base/special/fresnelc.h create mode 100644 base/special/fresnelc/lib/native.js create mode 100644 base/special/fresnelc/manifest.json create mode 100644 base/special/fresnelc/src/Makefile create mode 100644 base/special/fresnelc/src/addon.c create mode 100644 base/special/fresnelc/src/main.c create mode 100644 base/special/fresnelc/test/test.native.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 30d0680da..a5809c4d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3587,6 +3587,28 @@ This release closes the following issue: +
+ +#### [@stdlib/math/base/special/fresnelc](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/fresnelc) + +
+ +
+ +##### Features + +- [`4a2534a`](https://github.com/stdlib-js/stdlib/commit/4a2534a22c2ead42a6318bed2fce221286f9f7a8) - add C implementation for `math/base/special/fresnelc` [(#2680)](https://github.com/stdlib-js/stdlib/pull/2680) + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/fresnels](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/fresnels) @@ -5604,6 +5626,7 @@ A total of 29 people contributed to this release. Thank you to the following con
+- [`4a2534a`](https://github.com/stdlib-js/stdlib/commit/4a2534a22c2ead42a6318bed2fce221286f9f7a8) - **feat:** add C implementation for `math/base/special/fresnelc` [(#2680)](https://github.com/stdlib-js/stdlib/pull/2680) _(by Gunj Joshi)_ - [`c476e32`](https://github.com/stdlib-js/stdlib/commit/c476e32e617de04644d9fbf399a34f80661778ea) - **feat:** add C implementation for `math/base/special/fresnels` [(#2675)](https://github.com/stdlib-js/stdlib/pull/2675) _(by Gunj Joshi)_ - [`7e04d9e`](https://github.com/stdlib-js/stdlib/commit/7e04d9e27fb5008c1cbc6e45e08ea6ad4b8993d2) - **refactor:** use max-safe-nth-factorial package [(#2676)](https://github.com/stdlib-js/stdlib/pull/2676 ) _(by Gunj Joshi)_ - [`26e46d5`](https://github.com/stdlib-js/stdlib/commit/26e46d57474904e02d69b98d8e06052333522257) - **docs:** fix missing `@private` tag [(#2672)](https://github.com/stdlib-js/stdlib/pull/2672) _(by Gunj Joshi)_ diff --git a/base/special/fresnelc/README.md b/base/special/fresnelc/README.md index 6953bfe4b..83b59b22c 100644 --- a/base/special/fresnelc/README.md +++ b/base/special/fresnelc/README.md @@ -100,6 +100,94 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/fresnelc.h" +``` + +#### stdlib_base_fresnelc( x ) + +Computes the [Fresnel integral][fresnel-integral] C(x). + +```c +double out = stdlib_base_fresnelc( 0.0 ); +// returns ~0.0 + +out = stdlib_base_fresnelc( 1.0 ); +// returns ~0.780 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_fresnelc( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/fresnelc.h" +#include + +int main( void ) { + const double x[] = { 0.0, 3.14, 5.55, 10.0 }; + + double y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_fresnelc( x[ i ] ); + printf( "fresnelc(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +