Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Dec 1, 2024
1 parent 5ab0446 commit a81ca6c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2620,6 +2620,7 @@ A total of 5 people contributed to this release. Thank you to the following cont

<details>

- [`92c0d4e`](https://github.com/stdlib-js/stdlib/commit/92c0d4e65a8ffef2a2264ba906cfe8020c483b13) - **docs:** clean-up and use C floats when appropriate _(by Philipp Burckhardt)_
- [`d24969e`](https://github.com/stdlib-js/stdlib/commit/d24969e35be1cfbff2e0d62d740c451e476ee444) - **chore:** update package meta data [(#3303)](https://github.com/stdlib-js/stdlib/pull/3303) _(by stdlib-bot, Athan Reines)_
- [`e01c8e2`](https://github.com/stdlib-js/stdlib/commit/e01c8e28e77db58112d6bdcffa2e924f648e09fd) - **feat:** add C implementation for `math/base/special/riemann-zeta` [(#2737)](https://github.com/stdlib-js/stdlib/pull/2737) _(by Gunj Joshi, stdlib-bot)_
- [`2a10dde`](https://github.com/stdlib-js/stdlib/commit/2a10dde4b821cf7d96fcd76339beac03e9548f47) - **bench:** update benchmarks and examples in `math/base/special/ldexp` [(#2781)](https://github.com/stdlib-js/stdlib/pull/2781) _(by Gunj Joshi, stdlib-bot)_
Expand Down
28 changes: 7 additions & 21 deletions base/special/croundf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ Rounds each component of a single-precision complex floating-point number to the
#include "stdlib/complex/float32/real.h"
#include "stdlib/complex/float32/imag.h"

stdlib_complex64_t z = stdlib_complex64( -4.2, 5.5 );
stdlib_complex64_t z = stdlib_complex64( -4.2f, 5.5f );

stdlib_complex64_t out = stdlib_base_croundf( z );

float re = stdlib_complex64_real( out );
// returns -4.0
// returns -4.0f

float im = stdlib_complex64_imag( out );
// returns 6.0
// returns 6.0f
```

The function accepts the following arguments:
Expand Down Expand Up @@ -185,10 +185,10 @@ stdlib_complex64_t stdlib_base_croundf( const stdlib_complex64_t z );
int main( void ) {
const stdlib_complex64_t x[] = {
stdlib_complex64( 3.14, 1.5 ),
stdlib_complex64( -3.14, -1.5 ),
stdlib_complex64( 0.0, 0.0 ),
stdlib_complex64( 0.0/0.0, 0.0/0.0 )
stdlib_complex64( 3.14f, 1.5f ),
stdlib_complex64( -3.14f, -1.5f ),
stdlib_complex64( 0.0f, 0.0f ),
stdlib_complex64( 0.0f / 0.0f, 0.0f / 0.0f )
};
stdlib_complex64_t v;
Expand Down Expand Up @@ -220,14 +220,6 @@ int main( void ) {

<section class="related">

* * *

## See Also

- <span class="package-name">[`@stdlib/math/base/special/cceilf`][@stdlib/math/base/special/cceilf]</span><span class="delimiter">: </span><span class="description">round a single-precision complex floating-point number toward positive infinity.</span>
- <span class="package-name">[`@stdlib/math/base/special/cfloor`][@stdlib/math/base/special/cfloor]</span><span class="delimiter">: </span><span class="description">round a double-precision complex floating-point number toward negative infinity.</span>
- <span class="package-name">[`@stdlib/math/base/special/croundn`][@stdlib/math/base/special/croundn]</span><span class="delimiter">: </span><span class="description">round each component of a double-precision complex floating-point number to the nearest multiple of 10^n.</span>

</section>

<!-- /.related -->
Expand All @@ -238,12 +230,6 @@ int main( void ) {

<!-- <related-links> -->

[@stdlib/math/base/special/cceilf]: https://github.com/stdlib-js/math/tree/main/base/special/cceilf

[@stdlib/math/base/special/cfloor]: https://github.com/stdlib-js/math/tree/main/base/special/cfloor

[@stdlib/math/base/special/croundn]: https://github.com/stdlib-js/math/tree/main/base/special/croundn

<!-- </related-links> -->

</section>
Expand Down
4 changes: 2 additions & 2 deletions base/special/croundf/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import croundf = require( './index' );

// TESTS //

// The function returns a double-precision complex floating-point number...
// The function returns a single-precision complex floating-point number...
{
croundf( new Complex64( 1.0, 2.0 ) ); // $ExpectType Complex64
}

// The compiler throws an error if the function is provided a real component which is not a number...
// The compiler throws an error if the function is provided a value other than a complex number...
{
croundf( true ); // $ExpectError
croundf( false ); // $ExpectError
Expand Down
8 changes: 4 additions & 4 deletions base/special/croundf/examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

int main( void ) {
const stdlib_complex64_t x[] = {
stdlib_complex64( 3.14, 1.5 ),
stdlib_complex64( -3.14, -1.5 ),
stdlib_complex64( 0.0, 0.0 ),
stdlib_complex64( 0.0/0.0, 0.0/0.0 )
stdlib_complex64( 3.14f, 1.5f ),
stdlib_complex64( -3.14f, -1.5f ),
stdlib_complex64( 0.0f, 0.0f ),
stdlib_complex64( 0.0f / 0.0f, 0.0f / 0.0f )
};

stdlib_complex64_t v;
Expand Down
6 changes: 3 additions & 3 deletions base/special/croundf/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
* #include "stdlib/complex/float32/real.h"
* #include "stdlib/complex/float32/imag.h"
*
* stdlib_complex64_t z = stdlib_complex64( -4.2, 5.5 );
* stdlib_complex64_t z = stdlib_complex64( -4.2f, 5.5f );
*
* stdlib_complex64_t out = stdlib_base_croundf( z );
*
* float re = stdlib_complex64_real( out );
* // returns -4.0
* // returns -4.0f
*
* float im = stdlib_complex64_imag( out );
* // returns 6.0
* // returns 6.0f
*/
stdlib_complex64_t stdlib_base_croundf( const stdlib_complex64_t z ) {
float re;
Expand Down

0 comments on commit a81ca6c

Please sign in to comment.