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 Apr 3, 2024
1 parent 92d4110 commit 7c63353
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 86 deletions.
163 changes: 83 additions & 80 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -207,45 +207,6 @@ 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.

* SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>

The MIT License (MIT)

Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others:

https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.

* 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.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

* Cephes <http://www.netlib.org/cephes/readme>

Copyright (c) 1984-2000 Stephen L. Moshier
Expand All @@ -259,25 +220,44 @@ 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.

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/
* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>

* FDLIBM <http://www.netlib.org/fdlibm/>
Copyright (c) 2009 The Go Authors. All rights reserved.

Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* 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.

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.

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

Expand All @@ -302,43 +282,66 @@ 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/>
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/

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

* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>
* SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>

Copyright (c) 2009 The Go Authors. All rights reserved.
The MIT License (MIT)

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others:

* 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.
https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors

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.
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:

Stephen L. Moshier
[email protected]
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.

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/

* 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.

26 changes: 23 additions & 3 deletions base/special/atan/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ var EPS = require( '@stdlib/constants/float64/eps' );
var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var PI = require( '@stdlib/constants/float64/pi' );
var isNegativeZero = require( './../../../../base/assert/is-negative-zero' );
var isPositiveZero = require( './../../../../base/assert/is-positive-zero' );
var atan = require( './../lib' );


Expand Down Expand Up @@ -369,18 +371,36 @@ tape( 'the function computes the arctangent on the interval `[1e300,1e308]`', fu

tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
var v = atan( NaN );
t.equal( isnan( v ), true, 'returns NaN' );
t.equal( isnan( v ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns `pi/2` if provided `+infinity`', function test( t ) {
var v = atan( PINF );
t.equal( v, PI/2, 'returns pi/2' );
t.equal( v, PI/2, 'returns expected value' );
t.end();
});

tape( 'the function returns `-pi/2` if provided `-infinity`', function test( t ) {
var v = atan( NINF );
t.equal( v, -PI/2, 'returns -pi/2' );
t.equal( v, -PI/2, 'returns expected value' );
t.end();
});

tape( 'the function returns `-0` if provided `-0`', function test( t ) {
var v = atan( -0.0 );
t.equal( isNegativeZero( v ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns `0` if provided +0', function test( t ) {
var v;

v = atan( 0.0 );
t.equal( isPositiveZero( v ), true, 'returns expected value' );

v = atan( +0.0 );
t.equal( isPositiveZero( v ), true, 'returns expected value' );

t.end();
});
26 changes: 23 additions & 3 deletions base/special/atan/test/test.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ var EPS = require( '@stdlib/constants/float64/eps' );
var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var PI = require( '@stdlib/constants/float64/pi' );
var isNegativeZero = require( './../../../../base/assert/is-negative-zero' );
var isPositiveZero = require( './../../../../base/assert/is-positive-zero' );


// FIXTURES //
Expand Down Expand Up @@ -378,18 +380,36 @@ tape( 'the function computes the arctangent on the interval `[1e300,1e308]`', op

tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
var v = atan( NaN );
t.equal( isnan( v ), true, 'returns NaN' );
t.equal( isnan( v ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns `pi/2` if provided `+infinity`', opts, function test( t ) {
var v = atan( PINF );
t.equal( v, PI/2, 'returns pi/2' );
t.equal( v, PI/2, 'returns expected value' );
t.end();
});

tape( 'the function returns `-pi/2` if provided `-infinity`', opts, function test( t ) {
var v = atan( NINF );
t.equal( v, -PI/2, 'returns -pi/2' );
t.equal( v, -PI/2, 'returns expected value' );
t.end();
});

tape( 'the function returns `-0` if provided `-0`', opts, function test( t ) {
var v = atan( -0.0 );
t.equal( isNegativeZero( v ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns `0` if provided +0', opts, function test( t ) {
var v;

v = atan( 0.0 );
t.equal( isPositiveZero( v ), true, 'returns expected value' );

v = atan( +0.0 );
t.equal( isPositiveZero( v ), true, 'returns expected value' );

t.end();
});
15 changes: 15 additions & 0 deletions base/special/atanf/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ var tape = require( 'tape' );
var isnanf = require( './../../../../base/assert/is-nanf' );
var abs = require( './../../../../base/special/abs' );
var EPS = require( '@stdlib/constants/float32/eps' );
var PINF = require( '@stdlib/constants/float32/pinf' );
var NINF = require( '@stdlib/constants/float32/ninf' );
var HALF_PI = require( '@stdlib/constants/float32/half-pi' );
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var isNegativeZerof = require( './../../../../base/assert/is-negative-zerof' );
var isPositiveZerof = require( './../../../../base/assert/is-positive-zerof' );
Expand Down Expand Up @@ -399,6 +402,18 @@ tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
t.end();
});

tape( 'the function returns `pi/2` if provided `+infinity`', function test( t ) {
var v = atanf( PINF );
t.equal( v, HALF_PI, 'returns expected value' );
t.end();
});

tape( 'the function returns `-pi/2` if provided `-infinity`', function test( t ) {
var v = atanf( NINF );
t.equal( v, -HALF_PI, 'returns expected value' );
t.end();
});

tape( 'the function returns `-0` if provided `-0`', function test( t ) {
var v = atanf( -0.0 );
t.equal( isNegativeZerof( v ), true, 'returns -0' );
Expand Down
15 changes: 15 additions & 0 deletions base/special/atanf/test/test.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ var tape = require( 'tape' );
var isnanf = require( './../../../../base/assert/is-nanf' );
var abs = require( './../../../../base/special/abs' );
var EPS = require( '@stdlib/constants/float32/eps' );
var PINF = require( '@stdlib/constants/float32/pinf' );
var NINF = require( '@stdlib/constants/float32/ninf' );
var HALF_PI = require( '@stdlib/constants/float32/half-pi' );
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
var isNegativeZerof = require( './../../../../base/assert/is-negative-zerof' );
var isPositiveZerof = require( './../../../../base/assert/is-positive-zerof' );
Expand Down Expand Up @@ -408,6 +411,18 @@ tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
t.end();
});

tape( 'the function returns `pi/2` if provided `+infinity`', opts, function test( t ) {
var v = atanf( PINF );
t.equal( v, HALF_PI, 'returns expected value' );
t.end();
});

tape( 'the function returns `-pi/2` if provided `-infinity`', opts, function test( t ) {
var v = atanf( NINF );
t.equal( v, -HALF_PI, 'returns expected value' );
t.end();
});

tape( 'the function returns `-0` if provided `-0`', opts, function test( t ) {
var v = atanf( -0.0 );
t.equal( isNegativeZerof( v ), true, 'returns -0' );
Expand Down

0 comments on commit 7c63353

Please sign in to comment.