You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/math/base/special/kernel-sinf/README.md
+18-75Lines changed: 18 additions & 75 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
8
8
you may not use this file except in compliance with the License.
9
9
You may obtain a copy of the License at
10
10
11
-
http://www.apache.org/licenses/LICENSE-2.0
11
+
http://www.apache.org/licenses/LICENSE-2.0
12
12
13
13
Unless required by applicable law or agreed to in writing, software
14
14
distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,52 +35,23 @@ var kernelSinf = require( '@stdlib/math/base/special/kernel-sinf' );
35
35
Computes the [sine][sine] of a single-precision floating-point number on `[-π/4, π/4]`.
36
36
37
37
```javascript
38
-
var v =kernelSinf( 0.0, 0.0 );
38
+
var v =kernelSinf( 0.0 );
39
39
// returns ~0.0
40
40
41
-
v =kernelSinf( 3.14159/6.0, 0.0 );
41
+
v =kernelSinf( 3.141592653589793/6.0 );
42
42
// returns ~0.5
43
43
44
-
v =kernelSinf( 0.619, 9.279e-10 );
45
-
// returns ~0.58
44
+
v =kernelSinf( 0.619 );
45
+
// returns ~0.580
46
46
47
-
v =kernelSinf( NaN, 0.0 );
48
-
// returns NaN
49
-
50
-
v =kernelSinf( 3.0, NaN );
51
-
// returns NaN
52
-
53
-
v =kernelSinf( NaN, NaN );
47
+
v =kernelSinf( NaN );
54
48
// returns NaN
55
49
```
56
50
57
51
</section>
58
52
59
53
<!-- /.usage -->
60
54
61
-
<sectionclass="notes">
62
-
63
-
## Notes
64
-
65
-
- For increased accuracy, the number for which the [sine][sine] should be evaluated can be supplied as a [single-double number][single-arithmetic] (i.e., a non-evaluated sum of two [single-precision floating-point numbers][ieee754]`x` and `y`).
66
-
67
-
- As components of a [single-double number][single-arithmetic], the two [single-precision floating-point numbers][ieee754]`x` and `y` must satisfy
68
-
69
-
<!-- <equation class="equation" label="eq:single_double_inequality" align="center" raw="|y| \leq \frac{1}{2} \operatorname{ulp}(x)" alt="Inequality for the two components of a single-double number."> -->
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@819807799dc2df7eb037d5901624fa3169bce774/lib/node_modules/@stdlib/math/base/special/kernel-sin/docs/img/equation_double_double_inequality.svg" alt="Inequality for the two components of a single-double number.">
73
-
<br>
74
-
</div>
75
-
76
-
<!-- </equation> -->
77
-
78
-
where `ulp` stands for [units in the last place][ulp].
79
-
80
-
</section>
81
-
82
-
<!-- /.notes -->
83
-
84
55
<sectionclass="examples">
85
56
86
57
## Examples
@@ -89,15 +60,13 @@ v = kernelSinf( NaN, NaN );
89
60
90
61
```javascript
91
62
var linspace =require( '@stdlib/array/base/linspace' );
92
-
varPI=require( '@stdlib/constants/float32/pi' );
63
+
var logEachMap =require( '@stdlib/console/log-each-map' );
64
+
varPI=require( '@stdlib/constants/float64/pi' );
93
65
var kernelSinf =require( '@stdlib/math/base/special/kernel-sinf' );
94
66
95
67
var x =linspace( -PI/4.0, PI/4.0, 100 );
96
68
97
-
var i;
98
-
for ( i =0; i <x.length; i++ ) {
99
-
console.log( 'sine(%d) = %d', x[ i ], kernelSinf( x[ i ], 0.0 ) );
- For increased accuracy, the number for which the [sine][sine] should be evaluated can be supplied as a [single-double number][single-arithmetic] (i.e., a non-evaluated sum of two [single-precision floating-point numbers][ieee754] `x` and `y`).
printf ( "x: %f, y: %f, out: %f\n", x[ i ], 0.0f, out );
150
+
out = stdlib_base_kernel_sinf( x[ i ] );
151
+
printf ( "x[ i ]: %lf, out: %f\n", x[ i ], out );
188
152
}
189
153
}
190
154
```
@@ -201,15 +165,6 @@ int main( void ) {
201
165
202
166
<sectionclass="related">
203
167
204
-
* * *
205
-
206
-
## See Also
207
-
208
-
- <spanclass="package-name">[`@stdlib/math/base/special/kernel-cosf`][@stdlib/math/base/special/kernel-cosf]</span><spanclass="delimiter">: </span><spanclass="description">compute the cosine of a single-precision floating-point number on \[-π/4, π/4].</span>
209
-
- <spanclass="package-name">[`@stdlib/math/base/special/kernel-tanf`][@stdlib/math/base/special/kernel-tanf]</span><spanclass="delimiter">: </span><spanclass="description">compute the tangent of a single-precision floating-point number on \[-π/4, π/4].</span>
210
-
- <spanclass="package-name">[`@stdlib/math/base/special/sinf`][@stdlib/math/base/special/sinf]</span><spanclass="delimiter">: </span><spanclass="description">compute the sine of a number.</span>
211
-
- <spanclass="package-name">[`@stdlib/math/base/special/kernel-sin`][@stdlib/math/base/special/kernel-sin]</span><spanclass="delimiter">: </span><spanclass="description">compute the sine of a double-precision floating-point number on \[-π/4, π/4].</span>
0 commit comments