Skip to content

Commit 7f4d000

Browse files
committed
Auto-generated commit
1 parent c9edc97 commit 7f4d000

6 files changed

Lines changed: 21 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ A total of 80 issues were closed in this release:
714714

715715
<details>
716716

717+
- [`8e05341`](https://github.com/stdlib-js/stdlib/commit/8e0534149457bd04a06ae3c59d726191e32a1dcf) - **chore:** clean-up _(by Athan Reines)_
717718
- [`cb09f58`](https://github.com/stdlib-js/stdlib/commit/cb09f5862f03c3056c8259164653940108068f30) - **feat:** add `math/base/special/fast/atanhf` [(#9046)](https://github.com/stdlib-js/stdlib/pull/9046) _(by Nakul Krishnakumar, Philipp Burckhardt, stdlib-bot)_
718719
- [`542d57c`](https://github.com/stdlib-js/stdlib/commit/542d57c97e7b8e8d9b41221d86c5378fa02d0d87) - **feat:** add `math/base/special/floornf` [(#4881)](https://github.com/stdlib-js/stdlib/pull/4881) _(by Gururaj Gurram, Athan Reines, stdlib-bot, Karan Anand)_
719720
- [`27d5d30`](https://github.com/stdlib-js/stdlib/commit/27d5d30af2380909aa925ce955fb7a4b79d5df43) - **style:** fix EditorConfig lint errors [(#9510)](https://github.com/stdlib-js/stdlib/pull/9510) _(by kaushal-kumar-it)_

base/special/fast/atanhf/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var opts = {
3939

4040
// MAIN //
4141

42-
bench( format('%s::native', pkg ), opts, function benchmark( b ) {
42+
bench( format( '%s::native', pkg ), opts, function benchmark( b ) {
4343
var x;
4444
var y;
4545
var i;

base/special/fast/atanhf/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
{{alias}}( x )
3-
Computes the hyperbolic arctangent of a single-precision
4-
floating-point number.
3+
Computes the hyperbolic arctangent of a single-precision floating-point
4+
number.
55

66
The domain of `x` is restricted to `[-1,1]`. If `|x| > 1`, the function
77
returns `NaN`.

base/special/fast/atanhf/lib/main.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ var lnf = require( './../../../../../base/special/lnf' );
2626
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2727

2828

29+
// VARIABLES //
30+
31+
var ZERO = f32( 0.0 );
32+
var ONE = f32( 1.0 );
33+
var HALF = f32( 0.5 );
34+
35+
2936
// MAIN //
3037

3138
/**
@@ -56,16 +63,13 @@ var f32 = require( '@stdlib/number/float64/base/to-float32' );
5663
*/
5764
function atanhf( x ) {
5865
x = f32( x );
59-
if ( x === f32( 0.0 ) ) {
66+
if ( x === ZERO ) {
6067
return x;
6168
}
62-
if (
63-
isnanf( x ) ||
64-
isinfinitef( x )
65-
) {
69+
if ( isnanf( x ) || isinfinitef( x ) ) {
6670
return NaN;
6771
}
68-
return f32( f32( 0.5 ) * lnf( f32( f32( 1.0 )+x ) / f32( f32( 1.0 )-x ) ) );
72+
return f32( HALF * lnf( f32( f32( ONE+x ) / f32( ONE-x ) ) ) );
6973
}
7074

7175

base/special/fast/atanhf/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
* @return hyperbolic arctangent (in radians)
3030
*
3131
* @example
32-
* float v = stdlib_base_fast_atanhf( 0.0 );
33-
* // returns 0.0
32+
* float v = stdlib_base_fast_atanhf( 0.0f );
33+
* // returns 0.0f
3434
*/
3535
float stdlib_base_fast_atanhf( const float x ) {
3636
if ( x == 0.0f ) {

base/special/fast/atanhf/test/fixtures/julia/runner.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ import JSON
2020

2121
"""
2222
gen( domain, name )
23+
2324
Generate fixture data and write to file.
25+
2426
# Arguments
27+
2528
* `domain`: domain
2629
* `name::AbstractString`: output filename
30+
2731
# Examples
32+
2833
``` julia
2934
julia> x = range( -0.99, stop = 0.99, length = 2003 );
3035
julia> gen( x, \"data.json\" );

0 commit comments

Comments
 (0)