Skip to content

Commit ff55505

Browse files
chore: minor clean up
1 parent 53723fe commit ff55505

File tree

13 files changed

+34
-43
lines changed

13 files changed

+34
-43
lines changed

lib/node_modules/@stdlib/math/base/special/ceilnf/README.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# ceilnf
2222

23-
> Round a numeric value to the nearest multiple of 10^n toward positive infinity.
23+
> Round a single-precision floating-point numeric value to the nearest multiple of 10^n toward positive infinity.
2424
2525
<section class="usage">
2626

@@ -32,7 +32,7 @@ var ceilnf = require( '@stdlib/math/base/special/ceilnf' );
3232

3333
#### ceilnf( x, n )
3434

35-
Rounds a `numeric` value to the nearest multiple of `10^n` toward positive infinity.
35+
Rounds a single-precision floating-point `numeric` value to the nearest multiple of `10^n` toward positive infinity.
3636

3737
```javascript
3838
// Round a value to 2 decimal places:
@@ -126,20 +126,12 @@ for ( i = 0; i < 100; i++ ) {
126126

127127
#### stdlib_base_ceilnf( x, n )
128128

129-
Rounds a single-precision floating-point number to the nearest multiple of `10^n` toward positive infinity.
129+
Rounds a single-precision floating-point numeric value to the nearest multiple of 10^n toward positive infinity.
130130

131131
```c
132132
// Round a value to 2 decimal places:
133133
float y = stdlib_base_ceilnf( 3.141592653589793f, -2f );
134134
// returns 3.15f
135-
136-
// If n = 0, `ceilnf` behaves like `ceil`:
137-
float y = stdlib_base_ceilnf( 3.141592653589793f, 0f );
138-
// returns 4.0f
139-
140-
// Round a value to the nearest thousand:
141-
float y = stdlib_base_ceilnf( 12368.0f, 3f );
142-
// returns 13000.0f
143135
```
144136

145137
The function accepts the following arguments:
@@ -174,7 +166,7 @@ float stdlib_base_ceilnf( const float x, const int32_t n );
174166
#include <stdio.h>
175167

176168
int main( void ) {
177-
const float x[] = { 3.14f, -3.14f, 0.0f, 0.0/0.0 };
169+
const float x[] = { 3.14f, -3.14f, 0.0f, 0.0f/0.0f };
178170

179171
float y;
180172
int i;
@@ -201,10 +193,8 @@ int main( void ) {
201193
202194
## See Also
203195
204-
- <span class="package-name">[`@stdlib/math/base/special/ceil`][@stdlib/math/base/special/ceil]</span><span class="delimiter">: </span><span class="description">round a double-precision floating-point number toward positive infinity.</span>
205-
- <span class="package-name">[`@stdlib/math/base/special/ceilb`][@stdlib/math/base/special/ceilb]</span><span class="delimiter">: </span><span class="description">round a numeric value to the nearest multiple of b^n toward positive infinity.</span>
206-
- <span class="package-name">[`@stdlib/math/base/special/floorn`][@stdlib/math/base/special/floorn]</span><span class="delimiter">: </span><span class="description">round a double-precision floating-point number to the nearest multiple of 10^n toward negative infinity.</span>
207-
- <span class="package-name">[`@stdlib/math/base/special/roundn`][@stdlib/math/base/special/roundn]</span><span class="delimiter">: </span><span class="description">round a double-precision floating-point number to the nearest multiple of 10^n.</span>
196+
- <span class="package-name">[`@stdlib/math/base/special/ceilf`][@stdlib/math/base/special/ceilf]</span><span class="delimiter">: </span><span class="description">Rounds a single-precision floating-point number toward positive infinity.</span>
197+
- <span class="package-name">[`@stdlib/math/base/special/ceiln`][@stdlib/math/base/special/ceiln]</span><span class="delimiter">: </span><span class="description">Rounds a numeric value to the nearest multiple of 10^n toward positive infinity.</span>
208198
209199
</section>
210200
@@ -218,13 +208,9 @@ int main( void ) {
218208
219209
<!-- <related-links> -->
220210
221-
[@stdlib/math/base/special/ceil]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ceil
222-
223-
[@stdlib/math/base/special/ceilb]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ceilb
224-
225-
[@stdlib/math/base/special/floorn]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/floorn
211+
[@stdlib/math/base/special/ceilf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ceilf
226212
227-
[@stdlib/math/base/special/roundn]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/roundn
213+
[@stdlib/math/base/special/ceiln]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ceiln
228214
229215
<!-- </related-links> -->
230216

lib/node_modules/@stdlib/math/base/special/ceilnf/benchmark/c/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ static float rand_float( void ) {
9191
*/
9292
static double benchmark( void ) {
9393
double elapsed;
94-
float x;
94+
float x;
9595
float y;
9696
double t;
9797
int i;
9898

9999
t = tic();
100100
for ( i = 0; i < ITERATIONS; i++ ) {
101-
x = ( 1000.0*rand_float() ) - 500.0f;
101+
x = ( 1000.0f*rand_float() ) - 500.0f;
102102
y = stdlib_base_ceilnf( x, -2 );
103103
if ( y != y ) {
104104
printf( "should not return NaN\n" );

lib/node_modules/@stdlib/math/base/special/ceilnf/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
{{alias}}( x, n )
3-
Rounds a numeric value to the nearest multiple of `10^n` toward positive
4-
infinity.
3+
Rounds a single-precision floating-point numeric value to the nearest
4+
multiple of `10^n` toward positive infinity.
55

66
When operating on single-precision floating-point numbers in bases other
77
than `2`, rounding to specified digits can be inexact.

lib/node_modules/@stdlib/math/base/special/ceilnf/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// TypeScript Version: 4.1
2020

2121
/**
22-
* Rounds a numeric value to the nearest multiple of `10^n` toward positive infinity.
22+
* Rounds a single-precision floating-point numeric value to the nearest multiple of `10^n` toward positive infinity.
2323
*
2424
* ## Notes
2525
*

lib/node_modules/@stdlib/math/base/special/ceilnf/include/stdlib/math/base/special/ceilnf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C" {
2929
#endif
3030

3131
/**
32-
* Rounds a single-precision floating-point number to the nearest multiple of \\(10^n\\) toward positive infinity.
32+
* Rounds a single-precision floating-point numeric value to the nearest multiple of 10^n toward positive infinity.
3333
*/
3434
float stdlib_base_ceilnf( const float x, const int32_t n );
3535

lib/node_modules/@stdlib/math/base/special/ceilnf/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'use strict';
2020

2121
/**
22-
* Round a numeric value to the nearest multiple of `10^n` toward positive infinity.
22+
* Round a single-precision floating-point numeric value to the nearest multiple of `10^n` toward positive infinity.
2323
*
2424
* @module @stdlib/math/base/special/ceilnf
2525
*

lib/node_modules/@stdlib/math/base/special/ceilnf/lib/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ var PINF = require( '@stdlib/constants/float32/pinf' );
3535
// VARIABLES //
3636

3737
var MAX_INT = MAX_SAFE_INTEGER + 1;
38-
var HUGE = 1.0e+308;
38+
var HUGE = 1.0e+38;
3939

4040

4141
// MAIN //
4242

4343
/**
44-
* Rounds a numeric value to the nearest multiple of \\(10^n\\) toward positive infinity.
44+
* Rounds a single-precision floating-point numeric value to the nearest multiple of \\(10^n\\) toward positive infinity.
4545
*
4646
* @param {number} x - input value
4747
* @param {integer} n - integer power of 10
@@ -87,7 +87,7 @@ function ceilnf( x, n ) {
8787
) {
8888
return x;
8989
}
90-
// The maximum absolute double is ~1.8e308. Accordingly, any possible positive finite `x` rounded to the nearest >=10^309 is infinity and any negative finite `x` is zero.
90+
// The maximum absolute double is ~1.8e38. Accordingly, any possible positive finite `x` rounded to the nearest >=10^39 is infinity and any negative finite `x` is zero.
9191
if ( n > MAX_EXP ) {
9292
if ( x <= 0.0 ) {
9393
return -0.0; // preserve the sign (same behavior as ceilf)

lib/node_modules/@stdlib/math/base/special/ceilnf/lib/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' );
2626
// MAIN //
2727

2828
/**
29-
* Rounds a single-precision floating-point number to the nearest multiple of \\(10^n\\) toward positive infinity.
29+
* Rounds a single-precision floating-point numeric value to the nearest multiple of \\(10^n\\) toward positive infinity.
3030
*
3131
* @private
3232
* @param {number} x - input value

lib/node_modules/@stdlib/math/base/special/ceilnf/manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@stdlib/math/base/napi/binary",
4242
"@stdlib/math/base/special/absf",
4343
"@stdlib/math/base/special/ceilf",
44+
"@stdlib/math/base/special/pow",
4445
"@stdlib/math/base/assert/is-nanf",
4546
"@stdlib/math/base/assert/is-infinitef",
4647
"@stdlib/constants/float32/max-base10-exponent",
@@ -65,6 +66,7 @@
6566
"dependencies": [
6667
"@stdlib/math/base/special/absf",
6768
"@stdlib/math/base/special/ceilf",
69+
"@stdlib/math/base/special/pow",
6870
"@stdlib/math/base/assert/is-nanf",
6971
"@stdlib/math/base/assert/is-infinitef",
7072
"@stdlib/constants/float32/max-base10-exponent",
@@ -89,6 +91,7 @@
8991
"dependencies": [
9092
"@stdlib/math/base/special/absf",
9193
"@stdlib/math/base/special/ceilf",
94+
"@stdlib/math/base/special/pow",
9295
"@stdlib/math/base/assert/is-nanf",
9396
"@stdlib/math/base/assert/is-infinitef",
9497
"@stdlib/constants/float32/max-base10-exponent",

lib/node_modules/@stdlib/math/base/special/ceilnf/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@stdlib/math/base/special/ceilnf",
33
"version": "0.0.0",
4-
"description": "Round a numeric value to the nearest multiple of 10^n toward positive infinity.",
4+
"description": "Round a single-precision floating-point numeric value to the nearest multiple of 10^n toward positive infinity.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",
@@ -55,7 +55,7 @@
5555
"stdmath",
5656
"mathematics",
5757
"math",
58-
"math.ceil",
58+
"math.ceilf",
5959
"ceilf",
6060
"ceilnf",
6161
"round",

0 commit comments

Comments
 (0)