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
Computes the [tangent][tangent] of a double-precision floating-point number on `[-π/4, π/4]`.
35
+
Computes the [tangent][tangent] of a number on `[-π/4, π/4]` in single-precision floating-point format.
36
36
37
37
```javascript
38
-
var out =kernelTan( 3.141592653589793/4.0, 0.0, 1 );
38
+
var out =kernelTanf( 3.141592653589793/4.0, 1 );
39
39
// returns ~1.0
40
40
41
-
out =kernelTan( 3.141592653589793/6.0, 0.0, 1 );
41
+
out =kernelTanf( 3.141592653589793/6.0, 1 );
42
42
// returns ~0.577
43
43
44
-
out =kernelTan( 0.664, 5.288e-17, 1 );
44
+
out =kernelTanf( 0.664, 1 );
45
45
// returns ~0.783
46
46
```
47
47
48
-
If `k = 1`, the function returns `tan(x+y)`. To return the negative inverse `-1/tan(x+y)`, set `k = -1`.
48
+
If `k = 1`, the function returns `tan(x)`. To return the negative inverse `-1/tan(x)`, set `k = -1`.
49
49
50
50
```javascript
51
-
var out =kernelTan( 3.141592653589793/4.0, 0.0, -1 );
51
+
var out =kernelTanf( 3.141592653589793/4.0, -1 );
52
52
// returns ~-1.0
53
53
```
54
54
55
-
If either `x` or `y` is `NaN`, the function returns `NaN`.
55
+
If provided `NaN` for `x`, the function returns `NaN`.
56
56
57
57
```javascript
58
-
var out =kernelTan( NaN, 0.0, 1 );
58
+
var out =kernelTanf( NaN, 1 );
59
59
// returns NaN
60
60
61
-
out =kernelTan( 3.0, NaN, 1 );
62
-
// returns NaN
63
-
64
-
out =kernelTan( NaN, NaN, 1 );
61
+
out =kernelTanf( NaN, -1 );
65
62
// returns NaN
66
63
```
67
64
68
65
</section>
69
66
70
67
<!-- /.usage -->
71
68
72
-
<sectionclass="notes">
73
-
74
-
## Notes
75
-
76
-
- For increased accuracy, the number for which the [tangent][tangent] should be evaluated can be supplied as a [double-double number][double-double-arithmetic] (i.e., a non-evaluated sum of two [double-precision floating-point numbers][ieee754]`x` and `y`).
77
-
78
-
- As components of a [double-double number][double-double-arithmetic], the two [double-precision floating-point numbers][ieee754]`x` and `y` must satisfy
79
-
80
-
<!-- <equation class="equation" label="eq:double_double_inequality" align="center" raw="|y| \leq \frac{1}{2} \operatorname{ulp}(x)" alt="Inequality for the two components of a double-double number."> -->
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/kernel-tan/docs/img/equation_double_double_inequality.svg" alt="Inequality for the two components of a double-double number.">
84
-
<br>
85
-
</div>
86
-
87
-
<!-- </equation> -->
88
-
89
-
where `ulp` stands for [units in the last place][ulp].
@@ -178,10 +142,6 @@ double stdlib_base_kernel_tan( const double x, const double y, const int32_t k )
178
142
179
143
<section class="notes">
180
144
181
-
### Notes
182
-
183
-
- For increased accuracy, the number for which the [tangent][tangent] should be evaluated can be supplied as a [double-double number][double-double-arithmetic] (i.e., a non-evaluated sum of two [double-precision floating-point numbers][ieee754] `x` and `y`).
184
-
185
145
</section>
186
146
187
147
<!-- /.notes -->
@@ -193,17 +153,17 @@ double stdlib_base_kernel_tan( const double x, const double y, const int32_t k )
printf( "kernelTanf(%lf, %d) = %f\n", x[ i ], 1, out );
207
167
}
208
168
}
209
169
```
@@ -220,14 +180,6 @@ int main( void ) {
220
180
221
181
<sectionclass="related">
222
182
223
-
* * *
224
-
225
-
## See Also
226
-
227
-
- <spanclass="package-name">[`@stdlib/math/base/special/kernel-cos`][@stdlib/math/base/special/kernel-cos]</span><spanclass="delimiter">: </span><spanclass="description">compute the cosine of a double-precision floating-point number on \[-π/4, π/4].</span>
228
-
- <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>
229
-
- <spanclass="package-name">[`@stdlib/math/base/special/tan`][@stdlib/math/base/special/tan]</span><spanclass="delimiter">: </span><spanclass="description">evaluate the tangent of a number.</span>
0 commit comments