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 Oct 18, 2024
1 parent 46b9635 commit 0da3f1a
Show file tree
Hide file tree
Showing 13 changed files with 150 additions and 92 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section class="release" id="unreleased">

## Unreleased (2024-10-15)
## Unreleased (2024-10-18)

<section class="packages">

Expand Down Expand Up @@ -432,6 +432,11 @@ A total of 5 people contributed to this release. Thank you to the following cont

<details>

- [`325ca07`](https://github.com/stdlib-js/stdlib/commit/325ca074aa79d05fc6aa551d035d600b7bb66f2e) - **bench:** refactor benchmarks _(by Athan Reines)_
- [`c6fe24f`](https://github.com/stdlib-js/stdlib/commit/c6fe24f012b118f30347d075ce52169c8423fbf5) - **bench:** refactor benchmarks _(by Athan Reines)_
- [`923a355`](https://github.com/stdlib-js/stdlib/commit/923a3553d58b3dac76c22d895bf0bf7c7c3bc75e) - **bench:** refactor C benchmarks _(by Athan Reines)_
- [`2b30eb7`](https://github.com/stdlib-js/stdlib/commit/2b30eb7d91ebcad9919546040198fad15c54b2b8) - **bench:** refactor C benchmarks _(by Athan Reines)_
- [`33494b7`](https://github.com/stdlib-js/stdlib/commit/33494b7c0d3bba12b17fc6f0b6990cdadc9c04aa) - **build:** add WebAssembly configuration _(by Athan Reines)_
- [`6c58a22`](https://github.com/stdlib-js/stdlib/commit/6c58a22b6f7e514fb358c3256b9573357e4baa65) - **bench:** refactor benchmarks _(by Athan Reines)_
- [`870f645`](https://github.com/stdlib-js/stdlib/commit/870f64561a7d90579bd92920c8733a205ed0a55c) - **build:** add WebAssembly configuration _(by Athan Reines)_
- [`2ce25ea`](https://github.com/stdlib-js/stdlib/commit/2ce25ea8e857700287558847d93b108f3ca6b33d) - **build:** add WebAssembly configuration _(by Athan Reines)_
Expand Down
119 changes: 61 additions & 58 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -229,43 +229,43 @@ Permission to use, copy, modify, and distribute this
software is freely granted, provided that this notice
is preserved.

* SLATEC Common Mathematical Library <https://netlib.org/slatec/>

Public domain.

* FDLIBM <http://www.netlib.org/fdlibm/>

Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.

* Faddeeva <http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package#License>

Copyright (c) 2012 Massachusetts Institute of Technology
* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Copyright (c) 2009 The Go Authors. All rights reserved.

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>
Expand Down Expand Up @@ -294,43 +294,46 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>
* Faddeeva <http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package#License>

Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright (c) 2012 Massachusetts Institute of Technology

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Stephen L. Moshier
[email protected]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

* SLATEC Common Mathematical Library <https://netlib.org/slatec/>

Public domain.

9 changes: 6 additions & 3 deletions base/special/exp2/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var uniform = require( '@stdlib/random/array/uniform' );
var isnan = require( './../../../../base/assert/is-nan' );
var pkg = require( './../package.json' ).name;
var exp2 = require( './../lib' );
Expand All @@ -34,10 +34,13 @@ bench( pkg, function benchmark( b ) {
var y;
var i;

x = uniform( 10, -1022.0, 1022.0, {
'dtype': 'generic'
});

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*2044.0 ) - 1022.0;
y = exp2( x );
y = exp2( x[ i%x.length ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
9 changes: 6 additions & 3 deletions base/special/exp2/benchmark/benchmark.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var uniform = require( '@stdlib/random/array/uniform' );
var isnan = require( './../../../../base/assert/is-nan' );
var tryRequire = require( '@stdlib/utils/try-require' );
var pkg = require( './../package.json' ).name;
Expand All @@ -43,10 +43,13 @@ bench( pkg+'::native', opts, function benchmark( b ) {
var y;
var i;

x = uniform( 10, -1022.0, 1022.0, {
'dtype': 'generic'
});

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu() * 2044.0 ) - 1022.0;
y = exp2( x );
y = exp2( x[ i%x.length ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
8 changes: 5 additions & 3 deletions base/special/exp2/benchmark/c/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,17 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double x;
double x[ 10 ];
double y;
double t;
int i;

for ( i = 0; i < 10; i++ ) {
x[ i ] = ( 2044.0 * rand_double() ) - 1022.0;
}
t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 2044.0*rand_double() ) - 1022.0;
y = exp2( x );
y = exp2( x[ i%10 ] );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
Expand Down
8 changes: 5 additions & 3 deletions base/special/exp2/benchmark/c/cephes/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,17 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double x;
double x[ 10 ];
double y;
double t;
int i;

for ( i = 0; i < 10; i++ ) {
x[ i ] = ( 2044.0 * rand_double() ) - 1022.0;
}
t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 2044.0*rand_double() ) - 1022.0;
y = exp2( x );
y = exp2( x[ i%10 ] );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
Expand Down
8 changes: 5 additions & 3 deletions base/special/exp2/benchmark/c/native/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,17 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double x;
double x[ 10 ];
double y;
double t;
int i;

for ( i = 0; i < 10; i++ ) {
x[ i ] = ( 2044.0 * rand_double() ) - 1022.0;
}
t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 2044.0 * rand_double() ) - 1022.0;
y = stdlib_base_exp2( x );
y = stdlib_base_exp2( x[ i%10 ] );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
Expand Down
16 changes: 11 additions & 5 deletions base/special/ln/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var uniform = require( '@stdlib/random/array/uniform' );
var isnan = require( './../../../../base/assert/is-nan' );
var pkg = require( './../package.json' ).name;
var ln = require( './../lib' );
Expand All @@ -34,10 +34,13 @@ bench( pkg, function benchmark( b ) {
var y;
var i;

x = uniform( 10, 0.0, 10000.0, {
'dtype': 'generic'
});

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*10000.0 ) - 0.0;
y = ln( x );
y = ln( x[ i%x.length ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand All @@ -55,10 +58,13 @@ bench( pkg+'::built-in', function benchmark( b ) {
var y;
var i;

x = uniform( 10, 0.0, 10000.0, {
'dtype': 'generic'
});

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*10000.0 ) - 0.0;
y = Math.log( x ); // eslint-disable-line stdlib/no-builtin-math
y = Math.log( x[ i%x.length ] ); // eslint-disable-line stdlib/no-builtin-math
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
9 changes: 6 additions & 3 deletions base/special/ln/benchmark/benchmark.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var uniform = require( '@stdlib/random/array/uniform' );
var isnan = require( './../../../../base/assert/is-nan' );
var tryRequire = require( '@stdlib/utils/try-require' );
var pkg = require( './../package.json' ).name;
Expand All @@ -43,10 +43,13 @@ bench( pkg+'::native', opts, function benchmark( b ) {
var y;
var i;

x = uniform( 10, 0.0, 10000.0, {
'dtype': 'generic'
});

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*10000.0 ) - 0.0;
y = ln( x );
y = ln( x[ i%x.length ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
8 changes: 5 additions & 3 deletions base/special/ln/benchmark/c/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,17 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double x;
double x[ 10 ];
double y;
double t;
int i;

for ( i = 0; i < 10; i++ ) {
x[ i ] = ( 10000.0*rand_double() ) - 0.0;
}
t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 10000.0*rand_double() ) - 0.0;
y = log( x );
y = log( x[ i%10 ] );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
Expand Down
8 changes: 5 additions & 3 deletions base/special/ln/benchmark/c/cephes/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,17 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double x;
double x[ 10 ];
double y;
double t;
int i;

for ( i = 0; i < 10; i++ ) {
x[ i ] = ( 10000.0*rand_double() ) - 0.0;
}
t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( 10000.0*rand_double() ) - 0.0;
y = log( x );
y = log( x[ i%10 ] );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
Expand Down
Loading

0 comments on commit 0da3f1a

Please sign in to comment.