Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stdlib/math-base-special-tan

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/math-base-special-tan - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

include/stdlib/math/base/special/tan.h

6

dist/index.js

@@ -1,6 +0,6 @@

"use strict";var _=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var u=_(function(N,t){
var n=require('@stdlib/number-float64-base-get-high-word/dist'),i=require('@stdlib/math-base-special-kernel-tan/dist'),v=require('@stdlib/math-base-special-rempio2/dist'),f=[0,0],H=2147483647,O=1072243195,s=2146435072,W=1044381696;function o(e){var r,a;return r=n(e),r&=H,r<=O?r<W?e:i(e,0,1):r>=s?NaN:(a=v(e,f),i(f[0],f[1],1-((a&1)<<1)))}t.exports=o
});var G=u();module.exports=G;
"use strict";var n=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var _=n(function(I,t){
var v=require('@stdlib/number-float64-base-get-high-word/dist'),u=require('@stdlib/math-base-special-kernel-tan/dist'),H=require('@stdlib/math-base-special-rempio2/dist'),f=require('@stdlib/constants-float64-high-word-abs-mask/dist'),O=require('@stdlib/constants-float64-high-word-exponent-mask/dist'),i=[0,0],q=1072243195,s=1044381696;function W(e){var r,a;return r=v(e),r&=f,r<=q?r<s?e:u(e,0,1):r>=O?NaN:(a=H(e,i),u(i[0],i[1],1-((a&1)<<1)))}t.exports=W
});var o=_();module.exports=o;
/** @license Apache-2.0 */
/** @license Apache-2.0 */
//# sourceMappingURL=index.js.map

@@ -40,2 +40,4 @@ /**

var rempio2 = require( '@stdlib/math-base-special-rempio2' );
var HIGH_WORD_ABS_MASK = require( '@stdlib/constants-float64-high-word-abs-mask' );
var HIGH_WORD_EXPONENT_MASK = require( '@stdlib/constants-float64-high-word-exponent-mask' );

@@ -48,11 +50,5 @@

// High word absolute value mask: 0x7fffffff => 01111111111111111111111111111111
var HIGH_WORD_ABS_MASK = 0x7fffffff|0; // asm type annotation
// High word for pi/4: 0x3fe921fb => 00111111111010010010000111111011
var HIGH_WORD_PIO4 = 0x3fe921fb|0; // asm type annotation
// High word exponent mask: 0x7ff00000 => 01111111111100000000000000000000
var HIGH_WORD_EXPONENT_MASK = 0x7ff00000|0; // asm type annotation
// High word for a small value: 2^-27 = 7.450580596923828e-9 => high word => 0x3e400000 => 00111110010000000000000000000000

@@ -59,0 +55,0 @@ var HIGH_WORD_TWO_NEG_27 = 0x3e400000|0; // asm type annotation

{
"name": "@stdlib/math-base-special-tan",
"version": "0.2.2",
"version": "0.3.0",
"description": "Evaluate the tangent of a number.",

@@ -17,5 +17,8 @@ "license": "Apache-2.0",

"main": "./lib",
"gypfile": false,
"directories": {
"doc": "./docs",
"include": "./include",
"lib": "./lib",
"src": "./src",
"dist": "./dist"

@@ -34,5 +37,9 @@ },

"dependencies": {
"@stdlib/math-base-special-kernel-tan": "^0.2.2",
"@stdlib/constants-float64-high-word-abs-mask": "^0.2.2",
"@stdlib/constants-float64-high-word-exponent-mask": "^0.2.2",
"@stdlib/math-base-napi-unary": "^0.2.3",
"@stdlib/math-base-special-kernel-tan": "^0.2.3",
"@stdlib/math-base-special-rempio2": "^0.2.1",
"@stdlib/number-float64-base-get-high-word": "^0.2.1"
"@stdlib/number-float64-base-get-high-word": "^0.2.2",
"@stdlib/utils-library-manifest": "^0.2.2"
},

@@ -39,0 +46,0 @@ "devDependencies": {},

@@ -118,2 +118,87 @@ <!--

<!-- C interface documentation. -->
* * *
<section class="c">
## C APIs
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
<section class="intro">
</section>
<!-- /.intro -->
<!-- C usage documentation. -->
<section class="usage">
### Usage
```c
#include "stdlib/math/base/special/tan.h"
```
#### stdlib_base_tan( x )
Evaluates the [tangent][tangent] of a `number` (in radians).
```c
double y = stdlib_base_tan( -3.141592653589793 / 4.0 );
// returns ~-1.0
```
The function accepts the following arguments:
- **x**: `[in] double` input value.
```c
double stdlib_base_tan( const double x );
```
</section>
<!-- /.usage -->
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="notes">
</section>
<!-- /.notes -->
<!-- C API usage examples. -->
<section class="examples">
### Examples
```c
#include "stdlib/math/base/special/tan.h"
#include <stdio.h>
int main( void ) {
const double x[] = { 0.0, 0.523, 0.785, 1.047, 3.14 };
double y;
int i;
for ( i = 0; i < 5; i++ ) {
y = stdlib_base_tan( x[ i ] );
printf( "tan(%lf) = %lf\n", x[ i ], y );
}
}
```
</section>
<!-- /.examples -->
</section>
<!-- /.c -->
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

@@ -168,4 +253,4 @@

[test-image]: https://github.com/stdlib-js/math-base-special-tan/actions/workflows/test.yml/badge.svg?branch=v0.2.2
[test-url]: https://github.com/stdlib-js/math-base-special-tan/actions/workflows/test.yml?query=branch:v0.2.2
[test-image]: https://github.com/stdlib-js/math-base-special-tan/actions/workflows/test.yml/badge.svg?branch=v0.3.0
[test-url]: https://github.com/stdlib-js/math-base-special-tan/actions/workflows/test.yml?query=branch:v0.3.0

@@ -172,0 +257,0 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-tan/main.svg

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc