From a34acbcbcadc5bd256b1b3271ee1f3b46a630848 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 20 Nov 2023 19:27:07 +0000 Subject: [PATCH] Auto-generated commit --- LICENSE | 112 +++++++++++---------- base/ops/docs/types/index.d.ts | 151 +++++++++++++++++++++++++++++ base/special/docs/types/index.d.ts | 29 ++++++ 3 files changed, 234 insertions(+), 58 deletions(-) diff --git a/LICENSE b/LICENSE index 187e7572c..c2e229171 100644 --- a/LICENSE +++ b/LICENSE @@ -229,28 +229,39 @@ Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. -* Faddeeva +* SLATEC Common Mathematical Library -Copyright (c) 2012 Massachusetts Institute of Technology +Public domain. -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: +* Go -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Copyright (c) 2009 The Go Authors. All rights reserved. -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. +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. * SpecialFunctions.jl @@ -283,52 +294,37 @@ SOFTWARE. Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. -* Go +* Faddeeva -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. -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, 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/ -* SLATEC Common Mathematical Library - -Public domain. - diff --git a/base/ops/docs/types/index.d.ts b/base/ops/docs/types/index.d.ts index 3fc07e97b..4028ef8ec 100644 --- a/base/ops/docs/types/index.d.ts +++ b/base/ops/docs/types/index.d.ts @@ -21,6 +21,7 @@ /* eslint-disable max-lines */ import add = require( './../../../../base/ops/add' ); +import add3 = require( './../../../../base/ops/add3' ); import addf = require( './../../../../base/ops/addf' ); import cadd = require( './../../../../base/ops/cadd' ); import caddf = require( './../../../../base/ops/caddf' ); @@ -28,8 +29,11 @@ import cdiv = require( './../../../../base/ops/cdiv' ); import cmul = require( './../../../../base/ops/cmul' ); import cmulf = require( './../../../../base/ops/cmulf' ); import cneg = require( './../../../../base/ops/cneg' ); +import cnegf = require( './../../../../base/ops/cnegf' ); import csub = require( './../../../../base/ops/csub' ); import csubf = require( './../../../../base/ops/csubf' ); +import div = require( './../../../../base/ops/div' ); +import divf = require( './../../../../base/ops/divf' ); import imul = require( './../../../../base/ops/imul' ); import imuldw = require( './../../../../base/ops/imuldw' ); import mul = require( './../../../../base/ops/mul' ); @@ -72,6 +76,36 @@ interface Namespace { */ add: typeof add; + /** + * Computes the sum of three double-precision floating-point numbers. + * + * @param x - first input value + * @param y - second input value + * @param z - third input value + * @returns sum + * + * @example + * var v = ns.add3( -1.0, 5.0, 2.0 ); + * // returns 6.0 + * + * @example + * var v = ns.add3( 2.0, 5.0, 2.0 ); + * // returns 9.0 + * + * @example + * var v = ns.add3( 0.0, 5.0, 2.0 ); + * // returns 7.0 + * + * @example + * var v = ns.add3( -0.0, 0.0, -0.0 ); + * // returns 0.0 + * + * @example + * var v = ns.add3( NaN, NaN, NaN ); + * // returns NaN + */ + add3: typeof add3; + /** * Computes the sum of two single-precision floating-point numbers `x` and `y`. * @@ -299,6 +333,65 @@ interface Namespace { */ cneg: typeof cneg; + /** + * Negates a single-precision complex floating-point number. + * + * @param z - complex number + * @returns result + * + * @example + * var Complex64 = require( `@stdlib/complex/float32` ); + * var realf = require( `@stdlib/complex/realf` ); + * var imagf = require( `@stdlib/complex/imagf` ); + * + * var z = new Complex64( -4.2, 5.5 ); + * // returns + * + * var out = ns.cnegf( z ); + * // returns + * + * var re = realf( out ); + * // returns 4.2 + * + * var im = imagf( out ); + * // returns -5.5 + * + * @example + * var Complex64 = require( `@stdlib/complex/float32` ); + * var realf = require( `@stdlib/complex/realf` ); + * var imagf = require( `@stdlib/complex/imagf` ); + * + * var z = new Complex64( 0.0, 0.0 ); + * // returns + * + * var out = ns.cnegf( z ); + * // returns + * + * var re = realf( out ); + * // returns -0.0 + * + * var im = imagf( out ); + * // returns -0.0 + * + * @example + * var Complex64 = require( `@stdlib/complex/float32` ); + * var realf = require( `@stdlib/complex/realf` ); + * var imagf = require( `@stdlib/complex/imagf` ); + * + * var z = new Complex64( NaN, NaN ); + * // returns + * + * var out = ns.cnegf( z ); + * // returns + * + * var re = realf( out ); + * // returns NaN + * + * var im = imagf( out ); + * // returns NaN + */ + cnegf: typeof cnegf; + /** * Subtracts two double-precision complex floating-point numbers. * @@ -357,6 +450,64 @@ interface Namespace { */ csubf: typeof csubf; + /** + * Divides two double-precision floating-point numbers `x` and `y`. + * + * @param x - first input value (divided) + * @param y - second input value (divisor) + * @returns result + * + * @example + * var v = ns.div( -1.0, 5.0 ); + * // returns -0.2 + * + * @example + * var v = ns.div( 2.0, 5.0 ); + * // returns 0.4 + * + * @example + * var v = ns.div( 0.0, 5.0 ); + * // returns 0.0 + * + * @example + * var v = ns.div( -0.0, 5.0 ); + * // returns -0.0 + * + * @example + * var v = ns.div( NaN, NaN ); + * // returns NaN + */ + div: typeof div; + + /** + * Divides two single-precision floating-point numbers `x` and `y`. + * + * @param x - first input value (divided) + * @param y - second input value (divisor) + * @returns result + * + * @example + * var v = ns.divf( -1.0, 5.0 ); + * // returns ~-0.2 + * + * @example + * var v = ns.divf( 2.0, 5.0 ); + * // returns ~0.4 + * + * @example + * var v = ns.divf( 0.0, 5.0 ); + * // returns 0.0 + * + * @example + * var v = ns.divf( -0.0, 5.0 ); + * // returns -0.0 + * + * @example + * var v = ns.divf( NaN, NaN ); + * // returns NaN + */ + divf: typeof divf; + /** * Performs C-like multiplication of two signed 32-bit integers. * diff --git a/base/special/docs/types/index.d.ts b/base/special/docs/types/index.d.ts index a99b88843..1bc0ccaee 100644 --- a/base/special/docs/types/index.d.ts +++ b/base/special/docs/types/index.d.ts @@ -122,6 +122,7 @@ import expit = require( './../../../../base/special/expit' ); import expm1 = require( './../../../../base/special/expm1' ); import expm1rel = require( './../../../../base/special/expm1rel' ); import factorial = require( './../../../../base/special/factorial' ); +import factorial2 = require( './../../../../base/special/factorial2' ); import factorialln = require( './../../../../base/special/factorialln' ); import fallingFactorial = require( './../../../../base/special/falling-factorial' ); import fast = require( './../../../../base/special/fast' ); @@ -3031,6 +3032,34 @@ interface Namespace { */ factorial: typeof factorial; + /** + * Evaluates the double factorial of `n`. + * + * @param n - input value + * @returns double factorial + * + * @example + * var v = ns.factorial2( 3 ); + * // returns 3 + * + * @example + * var v = ns.factorial2( 4 ); + * // returns 8 + * + * @example + * var v = ns.factorial2( -10 ); + * // returns NaN + * + * @example + * var v = ns.factorial2( 301 ); + * // returns Infinity + * + * @example + * var v = ns.factorial2( NaN ); + * // returns NaN + */ + factorial2: typeof factorial2; + /** * Evaluates the natural logarithm of the factorial of `x`. *