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 Sep 7, 2024
1 parent a78cb81 commit de4c5ba
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ A total of 4 people contributed to this release. Thank you to the following cont

<details>

- [`f13d569`](https://github.com/stdlib-js/stdlib/commit/f13d56957a00c6ffea87a0cc7fd243cd871a213f) - **docs:** update examples and fix whitespace [(#2865)](https://github.com/stdlib-js/stdlib/pull/2865) _(by Gunj Joshi, Athan Reines)_
- [`35462f8`](https://github.com/stdlib-js/stdlib/commit/35462f8357fdcb513679a7344fa3a5cc4c3ef55f) - **style:** update heading and fix line wrapping [(#2867)](https://github.com/stdlib-js/stdlib/pull/2867) _(by Gunj Joshi)_
- [`6c838b0`](https://github.com/stdlib-js/stdlib/commit/6c838b02c4cc9afa7befcdfbb6617b5c367713cb) - **docs:** fix line wrapping and description [(#2874)](https://github.com/stdlib-js/stdlib/pull/2874) _(by Gunj Joshi)_
- [`7edbd56`](https://github.com/stdlib-js/stdlib/commit/7edbd56db6a1dc6aa955a47be48120c410e1c6af) - **docs:** update examples [(#2873)](https://github.com/stdlib-js/stdlib/pull/2873) _(by Gunj Joshi, Athan Reines)_
Expand Down
19 changes: 10 additions & 9 deletions base/special/logf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

# Logarithm

> Compute the base `b` [logarithm][logarithm] of a single-precision floating-point number..
> Compute the base `b` [logarithm][logarithm] of a single-precision floating-point number.
<section class="usage">

Expand Down Expand Up @@ -66,18 +66,19 @@ v = logf( 2.0, -4.0 );
<!-- eslint no-undef: "error" -->

```javascript
var randu = require( '@stdlib/random/base/randu' );
var roundf = require( '@stdlib/math/base/special/roundf' );
var randu = require( '@stdlib/random/array/discrete-uniform' );
var logf = require( '@stdlib/math/base/special/logf' );

var b;
var x;
var i;
var opts = {
'dtype': 'float32'
};

var x = randu( 100, 0, 100, opts );
var b = randu( 100, 0, 5, opts );

var i;
for ( i = 0; i < 100; i++ ) {
x = roundf( randu() * 100.0 );
b = roundf( randu() * 5.0 );
console.log( 'logf( %d, %d ) = %d', x, b, logf( x, b ) );
console.log( 'logf( %d, %d ) = %d', x[ i ], b[ i ], logf( x[ i ], b[ i ] ) );
}
```

Expand Down
17 changes: 9 additions & 8 deletions base/special/logf/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@

'use strict';

var randu = require( '@stdlib/random/base/randu' );
var roundf = require( './../../../../base/special/roundf' );
var randu = require( '@stdlib/random/array/discrete-uniform' );
var logf = require( './../lib' );

var b;
var x;
var i;
var opts = {
'dtype': 'float32'
};

var x = randu( 100, 0, 100, opts );
var b = randu( 100, 0, 5, opts );

var i;
for ( i = 0; i < 100; i++ ) {
x = roundf( randu() * 100.0 );
b = roundf( randu() * 5.0 );
console.log( 'logf( %d, %d ) = %d', x, b, logf( x, b ) );
console.log( 'logf( %d, %d ) = %d', x[ i ], b[ i ], logf( x[ i ], b[ i ] ) );
}
2 changes: 1 addition & 1 deletion base/special/logf/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @param x input value
* @param b input value
* @return output value
* @return output value
*
* @example
* float out = stdlib_base_logf( 100.0f, 10.0f );
Expand Down

0 comments on commit de4c5ba

Please sign in to comment.