diff --git a/CHANGELOG.md b/CHANGELOG.md index ba1f118c3..81d5f5164 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4282,6 +4282,28 @@ A total of 2 issues were closed in this release: +
+ +#### [@stdlib/math/base/special/vercos](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/vercos) + +
+ +
+ +##### Features + +- [`a4b2764`](https://github.com/stdlib-js/stdlib/commit/a4b276428bdc454a9412550375813f92bd242540) - add C implementation for `math/base/special/vercos` [(##2397)](#2397 ) + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/versin](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/versin) @@ -4666,6 +4688,7 @@ A total of 28 people contributed to this release. Thank you to the following con
+- [`a4b2764`](https://github.com/stdlib-js/stdlib/commit/a4b276428bdc454a9412550375813f92bd242540) - **feat:** add C implementation for `math/base/special/vercos` [(##2397)](#2397 ) _(by Gunj Joshi)_ - [`06f8b4a`](https://github.com/stdlib-js/stdlib/commit/06f8b4ad6fd804cd127387fa6a645cce0ee05250) - **feat:** add C implementation for `math/base/special/versin` [(##2398)](#2398 ) _(by Gunj Joshi)_ - [`c811882`](https://github.com/stdlib-js/stdlib/commit/c8118827f71ca602ccfea2721df03afbbd3857e5) - **feat:** add C implementation for `math/base/special/cosd` [(##2393)](#2393) _(by Gunj Joshi)_ - [`806075b`](https://github.com/stdlib-js/stdlib/commit/806075b124d1ab4fb7a541c117e0c7b6399a08b9) - **feat:** add C implementation for `math/base/special/hacoversin` [(##2387)](#2387) _(by Gunj Joshi)_ diff --git a/base/special/vercos/README.md b/base/special/vercos/README.md index c176a76ed..9eb8aee3f 100644 --- a/base/special/vercos/README.md +++ b/base/special/vercos/README.md @@ -93,6 +93,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 ); + } +} +``` + +
+ + + +
+ + +