From 3e378163a4adec91545767d939c6dfe9a0f04325 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 9 Nov 2024 18:56:55 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 42 +++++++++++++++++++++++++ README.md | 4 +-- base/assert/is-odd/examples/c/example.c | 14 ++++----- base/assert/is-odd/src/main.c | 12 +++---- 4 files changed, 57 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ef5b39b9..e48e10d1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,48 @@ > Package changelog. +
+ +## Unreleased (2024-11-09) + +
+ +### Packages + +
+ + + +
+ +### Contributors + +A total of 1 person contributed to this release. Thank you to this contributor: + +- Gunj Joshi + +
+ + + +
+ +### Commits + +
+ +- [`5a2ddbe`](https://github.com/stdlib-js/stdlib/commit/5a2ddbe402c98b9ea6aa989e248a3b26da375feb) - **docs:** correct the function description and indentation in `math/base/assert/is-odd` [(#3070)](https://github.com/stdlib-js/stdlib/pull/3070) _(by Gunj Joshi)_ + +
+ +
+ + + +
+ + +
## 0.3.3 (2024-11-05) diff --git a/README.md b/README.md index 5ff535555..4df84bea8 100644 --- a/README.md +++ b/README.md @@ -158,8 +158,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/math.svg [npm-url]: https://npmjs.org/package/@stdlib/math -[test-image]: https://github.com/stdlib-js/math/actions/workflows/test.yml/badge.svg?branch=v0.3.3 -[test-url]: https://github.com/stdlib-js/math/actions/workflows/test.yml?query=branch:v0.3.3 +[test-image]: https://github.com/stdlib-js/math/actions/workflows/test.yml/badge.svg?branch=main +[test-url]: https://github.com/stdlib-js/math/actions/workflows/test.yml?query=branch:main [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/math?branch=main diff --git a/base/assert/is-odd/examples/c/example.c b/base/assert/is-odd/examples/c/example.c index 3482449e6..48f9996f5 100644 --- a/base/assert/is-odd/examples/c/example.c +++ b/base/assert/is-odd/examples/c/example.c @@ -21,12 +21,12 @@ #include int main( void ) { - const double x[] = { 5.0, -5.0, 3.14, -3.14, 0.0, 0.0/0.0 }; + const double x[] = { 5.0, -5.0, 3.14, -3.14, 0.0, 0.0/0.0 }; - bool b; - int i; - for ( i = 0; i < 6; i++ ) { - b = stdlib_base_is_odd( x[ i ] ); - printf( "Value: %lf. Is Odd? %s.\n", x[ i ], ( b ) ? "True" : "False" ); - } + bool b; + int i; + for ( i = 0; i < 6; i++ ) { + b = stdlib_base_is_odd( x[ i ] ); + printf( "Value: %lf. Is Odd? %s.\n", x[ i ], ( b ) ? "True" : "False" ); + } } diff --git a/base/assert/is-odd/src/main.c b/base/assert/is-odd/src/main.c index 59b4d5e50..96bab7896 100644 --- a/base/assert/is-odd/src/main.c +++ b/base/assert/is-odd/src/main.c @@ -20,7 +20,7 @@ #include "stdlib/math/base/assert/is_even.h" /** -* Test if a finite double-precision floating-point number is an odd number. +* Tests if a finite double-precision floating-point number is an odd number. * * @param x input value * @return output value @@ -32,9 +32,9 @@ * // returns true */ bool stdlib_base_is_odd( const double x ) { - // Check sign to prevent overflow... - if ( x > 0.0 ) { - return stdlib_base_is_even( x - 1.0 ); - } - return stdlib_base_is_even( x + 1.0 ); + // Check sign to prevent overflow... + if ( x > 0.0 ) { + return stdlib_base_is_even( x - 1.0 ); + } + return stdlib_base_is_even( x + 1.0 ); }