Skip to content

Commit 3920c11

Browse files
committed
fix: use correct formula for acovercosf
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent d5e319b commit 3920c11

File tree

19 files changed

+72
-72
lines changed

19 files changed

+72
-72
lines changed

lib/node_modules/@stdlib/math/base/special/acovercosf/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ limitations under the License.
2626

2727
The [inverse coversed cosine][inverse-coversed-cosine] is defined as
2828

29-
<!-- <equation class="equation" label="eq:arccovercosine" align="center" raw="\operatorname{acovercos}(\theta) = \arcsin(1+\theta)" alt="Inverse coversed cosine."> -->
29+
<!-- <equation class="equation" label="eq:arccovercosine" align="center" raw="\operatorname{acovercos}(\theta) = \arcsin(\theta-1)" alt="Inverse coversed cosine."> -->
3030

3131
```math
32-
\mathop{\mathrm{acovercos}}(\theta) = \arcsin(1+\theta)
32+
\mathop{\mathrm{acovercos}}(\theta) = \arcsin(\theta-1)
3333
```
3434

3535
<!-- </equation> -->
@@ -52,22 +52,22 @@ Computes the [inverse coversed cosine][inverse-coversed-cosine] of a single-prec
5252

5353
```javascript
5454
var v = acovercosf( 0.0 );
55-
// returns ~1.5708
55+
// returns ~-1.5708
5656

57-
v = acovercosf( -3.141592653589793 / 2.0 );
58-
// returns ~-0.6075
57+
v = acovercosf( 3.141592653589793 / 2.0 );
58+
// returns ~0.6075
5959

60-
v = acovercosf( -3.141592653589793 / 6.0 );
61-
// returns ~0.4966
60+
v = acovercosf( 3.141592653589793 / 6.0 );
61+
// returns ~-0.4966
6262
```
6363

64-
If `x < -2`, `x > 0`, or `x` is `NaN`, the function returns `NaN`.
64+
If `x < 0`, `x > 2`, or `x` is `NaN`, the function returns `NaN`.
6565

6666
```javascript
67-
var v = acovercosf( 1.0 );
67+
var v = acovercosf( -1.0 );
6868
// returns NaN
6969

70-
v = acovercosf( -3.14 );
70+
v = acovercosf( 3.14 );
7171
// returns NaN
7272

7373
v = acovercosf( NaN );
@@ -89,7 +89,7 @@ var uniform = require( '@stdlib/random/array/uniform' );
8989
var logEachMap = require( '@stdlib/console/log-each-map' );
9090
var acovercosf = require( '@stdlib/math/base/special/acovercosf' );
9191

92-
var x = uniform( 100, -2.0, 0.0, {
92+
var x = uniform( 100, 0.0, 2.0, {
9393
'dtype': 'float32'
9494
});
9595

@@ -131,8 +131,8 @@ logEachMap( 'acovercosf(%0.4f) = %0.4f', x, acovercosf );
131131
Computes the [inverse coversed cosine][inverse-coversed-cosine] of a single-precision floating-point number.
132132

133133
```c
134-
float out = stdlib_base_acovercosf( -3.141592653589793f / 2.0f );
135-
// returns ~-0.6075f
134+
float out = stdlib_base_acovercosf( 3.141592653589793f / 2.0f );
135+
// returns ~0.6075f
136136
```
137137

138138
The function accepts the following arguments:
@@ -166,7 +166,7 @@ float stdlib_base_acovercosf( const float x );
166166
#include <stdio.h>
167167
168168
int main( void ) {
169-
const float x[] = { -2.0f, -1.80f, -1.78f, -1.67f, -0.56f, -0.27f, -1.67f, -0.78f, -1.89f, 0.0f };
169+
const float x[] = { 0.0f, 0.27f, 0.56f, 0.78f, 1.67f, 1.70f, 1.78f, 1.80f, 1.89f, 2.0f };
170170
171171
float v;
172172
int i;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ bench( pkg, function benchmark( b ) {
3434
var y;
3535
var i;
3636

37-
x = uniform( 100, -2.0, 0.0, {
37+
x = uniform( 100, 0.0, 2.0, {
3838
'dtype': 'float32'
3939
});
4040

lib/node_modules/@stdlib/math/base/special/acovercosf/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
4343
var y;
4444
var i;
4545

46-
x = uniform( 100, -2.0, 0.0, {
46+
x = uniform( 100, 0.0, 2.0, {
4747
'dtype': 'float32'
4848
});
4949

lib/node_modules/@stdlib/math/base/special/acovercosf/benchmark/c/native/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static double benchmark( void ) {
9797
int i;
9898

9999
for ( i = 0; i < 100; i++ ) {
100-
x[ i ] = -2.0f * rand_float();
100+
x[ i ] = 2.0f * rand_float();
101101
}
102102

103103
t = tic();

lib/node_modules/@stdlib/math/base/special/acovercosf/docs/repl.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
Computes the inverse coversed cosine of a single-precision floating-
44
point number (in radians).
55

6-
The inverse coversed cosine is defined as `asin(1+x)`.
6+
The inverse coversed cosine is defined as `asin(x-1)`.
77

8-
If `x < -2`, `x > 0`, or `x` is `NaN`, the function returns `NaN`.
8+
If `x < 0`, `x > 2`, or `x` is `NaN`, the function returns `NaN`.
99

1010
Parameters
1111
----------
@@ -19,10 +19,10 @@
1919

2020
Examples
2121
--------
22-
> var y = {{alias}}( -1.5 )
23-
~-0.5236
22+
> var y = {{alias}}( 1.5 )
23+
~0.5236
2424
> y = {{alias}}( -0.0 )
25-
~1.5708
25+
~-1.5708
2626

2727
See Also
2828
--------

lib/node_modules/@stdlib/math/base/special/acovercosf/docs/types/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
*
2727
* @example
2828
* var v = acovercosf( 0.0 );
29-
* // returns ~1.5708
29+
* // returns ~-1.5708
3030
*
3131
* @example
32-
* var v = acovercosf( -3.141592653589793 / 2.0 );
33-
* // returns ~-0.6075
32+
* var v = acovercosf( 3.141592653589793 / 2.0 );
33+
* // returns ~0.6075
3434
*
3535
* @example
36-
* var v = acovercosf( -3.141592653589793 / 6.0 );
37-
* // returns ~0.4966
36+
* var v = acovercosf( 3.141592653589793 / 6.0 );
37+
* // returns ~-0.4966
3838
*
3939
* @example
4040
* var v = acovercosf( NaN );

lib/node_modules/@stdlib/math/base/special/acovercosf/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import acovercosf = require( './index' );
2323

2424
// The function returns a number...
2525
{
26-
acovercosf( 8 ); // $ExpectType number
26+
acovercosf( 1 ); // $ExpectType number
2727
}
2828

2929
// The compiler throws an error if the function is provided a value other than a number...

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <stdio.h>
2121

2222
int main( void ) {
23-
const float x[] = { -2.0f, -1.80f, -1.78f, -1.67f, -0.56f, -0.27f, -1.67f, -0.78f, -1.89f, 0.0f };
23+
const float x[] = { 0.0f, 0.27f, 0.56f, 0.78f, 1.67f, 1.70f, 1.78f, 1.80f, 1.89f, 2.0f };
2424

2525
float v;
2626
int i;

lib/node_modules/@stdlib/math/base/special/acovercosf/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var uniform = require( '@stdlib/random/array/uniform' );
2222
var logEachMap = require( '@stdlib/console/log-each-map' );
2323
var acovercosf = require( './../lib' );
2424

25-
var x = uniform( 100, -2.0, 0.0, {
25+
var x = uniform( 100, 0.0, 2.0, {
2626
'dtype': 'float32'
2727
});
2828

lib/node_modules/@stdlib/math/base/special/acovercosf/lib/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
* var acovercosf = require( '@stdlib/math/base/special/acovercosf' );
2828
*
2929
* var v = acovercosf( 0.0 );
30-
* // returns ~1.5708
30+
* // returns ~-1.5708
3131
*
32-
* v = acovercosf( -3.141592653589793 / 2.0 );
33-
* // returns ~-0.6075
32+
* v = acovercosf( 3.141592653589793 / 2.0 );
33+
* // returns ~0.6075
3434
*
35-
* v = acovercosf( -3.141592653589793 / 6.0 );
36-
* // returns ~0.4966
35+
* v = acovercosf( 3.141592653589793 / 6.0 );
36+
* // returns ~-0.4966
3737
*
3838
* v = acovercosf( NaN );
3939
* // returns NaN

0 commit comments

Comments
 (0)