-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6f917c
commit 843ca9a
Showing
18 changed files
with
1,459 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,26 +2,26 @@ | |
# | ||
# Contributors listed in alphabetical order. | ||
|
||
Adarsh Palaskar <[email protected].com> | ||
Aditya Sapra <[email protected].com> | ||
Adarsh Palaskar <adarshpalaskar99@gmail.com> | ||
Aditya Sapra <adityaework@gmail.com> | ||
AgPriyanshu18 <[email protected]> | ||
Ali Salesi <[email protected]> | ||
Aman Bhansali <[email protected]> | ||
Aman Bhansali <[email protected]> | ||
Amit Jimiwal <[email protected]> | ||
Anudeep Sanapala <[email protected].com> | ||
Anudeep Sanapala <anudeep0306@gmail.com> | ||
Athan Reines <[email protected]> | ||
Brendan Graetz <[email protected]> | ||
Bruno Fenzl <[email protected]> | ||
Chinmay J <[email protected]> | ||
Chinmay Joshi <[email protected]> | ||
Christopher Dambamuromo <[email protected]> | ||
Dan Rose <[email protected]> | ||
Daniel Killenberger <[email protected]> | ||
Dominik Moritz <[email protected]> | ||
Dorrin Sotoudeh <[email protected]> | ||
EuniceSim142 <[email protected]> | ||
Frank Kovacs <[email protected]> | ||
GUNJ JOSHI <gunjjoshi8372@gmail.com> | ||
Golden <[email protected].com> | ||
Golden Kumar <[email protected].com> | ||
Gunj Joshi <gunjjoshi8372@gmail.com> | ||
Harshita Kalani <[email protected]> | ||
Jaimin Godhani <[email protected]> | ||
James Gelok <[email protected]> | ||
|
@@ -50,7 +50,7 @@ Pranav Goswami <[email protected]> | |
Praneki <[email protected]> | ||
Pratik <[email protected]> | ||
Priyansh <[email protected]> | ||
Raunak Kumar Gupta <[email protected].com> | ||
Raunak Kumar Gupta <raunakmodanwal321@gmail.com> | ||
Rejoan Sardar <[email protected]> | ||
Ricky Reusser <[email protected]> | ||
Robert Gislason <[email protected]> | ||
|
@@ -59,16 +59,16 @@ Rutam <[email protected]> | |
Ryan Seal <[email protected]> | ||
Sai Srikar Dumpeti <[email protected]> | ||
Seyyed Parsa Neshaei <[email protected]> | ||
Shashank Shekhar Singh <[email protected].com> | ||
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com> | ||
Shraddheya Shendre <[email protected]> | ||
Shubham <[email protected]> | ||
Shubham Mishra <[email protected]> | ||
Snehil Shah <[email protected]> | ||
Spandan Barve <[email protected]> | ||
Spandan Barve <[email protected]> | ||
Stephannie Jiménez Gacha <[email protected]> | ||
Utkarsh <[email protected]> | ||
Utkarsh <http://[email protected]> | ||
Utkarsh Raj <[email protected]> | ||
Varad Gupta <[email protected]> | ||
Yernar Yergaziyev <[email protected]> | ||
nishant-s7 <[email protected]> | ||
orimiles5 <[email protected]> | ||
rei2hu <[email protected]> | ||
utkarsh_raj <[email protected]> | ||
vr-varad <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,6 +207,28 @@ 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. | ||
|
||
* Cephes <http://www.netlib.org/cephes/readme> | ||
|
||
Copyright (c) 1984-2000 Stephen L. Moshier | ||
|
||
Some software in this archive may be from the book _Methods and Programs for | ||
Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) | ||
or from the Cephes Mathematical Library, a commercial product. In either event, | ||
it is copyrighted by the author. What you see here may be used freely but it | ||
comes with no support or guarantee. | ||
|
||
Stephen L. Moshier | ||
[email protected] | ||
|
||
* FreeBSD <https://svnweb.freebsd.org/> | ||
|
||
Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. | ||
|
||
Developed at SunPro, a Sun Microsystems, Inc. business. | ||
Permission to use, copy, modify, and distribute this | ||
software is freely granted, provided that this notice | ||
is preserved. | ||
|
||
* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE> | ||
|
||
Copyright (c) 2009 The Go Authors. All rights reserved. | ||
|
@@ -237,28 +259,6 @@ 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. | ||
|
||
* Cephes <http://www.netlib.org/cephes/readme> | ||
|
||
Copyright (c) 1984-2000 Stephen L. Moshier | ||
|
||
Some software in this archive may be from the book _Methods and Programs for | ||
Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) | ||
or from the Cephes Mathematical Library, a commercial product. In either event, | ||
it is copyrighted by the author. What you see here may be used freely but it | ||
comes with no support or guarantee. | ||
|
||
Stephen L. Moshier | ||
[email protected] | ||
|
||
* FreeBSD <https://svnweb.freebsd.org/> | ||
|
||
Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. | ||
|
||
Developed at SunPro, a Sun Microsystems, Inc. business. | ||
Permission to use, copy, modify, and distribute this | ||
software is freely granted, provided that this notice | ||
is preserved. | ||
|
||
* Faddeeva <http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package#License> | ||
|
||
Copyright (c) 2012 Massachusetts Institute of Technology | ||
|
@@ -282,18 +282,13 @@ 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. | ||
|
||
* SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/> | ||
|
||
Public domain. | ||
|
||
* FDLIBM <http://www.netlib.org/fdlibm/> | ||
|
||
Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. | ||
|
||
Developed at SunPro, a Sun Microsystems, Inc. business. | ||
Permission to use, copy, modify, and distribute this | ||
software is freely granted, provided that this notice | ||
is preserved. | ||
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/ | ||
|
@@ -325,3 +320,11 @@ 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. | ||
|
||
* SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/> | ||
|
||
Public domain. | ||
|
||
* FDLIBM <http://www.netlib.org/fdlibm/> | ||
|
||
Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* @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' ); | ||
var randu = require( '@stdlib/random/base/randu' ); | ||
var floor = require( './../../../../base/special/floor' ); | ||
var isnan = require( './../../../../base/assert/is-nan' ); | ||
var tryRequire = require( '@stdlib/utils/try-require' ); | ||
var pkg = require( './../package.json' ).name; | ||
|
||
|
||
// VARIABLES // | ||
|
||
var bernoulli = tryRequire( resolve( __dirname, './../lib/native.js' ) ); | ||
var opts = { | ||
'skip': ( bernoulli 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 = floor( randu() * 500.0 ); | ||
y = bernoulli( 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(); | ||
}); |
Oops, something went wrong.