From 1c9d1c7a2117344617cf9dd510fa206db80db160 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 18 Jul 2024 16:51:40 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 23 +++ base/special/ceil10/README.md | 85 ++++++++ .../ceil10/benchmark/benchmark.native.js | 60 ++++++ .../ceil10/benchmark/c/native/Makefile | 146 +++++++++++++ .../ceil10/benchmark/c/native/benchmark.c | 136 ++++++++++++ base/special/ceil10/binding.gyp | 170 +++++++++++++++ base/special/ceil10/examples/c/Makefile | 146 +++++++++++++ base/special/ceil10/examples/c/example.c | 31 +++ base/special/ceil10/include.gypi | 53 +++++ .../include/stdlib/math/base/special/ceil10.h | 41 ++++ base/special/ceil10/lib/native.js | 54 +++++ base/special/ceil10/manifest.json | 102 +++++++++ base/special/ceil10/src/Makefile | 70 +++++++ base/special/ceil10/src/addon.c | 22 ++ base/special/ceil10/src/main.c | 76 +++++++ base/special/ceil10/test/test.native.js | 194 ++++++++++++++++++ 16 files changed, 1409 insertions(+) create mode 100644 base/special/ceil10/benchmark/benchmark.native.js create mode 100644 base/special/ceil10/benchmark/c/native/Makefile create mode 100644 base/special/ceil10/benchmark/c/native/benchmark.c create mode 100644 base/special/ceil10/binding.gyp create mode 100644 base/special/ceil10/examples/c/Makefile create mode 100644 base/special/ceil10/examples/c/example.c create mode 100644 base/special/ceil10/include.gypi create mode 100644 base/special/ceil10/include/stdlib/math/base/special/ceil10.h create mode 100644 base/special/ceil10/lib/native.js create mode 100644 base/special/ceil10/manifest.json create mode 100644 base/special/ceil10/src/Makefile create mode 100644 base/special/ceil10/src/addon.c create mode 100644 base/special/ceil10/src/main.c create mode 100644 base/special/ceil10/test/test.native.js diff --git a/CHANGELOG.md b/CHANGELOG.md index fb6379537..d4ba58069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2013,6 +2013,28 @@ This release closes the following issue: +
+ +#### [@stdlib/math/base/special/ceil10](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ceil10) + +
+ +
+ +##### Features + +- [`d4db8a9`](https://github.com/stdlib-js/stdlib/commit/d4db8a93b0c93cb3392b59ee031ce188399b90a5) - add C implementation for `math/base/special/ceil10` [(##2626)](#2626) + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/ceil2](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ceil2) @@ -5379,6 +5401,7 @@ A total of 29 people contributed to this release. Thank you to the following con
+- [`d4db8a9`](https://github.com/stdlib-js/stdlib/commit/d4db8a93b0c93cb3392b59ee031ce188399b90a5) - **feat:** add C implementation for `math/base/special/ceil10` [(##2626)](#2626) _(by Gunj Joshi)_ - [`5822206`](https://github.com/stdlib-js/stdlib/commit/5822206c2a023cb097ec057ed99b155383db909d) - **fix:** remove unused include in header file [(#2624)](https://github.com/stdlib-js/stdlib/pull/2624) _(by Gunj Joshi)_ - [`b82c6f0`](https://github.com/stdlib-js/stdlib/commit/b82c6f020ef6fe6b045fc71ccf773bb18c451303) - **remove:** remove `math/base/ops/cmul` _(by Athan Reines)_ - [`e3a3679`](https://github.com/stdlib-js/stdlib/commit/e3a3679f1e733cf02ce47cdc4bd0137bd37bef41) - **refactor:** update paths _(by Athan Reines)_ diff --git a/base/special/ceil10/README.md b/base/special/ceil10/README.md index 50a2f687c..adc429d7e 100644 --- a/base/special/ceil10/README.md +++ b/base/special/ceil10/README.md @@ -116,6 +116,91 @@ for ( i = 0; i < 100; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/ceil10.h" +``` + +#### stdlib_base_ceil10( x ) + +Rounds a `numeric` value to the nearest power of `10` toward positive infinity. + +```c +double y = stdlib_base_ceil10( -4.2 ); +// returns -1.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +double stdlib_base_ceil10( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/ceil10.h" +#include + +int main( void ) { + const double x[] = { 3.14, -3.14, 0.0, 9.0 / 0.0 }; + + double y; + int i; + for ( i = 0; i < 4; i++ ) { + y = stdlib_base_ceil10( x[ i ] ); + printf( "ceil10(%lf) = %lf\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + +