Skip to content

Commit f2d05c1

Browse files
committed
Auto-generated commit
1 parent dd5d9a0 commit f2d05c1

21 files changed

Lines changed: 1013 additions & 53 deletions

File tree

CHANGELOG.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4053,6 +4053,42 @@ This release closes the following issue:
40534053

40544054
<!-- /.package -->
40554055

4056+
<section class="package" id="math-base-special-cceilf-unreleased">
4057+
4058+
#### [@stdlib/math/base/special/cceilf](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/cceilf)
4059+
4060+
<details>
4061+
4062+
<section class="breaking-changes">
4063+
4064+
##### BREAKING CHANGES
4065+
4066+
- [`0a3d6a1`](https://github.com/stdlib-js/stdlib/commit/0a3d6a1c7a55a18c65e2eef4a309d431c7a3346a): migrate to `stdlib_complex64_t`
4067+
4068+
- To migrate, users should update their usage of `complex` to `stdlib_complex64_t` which is available via `@stdlib/complex/float32/ctor` package.
4069+
4070+
</section>
4071+
4072+
<!-- /.breaking-changes -->
4073+
4074+
<section class="issues">
4075+
4076+
##### Closed Issues
4077+
4078+
This release closes the following issue:
4079+
4080+
[#3398](https://github.com/stdlib-js/stdlib/issues/3398)
4081+
4082+
</section>
4083+
4084+
<!-- /.issues -->
4085+
4086+
</details>
4087+
4088+
</section>
4089+
4090+
<!-- /.package -->
4091+
40564092
<section class="package" id="math-base-special-ccis-unreleased">
40574093

40584094
#### [@stdlib/math/base/special/ccis](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ccis)
@@ -7252,6 +7288,10 @@ This release closes the following issue:
72527288

72537289
### BREAKING CHANGES
72547290

7291+
- [`0a3d6a1`](https://github.com/stdlib-js/stdlib/commit/0a3d6a1c7a55a18c65e2eef4a309d431c7a3346a): migrate to `stdlib_complex64_t`
7292+
7293+
- To migrate, users should update their usage of `complex` to `stdlib_complex64_t` which is available via `@stdlib/complex/float32/ctor` package.
7294+
72557295
- [`d89509f`](https://github.com/stdlib-js/stdlib/commit/d89509f17211915d1fd25c735efc40c2e54cc239): migrate to `stdlib_complex64_t`
72567296

72577297
- To migrate, users should update their usage of `complex` to `stdlib_complex64_t` which is available via `@stdlib/complex/float32/ctor` package.
@@ -9799,9 +9839,9 @@ This release closes the following issue:
97999839

98009840
### Closed Issues
98019841

9802-
A total of 31 issues were closed in this release:
9842+
A total of 32 issues were closed in this release:
98039843

9804-
[#122](https://github.com/stdlib-js/stdlib/issues/122), [#216](https://github.com/stdlib-js/stdlib/pull/216), [#649](https://github.com/stdlib-js/stdlib/issues/649), [#3357](https://github.com/stdlib-js/stdlib/issues/3357), [#3393](https://github.com/stdlib-js/stdlib/issues/3393), [#5105](https://github.com/stdlib-js/stdlib/issues/5105), [#5199](https://github.com/stdlib-js/stdlib/issues/5199), [#5274](https://github.com/stdlib-js/stdlib/issues/5274), [#5359](https://github.com/stdlib-js/stdlib/issues/5359), [#5360](https://github.com/stdlib-js/stdlib/issues/5360), [#5363](https://github.com/stdlib-js/stdlib/issues/5363), [#5398](https://github.com/stdlib-js/stdlib/issues/5398), [#5399](https://github.com/stdlib-js/stdlib/issues/5399), [#5503](https://github.com/stdlib-js/stdlib/issues/5503), [#5526](https://github.com/stdlib-js/stdlib/issues/5526), [#5792](https://github.com/stdlib-js/stdlib/issues/5792), [#5835](https://github.com/stdlib-js/stdlib/issues/5835), [#5857](https://github.com/stdlib-js/stdlib/issues/5857), [#5862](https://github.com/stdlib-js/stdlib/issues/5862), [#5893](https://github.com/stdlib-js/stdlib/issues/5893), [#5898](https://github.com/stdlib-js/stdlib/issues/5898), [#5960](https://github.com/stdlib-js/stdlib/issues/5960), [#5961](https://github.com/stdlib-js/stdlib/issues/5961), [#6005](https://github.com/stdlib-js/stdlib/issues/6005), [#6083](https://github.com/stdlib-js/stdlib/issues/6083), [#6238](https://github.com/stdlib-js/stdlib/issues/6238), [#6312](https://github.com/stdlib-js/stdlib/issues/6312), [#6384](https://github.com/stdlib-js/stdlib/issues/6384), [#6499](https://github.com/stdlib-js/stdlib/issues/6499), [#6627](https://github.com/stdlib-js/stdlib/issues/6627), [#6629](https://github.com/stdlib-js/stdlib/issues/6629)
9844+
[#122](https://github.com/stdlib-js/stdlib/issues/122), [#216](https://github.com/stdlib-js/stdlib/pull/216), [#649](https://github.com/stdlib-js/stdlib/issues/649), [#3357](https://github.com/stdlib-js/stdlib/issues/3357), [#3393](https://github.com/stdlib-js/stdlib/issues/3393), [#3398](https://github.com/stdlib-js/stdlib/issues/3398), [#5105](https://github.com/stdlib-js/stdlib/issues/5105), [#5199](https://github.com/stdlib-js/stdlib/issues/5199), [#5274](https://github.com/stdlib-js/stdlib/issues/5274), [#5359](https://github.com/stdlib-js/stdlib/issues/5359), [#5360](https://github.com/stdlib-js/stdlib/issues/5360), [#5363](https://github.com/stdlib-js/stdlib/issues/5363), [#5398](https://github.com/stdlib-js/stdlib/issues/5398), [#5399](https://github.com/stdlib-js/stdlib/issues/5399), [#5503](https://github.com/stdlib-js/stdlib/issues/5503), [#5526](https://github.com/stdlib-js/stdlib/issues/5526), [#5792](https://github.com/stdlib-js/stdlib/issues/5792), [#5835](https://github.com/stdlib-js/stdlib/issues/5835), [#5857](https://github.com/stdlib-js/stdlib/issues/5857), [#5862](https://github.com/stdlib-js/stdlib/issues/5862), [#5893](https://github.com/stdlib-js/stdlib/issues/5893), [#5898](https://github.com/stdlib-js/stdlib/issues/5898), [#5960](https://github.com/stdlib-js/stdlib/issues/5960), [#5961](https://github.com/stdlib-js/stdlib/issues/5961), [#6005](https://github.com/stdlib-js/stdlib/issues/6005), [#6083](https://github.com/stdlib-js/stdlib/issues/6083), [#6238](https://github.com/stdlib-js/stdlib/issues/6238), [#6312](https://github.com/stdlib-js/stdlib/issues/6312), [#6384](https://github.com/stdlib-js/stdlib/issues/6384), [#6499](https://github.com/stdlib-js/stdlib/issues/6499), [#6627](https://github.com/stdlib-js/stdlib/issues/6627), [#6629](https://github.com/stdlib-js/stdlib/issues/6629)
98059845

98069846
</section>
98079847

@@ -9854,6 +9894,7 @@ A total of 30 people contributed to this release. Thank you to the following con
98549894

98559895
<details>
98569896

9897+
- [`0a3d6a1`](https://github.com/stdlib-js/stdlib/commit/0a3d6a1c7a55a18c65e2eef4a309d431c7a3346a) - **refactor:** update `math/base/special/cceilf` to follow latest project conventions [(#3400)](https://github.com/stdlib-js/stdlib/pull/3400) _(by Aayush Khanna, stdlib-bot, Karan Anand, Athan Reines)_
98579898
- [`d89509f`](https://github.com/stdlib-js/stdlib/commit/d89509f17211915d1fd25c735efc40c2e54cc239) - **refactor:** update `math/base/special/cabs2f` to follow latest project conventions [(#4767)](https://github.com/stdlib-js/stdlib/pull/4767) _(by Vivek Maurya, stdlib-bot, Karan Anand)_
98589899
- [`3656652`](https://github.com/stdlib-js/stdlib/commit/36566524e333dabea3b4b47c00b154accc1c2c23) - **feat:** add `math/base/special/lucasf` [(#6223)](https://github.com/stdlib-js/stdlib/pull/6223) _(by Harsh, stdlib-bot, Karan Anand)_
98599900
- [`dd317a4`](https://github.com/stdlib-js/stdlib/commit/dd317a4963fb9c35e1967a4b96556c3b060675c5) - **docs:** fix copy _(by Athan Reines)_

base/special/cceilf/README.md

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

2121
# cceilf
2222

23-
> Round a single-precision complex floating-point number toward positive infinity.
23+
> Round each component of a single-precision complex floating-point number toward positive infinity.
2424
2525
<section class="usage">
2626

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

3333
#### cceilf( z )
3434

35-
Rounds a single-precision complex floating-point number toward positive infinity.
35+
Rounds each component of a single-precision complex floating-point number toward positive infinity.
3636

3737
```javascript
3838
var Complex64 = require( '@stdlib/complex/float32/ctor' );
@@ -106,21 +106,30 @@ for ( i = 0; i < 100; i++ ) {
106106

107107
#### stdlib_base_cceilf( z )
108108

109-
Rounds a single-precision complex floating-point number toward positive infinity.
109+
Rounds each component of a single-precision complex floating-point number toward positive infinity.
110110

111111
```c
112-
#include <complex.h>
112+
#include "stdlib/complex/float32/ctor.h"
113+
#include "stdlib/complex/float32/real.h"
114+
#include "stdlib/complex/float32/imag.h"
113115

114-
float complex y = stdlib_base_cceilf( 2.5f-1.5f*I );
115-
// returns 3.0f-1.0f*I
116+
stdlib_complex64_t z = stdlib_complex64( 2.5f, -1.5f );
117+
118+
stdlib_complex64_t out = stdlib_base_cceilf( z );
119+
120+
float re = stdlib_complex64_real( out );
121+
// returns 3.0f
122+
123+
float im = stdlib_complex64_imag( out );
124+
// returns -1.0f
116125
```
117126

118127
The function accepts the following arguments:
119128

120-
- **z**: `[in] float complex` input value.
129+
- **z**: `[in] stdlib_complex64_t` input value.
121130

122131
```c
123-
float complex stdlib_base_cceilf( const float complex z );
132+
stdlib_complex64_t stdlib_base_cceilf( const stdlib_complex64_t z );
124133
```
125134
126135
</section>
@@ -143,19 +152,31 @@ float complex stdlib_base_cceilf( const float complex z );
143152
144153
```c
145154
#include "stdlib/math/base/special/cceilf.h"
155+
#include "stdlib/complex/float32/ctor.h"
156+
#include "stdlib/complex/float32/reim.h"
146157
#include <stdio.h>
147-
#include <complex.h>
148158
149159
int main( void ) {
150-
const float complex x[] = { 3.14f+1.5f*I, -3.14f-1.5f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
151-
152-
float complex v;
153-
float complex y;
160+
const stdlib_complex64_t x[] = {
161+
stdlib_complex64( 3.14f, 1.5f ),
162+
stdlib_complex64( -3.14f, -1.5f ),
163+
stdlib_complex64( 0.0f, 0.0f ),
164+
stdlib_complex64( 0.0f/0.0f, 0.0f/0.0f )
165+
};
166+
167+
stdlib_complex64_t v;
168+
stdlib_complex64_t y;
169+
float re1;
170+
float im1;
171+
float re2;
172+
float im2;
154173
int i;
155174
for ( i = 0; i < 4; i++ ) {
156175
v = x[ i ];
157176
y = stdlib_base_cceilf( v );
158-
printf( "cceilf(%f + %fi) = %f + %fi\n", crealf( v ), cimagf( v ), crealf( y ), cimagf( y ) );
177+
stdlib_complex64_reim( v, &re1, &im1 );
178+
stdlib_complex64_reim( y, &re2, &im2 );
179+
printf( "cceilf(%f + %fi) = %f + %fi\n", re1, im1, re2, im2 );
159180
}
160181
}
161182
```
@@ -172,12 +193,6 @@ int main( void ) {
172193

173194
<section class="related">
174195

175-
* * *
176-
177-
## See Also
178-
179-
- <span class="package-name">[`@stdlib/math/base/special/cceil`][@stdlib/math/base/special/cceil]</span><span class="delimiter">: </span><span class="description">round each component of a double-precision complex floating-point number toward positive infinity.</span>
180-
181196
</section>
182197

183198
<!-- /.related -->
@@ -188,8 +203,6 @@ int main( void ) {
188203

189204
<!-- <related-links> -->
190205

191-
[@stdlib/math/base/special/cceil]: https://github.com/stdlib-js/math/tree/main/base/special/cceil
192-
193206
<!-- </related-links> -->
194207

195208
</section>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var resolve = require( 'path' ).resolve;
24+
var bench = require( '@stdlib/bench' );
25+
var uniform = require( '@stdlib/random/base/uniform' );
26+
var isnanf = require( './../../../../base/assert/is-nanf' );
27+
var Complex64 = require( '@stdlib/complex/float32/ctor' );
28+
var real = require( '@stdlib/complex/float32/real' );
29+
var imag = require( '@stdlib/complex/float32/imag' );
30+
var tryRequire = require( '@stdlib/utils/try-require' );
31+
var pkg = require( './../package.json' ).name;
32+
33+
34+
// VARIABLES //
35+
36+
var cceilf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
37+
var opts = {
38+
'skip': ( cceilf instanceof Error )
39+
};
40+
41+
42+
// MAIN //
43+
44+
bench( pkg, opts, function benchmark( b ) {
45+
var values;
46+
var y;
47+
var i;
48+
49+
values = [
50+
new Complex64( uniform( -500.0, 500.0 ), uniform( -500.0, 500.0 ) ),
51+
new Complex64( uniform( -500.0, 500.0 ), uniform( -500.0, 500.0 ) )
52+
];
53+
54+
b.tic();
55+
for ( i = 0; i < b.iterations; i++ ) {
56+
y = cceilf( values[ i%values.length ] );
57+
if ( isnanf( real( y ) ) ) {
58+
b.fail( 'should not return NaN' );
59+
}
60+
}
61+
b.toc();
62+
if ( isnanf( imag( y ) ) ) {
63+
b.fail( 'should not return NaN' );
64+
}
65+
b.pass( 'benchmark finished' );
66+
b.end();
67+
});

0 commit comments

Comments
 (0)