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 ); + } +} +``` + +
+ + + +
+ + +