Skip to content

Commit 82f1843

Browse files
chore: minor changes
1 parent a0fc498 commit 82f1843

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

lib/node_modules/@stdlib/math/base/special/atan2f/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
var bench = require( '@stdlib/bench' );
2424
var uniform = require( '@stdlib/random/array/uniform' );
2525
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
26-
var atan2f = require( '@stdlib/math/base/special/atan2f' );
2726
var pkg = require( './../package.json' ).name;
27+
var atan2f = require( '@stdlib/math/base/special/atan2f' );
2828

2929

3030
// MAIN //

lib/node_modules/@stdlib/math/base/special/atan2f/examples/c/example.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ int main( void ) {
2525
float x;
2626
float v;
2727
int i;
28+
2829
for ( i = 0; i < 100; i++ ) {
2930
y = ( ( (float)rand() / (float)RAND_MAX ) * 100.0f );
3031
x = ( ( (float)rand() / (float)RAND_MAX ) * 100.0f );

lib/node_modules/@stdlib/math/base/special/atan2f/src/main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ float stdlib_base_atan2f( const float y, const float x ) {
9393
}
9494
return stdlib_base_copysignf( 0.0f, y );
9595
}
96+
// Case: -x = y = +infinity
97+
if ( x == STDLIB_CONSTANT_FLOAT32_NINF && y == STDLIB_CONSTANT_FLOAT32_PINF ) {
98+
return 3.0f * STDLIB_CONSTANT_FLOAT32_PI / 4.0f; // 3π/4
99+
}
100+
// Case: x = y = -infinity
101+
if ( x == STDLIB_CONSTANT_FLOAT32_NINF && y == STDLIB_CONSTANT_FLOAT32_NINF ) {
102+
return -3.0f * STDLIB_CONSTANT_FLOAT32_PI / 4.0f; // -3π/4
103+
}
96104
// case x is -Infinity
97105
if ( stdlib_base_is_infinitef( y ) ) {
98106
return stdlib_base_copysignf( 3.0f * STDLIB_CONSTANT_FLOAT32_PI / 4.0f, y );

0 commit comments

Comments
 (0)