Skip to content

Commit

Permalink
docs: update notes section
Browse files Browse the repository at this point in the history
  • Loading branch information
gunjjoshi committed Jul 17, 2024
1 parent f06adbb commit 84be7d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
17 changes: 7 additions & 10 deletions lib/node_modules/@stdlib/math/base/special/cospi/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@

'use strict';

/*
* Notes:
* => cos(-x) = cos(x)
* => sin(-x) = -sin(x)
* => cos(π/2) = 0
* => cos(0) = 1
* => cos(π) = -1
*/


// MODULES //

var isnan = require( '@stdlib/math/base/assert/is-nan' );
Expand All @@ -50,6 +40,13 @@ var MAX_INTEGER_P1 = MAX_INTEGER + 1;
/**
* Computes the value of `cos(πx)`.
*
* ## Notes
*
* - `sin(-x) = -sin(x)`
* - `sin(+n) = +0`, where `n` is a positive integer
* - `sin(-n) = -sin(+n) = -0`, where `n` is a positive integer
* - `cos(-x) = cos(x)`
*
* @param {number} x - input value
* @returns {number} function value
*
Expand Down
16 changes: 7 additions & 9 deletions lib/node_modules/@stdlib/math/base/special/cospi/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
* limitations under the License.
*/

/*
* Notes:
* => cos(-x) = cos(x)
* => sin(-x) = -sin(x)
* => cos(π/2) = 0
* => cos(0) = 1
* => cos(π) = -1
*/

#include "stdlib/math/base/special/cospi.h"
#include "stdlib/math/base/assert/is_nan.h"
#include "stdlib/math/base/assert/is_infinite.h"
Expand All @@ -41,6 +32,13 @@ static const double MAX_INTEGER_P1 = STDLIB_CONSTANT_FLOAT64_MAX_SAFE_INTEGER +
/**
* Computes the value of `cos(πx)`.
*
* ## Notes
*
* - `sin(-x) = -sin(x)`
* - `sin(+n) = +0`, where `n` is a positive integer
* - `sin(-n) = -sin(+n) = -0`, where `n` is a positive integer
* - `cos(-x) = cos(x)`
*
* @param x input value
* @return function value
*
Expand Down

0 comments on commit 84be7d2

Please sign in to comment.