From a81ca6c605854a6e77af6a9a82e58c080d57e74b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Dec 2024 14:24:54 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 1 + base/special/croundf/README.md | 28 ++++++----------------- base/special/croundf/docs/types/test.ts | 4 ++-- base/special/croundf/examples/c/example.c | 8 +++---- base/special/croundf/src/main.c | 6 ++--- 5 files changed, 17 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a9a0b05a..1c37a6474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2620,6 +2620,7 @@ A total of 5 people contributed to this release. Thank you to the following cont
+- [`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)_ diff --git a/base/special/croundf/README.md b/base/special/croundf/README.md index 9b5c63302..8bcb9e261 100644 --- a/base/special/croundf/README.md +++ b/base/special/croundf/README.md @@ -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: @@ -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; @@ -220,14 +220,6 @@ int main( void ) { @@ -238,12 +230,6 @@ int main( void ) { -[@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 - diff --git a/base/special/croundf/docs/types/test.ts b/base/special/croundf/docs/types/test.ts index d6a94a7e8..cabd568f7 100644 --- a/base/special/croundf/docs/types/test.ts +++ b/base/special/croundf/docs/types/test.ts @@ -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 diff --git a/base/special/croundf/examples/c/example.c b/base/special/croundf/examples/c/example.c index 4cdc20af8..7ba47cf1c 100644 --- a/base/special/croundf/examples/c/example.c +++ b/base/special/croundf/examples/c/example.c @@ -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; diff --git a/base/special/croundf/src/main.c b/base/special/croundf/src/main.c index 203c78ba9..2db9786f5 100644 --- a/base/special/croundf/src/main.c +++ b/base/special/croundf/src/main.c @@ -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;