Skip to content

Commit 59d0ae8

Browse files
committed
feat: add math/base/special/cscdf
--- 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: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: passed - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 6f3c56d commit 59d0ae8

File tree

5 files changed

+18
-30
lines changed

5 files changed

+18
-30
lines changed

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

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ var logEachMap = require( '@stdlib/console/log-each-map' );
7070
var cscdf = require( '@stdlib/math/base/special/cscdf' );
7171

7272
var opts = {
73-
'dtype': 'float64'
73+
'dtype': 'float32'
7474
};
75-
var x = uniform( 100, 1.1, 5.1, opts );
75+
var x = uniform( 100, -180.0, 180.0, opts );
7676

7777
logEachMap( 'cscdf(%0.4f) = %0.4f', x, cscdf );
7878
```
@@ -112,19 +112,19 @@ logEachMap( 'cscdf(%0.4f) = %0.4f', x, cscdf );
112112
Computes the [cosecant][cosecant] of a single-precision floating-point number (in degrees).
113113

114114
```c
115-
double out = stdlib_base_cscdf( 30.0 );
116-
// returns ~2.0
115+
float out = stdlib_base_cscdf( 30.0f );
116+
// returns ~2.0f
117117

118-
out = stdlib_base_cscdf( 45.0 );
119-
// returns ~1.41
118+
out = stdlib_base_cscdf( 45.0f );
119+
// returns ~1.41f
120120
```
121121

122122
The function accepts the following arguments:
123123

124-
- **x**: `[in] double` input value.
124+
- **x**: `[in] float` input value.
125125

126126
```c
127-
double stdlib_base_cscdf( const double x );
127+
float stdlib_base_cscdf( const float x );
128128
```
129129
130130
</section>
@@ -150,13 +150,13 @@ double stdlib_base_cscdf( const double x );
150150
#include <stdio.h>
151151
152152
int main( void ) {
153-
const double x[] = { 30.0, 45.0, 60.0, 90.0 };
153+
const float x[] = { 30.0f, 45.0f, 60.0f, 90.0f };
154154
155-
double y;
155+
float y;
156156
int i;
157157
for ( i = 0; i < 4; i++ ) {
158158
y = stdlib_base_cscdf( x[ i ] );
159-
printf( "cscdf(%lf) = %lf\n", x[ i ], y );
159+
printf( "cscdf(%f) = %f\n", x[ i ], y );
160160
}
161161
}
162162
```
@@ -173,13 +173,6 @@ int main( void ) {
173173

174174
<section class="related">
175175

176-
* * *
177-
178-
## See Also
179-
180-
- <span class="package-name">[`@stdlib/math/base/special/cotd`][@stdlib/math/base/special/cotd]</span><span class="delimiter">: </span><span class="description">compute the cotangent of an angle measured in degrees.</span>
181-
- <span class="package-name">[`@stdlib/math/base/special/secd`][@stdlib/math/base/special/secd]</span><span class="delimiter">: </span><span class="description">compute the secant of an angle measured in degrees.</span>
182-
183176
</section>
184177

185178
<!-- /.related -->
@@ -192,10 +185,6 @@ int main( void ) {
192185

193186
<!-- <related-links> -->
194187

195-
[@stdlib/math/base/special/cotd]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/cotd
196-
197-
[@stdlib/math/base/special/secd]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/secd
198-
199188
<!-- </related-links> -->
200189

201190
</section>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
--------
1818
> var y = {{alias}}( 1.0 )
1919
~57.30
20-
> y = {{alias}}( {{alias:@stdlib/constants/float64/pi}} )
20+
> y = {{alias}}( {{alias:@stdlib/constants/float32/pi}} )
2121
~18.25
22-
> y = {{alias}}( -{{alias:@stdlib/constants/float64/pi}} )
22+
> y = {{alias}}( -{{alias:@stdlib/constants/float32/pi}} )
2323
~-18.25
2424
> y = {{alias}}( NaN )
2525
NaN

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
#include <stdio.h>
2121

2222
int main( void ) {
23-
const double x[] = { 30.0, 45.0, 60.0, 90.0 };
23+
const float x[] = { 30.0f, 45.0f, 60.0f, 90.0f };
2424

25-
double y;
25+
float y;
2626
int i;
2727
for ( i = 0; i < 4; i++ ) {
2828
y = stdlib_base_cscdf( x[ i ] );
29-
printf( "cscdf(%lf) = %lf\n", x[ i ], y );
29+
printf( "cscdf(%f) = %f\n", x[ i ], y );
3030
}
3131
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ var logEachMap = require( '@stdlib/console/log-each-map' );
2323
var cscdf = require( './../lib' );
2424

2525
var opts = {
26-
'dtype': 'float64'
26+
'dtype': 'float32'
2727
};
28-
var x = uniform( 100, 1.1, 5.1, opts );
28+
var x = uniform( 100, -180.0, 180.0, opts );
2929

3030
logEachMap( 'cscdf(%0.4f) = %0.4f', x, cscdf );

lib/node_modules/@stdlib/math/base/special/cscdf/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"stdmath",
5757
"mathematics",
5858
"math",
59-
"acsc",
6059
"cosecant",
6160
"degree",
6261
"sine",

0 commit comments

Comments
 (0)