Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jun 18, 2024
1 parent 6d907e4 commit cde99e5
Show file tree
Hide file tree
Showing 20 changed files with 1,499 additions and 9 deletions.
29 changes: 23 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,27 @@
*.mov binary

# Override what is considered "vendored" by GitHub's linguist:
/deps/** linguist-vendored=false
/lib/node_modules/** linguist-vendored=false linguist-generated=false
test/fixtures/** linguist-vendored=false
tools/** linguist-vendored=false
/lib/node_modules/** -linguist-vendored -linguist-generated

# Override what is considered "documentation" by GitHub's linguist:
examples/** linguist-documentation=false
# Configure directories which should *not* be included in GitHub language statistics:
/deps/** linguist-vendored
/dist/** linguist-generated
/workshops/** linguist-vendored

benchmark/** linguist-vendored
docs/* linguist-documentation
etc/** linguist-vendored
examples/** linguist-documentation
scripts/** linguist-vendored
test/** linguist-vendored
tools/** linguist-vendored

# Configure files which should *not* be included in GitHub language statistics:
Makefile linguist-vendored
*.mk linguist-vendored
*.jl linguist-vendored
*.py linguist-vendored
*.R linguist-vendored

# Configure files which should be included in GitHub language statistics:
docs/types/*.d.ts -linguist-documentation
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ jobs:
# Replace branch in README.md link definitions for badges with the new version:
find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g"
# Rewrite CHANGELOG.md to replace "Unreleased" with the new version:
sed -Ei "s/Unreleased/${NEW_VERSION}/g" CHANGELOG.md
sed -Ei "s/unreleased/v${NEW_VERSION}/g" CHANGELOG.md
# Create a new commit and tag:
git add package.json README.md
git commit -m "Release v${NEW_VERSION}"
Expand Down
107 changes: 106 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,109 @@

> Package changelog.
See [GitHub Releases](https://github.com/stdlib-js/math-base-special-vercos/releases) for the changelog.
<section class="release" id="unreleased">

## Unreleased (2024-06-18)

<section class="features">

### Features

- [`a4b2764`](https://github.com/stdlib-js/stdlib/commit/a4b276428bdc454a9412550375813f92bd242540) - add C implementation for `math/base/special/vercos` [(##2397)](#2397 )

</section>

<!-- /.features -->

<section class="commits">

### Commits

<details>

- [`a4b2764`](https://github.com/stdlib-js/stdlib/commit/a4b276428bdc454a9412550375813f92bd242540) - **feat:** add C implementation for `math/base/special/vercos` [(##2397)](#2397 ) _(by Gunj Joshi)_
- [`41d41e9`](https://github.com/stdlib-js/stdlib/commit/41d41e959b4eaad3c631e6898e3144a4015a5458) - **test:** include trailing newlines in Julia-generated JSON fixtures _(by Philipp Burckhardt)_
- [`9ed7d0e`](https://github.com/stdlib-js/stdlib/commit/9ed7d0e7d57edb5ad0dfb65c944bed87d475cbf3) - **chore:** add missing trailing newlines _(by Philipp Burckhardt)_

</details>

</section>

<!-- /.commits -->

<section class="contributors">

### Contributors

A total of 2 people contributed to this release. Thank you to the following contributors:

- Gunj Joshi
- Philipp Burckhardt

</section>

<!-- /.contributors -->

</section>

<!-- /.release -->

<section class="release" id="v0.2.1">

## 0.2.1 (2024-02-24)

<section class="features">

### Features

- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9) - update minimum TypeScript version

</section>

<!-- /.features -->

<section class="breaking-changes">

### BREAKING CHANGES

- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9): update minimum TypeScript version
- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9): update minimum TypeScript version to 4.1

- To migrate, users should upgrade their TypeScript version to at least version 4.1.

</section>

<!-- /.breaking-changes -->

<section class="commits">

### Commits

<details>

- [`58832ee`](https://github.com/stdlib-js/stdlib/commit/58832eef6d93e6519622148242600eae93dca4d9) - **feat:** update minimum TypeScript version _(by Philipp Burckhardt)_
- [`ce7e336`](https://github.com/stdlib-js/stdlib/commit/ce7e3367c0f9477773fe76dd0eca64dc6ad33c02) - **docs:** update equations _(by Philipp Burckhardt)_
- [`c5da1f9`](https://github.com/stdlib-js/stdlib/commit/c5da1f9a22b1033d40115798acf13a09acf9410d) - **docs:** render equations via math code blocks _(by Philipp Burckhardt)_

</details>

</section>

<!-- /.commits -->

<section class="contributors">

### Contributors

A total of 1 person contributed to this release. Thank you to this contributor:

- Philipp Burckhardt

</section>

<!-- /.contributors -->

</section>

<!-- /.release -->

11 changes: 10 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Adarsh Palaskar <[email protected]>
Aditya Sapra <[email protected]>
AgPriyanshu18 <[email protected]>
Aleksandr <[email protected]>
Ali Salesi <[email protected]>
Aman Bhansali <[email protected]>
Amit Jimiwal <[email protected]>
Expand All @@ -18,13 +19,15 @@ Chinmay Joshi <[email protected]>
Christopher Dambamuromo <[email protected]>
Dan Rose <[email protected]>
Daniel Killenberger <[email protected]>
Daniel Yu <[email protected]>
Dominik Moritz <[email protected]>
Dorrin Sotoudeh <[email protected]>
EuniceSim142 <[email protected]>
Frank Kovacs <[email protected]>
Golden Kumar <[email protected]>
Gunj Joshi <[email protected]>
Harshita Kalani <[email protected]>
Hridyanshu <[email protected]>
Jaimin Godhani <[email protected]>
James Gelok <[email protected]>
Jaysukh Makvana <[email protected]>
Expand Down Expand Up @@ -60,6 +63,7 @@ Pushpendra Chandravanshi <[email protected]>
Raunak Kumar Gupta <[email protected]>
Rejoan Sardar <[email protected]>
Ricky Reusser <[email protected]>
Ridam Garg <[email protected]>
Robert Gislason <[email protected]>
Roman Stetsyk <[email protected]>
Rutam <[email protected]>
Expand All @@ -69,8 +73,11 @@ Seyyed Parsa Neshaei <[email protected]>
Shashank Shekhar Singh <[email protected]>
Shivam <[email protected]>
Shraddheya Shendre <[email protected]>
Shubh Mehta <[email protected]>
Shubham Mishra <[email protected]>
Snehil Shah <[email protected]>
Sivam Das <[email protected]>
Snehil Shah <[email protected]>
Soumajit Chatterjee <[email protected]>
Spandan Barve <[email protected]>
Stephannie Jiménez Gacha <[email protected]>
Suraj kumar <[email protected]>
Expand All @@ -79,8 +86,10 @@ Tudor Pagu <[email protected]>
Utkarsh <http://[email protected]>
Utkarsh Raj <[email protected]>
Varad Gupta <[email protected]>
Xiaochuan Ye <[email protected]>
Yernar Yergaziyev <[email protected]>
naveen <[email protected]>
nishant-s7 <[email protected]>
orimiles5 <[email protected]>
rainn <[email protected]>
rei2hu <[email protected]>
88 changes: 88 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,94 @@ for ( i = 0; i < x.length; i++ ) {

<!-- /.examples -->

<!-- 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/vercos.h"
```

#### stdlib_base_vercos( x )

Computes the [versed cosine][versed-cosine] of a `number` (in radians).

```c
double out = stdlib_base_vercos( 0.0 );
// returns 2.0

out = stdlib_base_vercos( 3.141592653589793 / 2.0 );
// returns 1.0
```

The function accepts the following arguments:

- **x**: `[in] double` input value.

```c
double stdlib_base_vercos( 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/vercos.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_vercos( x[ i ] );
printf( "vercos(%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. -->

<section class="related">
Expand Down
60 changes: 60 additions & 0 deletions benchmark/benchmark.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench-harness' );
var randu = require( '@stdlib/random-base-randu' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var tryRequire = require( '@stdlib/utils-try-require' );
var pkg = require( './../package.json' ).name;


// VARIABLES //

var vercos = tryRequire( resolve( __dirname, './../lib/native.js' ) );
var opts = {
'skip': ( vercos instanceof Error )
};


// MAIN //

bench( pkg+'::native', opts, function benchmark( b ) {
var x;
var y;
var i;

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu() * 20.0 ) - 10.0;
y = vercos( x );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
}
b.toc();
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
b.pass( 'benchmark finished' );
b.end();
});
Loading

0 comments on commit cde99e5

Please sign in to comment.