You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/repl/help/lib/db.js
+1
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@ module.exports = {
61
61
"base.ceiln": "\nbase.ceiln( x, n )\n Rounds a numeric value to the nearest multiple of `10^n` toward positive\n infinity.\n\n When operating on floating-point numbers in bases other than `2`, rounding\n to specified digits can be inexact.\n\n Parameters\n ----------\n x: number\n Input value.\n\n n: integer\n Integer power of 10.\n\n Returns\n -------\n y: number\n Rounded value.\n\n Examples\n --------\n // Round to 2 decimal places:\n > var y = base.ceiln( 3.14159, -2 )\n 3.15\n\n // If `n = 0`, standard round toward positive infinity behavior:\n > y = base.ceiln( 3.14159, 0 )\n 4.0\n\n // Round to nearest thousand:\n > y = base.ceiln( 12368.0, 3 )\n 13000.0\n\n\n See Also\n --------\n base.ceil, base.ceilb, base.floorn, base.roundn\n",
62
62
"base.ceilsd": "\nbase.ceilsd( x, n[, b] )\n Rounds a numeric value to the nearest number toward positive infinity with\n `n` significant figures.\n\n Parameters\n ----------\n x: number\n Input value.\n\n n: integer\n Number of significant figures. Must be greater than 0.\n\n b: integer (optional)\n Base. Must be greater than 0. Default: 10.\n\n Returns\n -------\n y: number\n Rounded value.\n\n Examples\n --------\n > var y = base.ceilsd( 3.14159, 5 )\n 3.1416\n > y = base.ceilsd( 3.14159, 1 )\n 4.0\n > y = base.ceilsd( 12368.0, 2 )\n 13000.0\n > y = base.ceilsd( 0.0313, 2, 2 )\n 0.046875\n\n See Also\n --------\n base.ceil, base.floorsd, base.roundsd, base.truncsd\n",
63
63
"base.cfloor": "\nbase.cfloor( [out,] re, im )\n Rounds a complex number toward negative infinity.\n\n Parameters\n ----------\n out: Array|TypedArray|Object (optional)\n Output array.\n\n re: number\n Real component.\n\n im: number\n Imaginary component.\n\n Returns\n -------\n out: Array|TypedArray|Object\n Rounded components.\n\n Examples\n --------\n > var out = base.cfloor( 5.5, 3.3 )\n [ 5.0, 3.0 ]\n\n // Provide an output array:\n > out = new Float64Array( 2 );\n > var v = base.cfloor( out, 5.5, 3.3 )\n <Float64Array>[ 5.0, 3.0 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.cceil, base.cround\n",
64
+
"base.clamp": "\nbase.clamp( v, min, max )\n Restricts a value to a specified range.\n\n If provided `NaN` for any argument, the function returns `NaN`.\n\n Parameters\n ----------\n v: number\n Value to restrict.\n\n min: number\n Minimum value.\n\n max: number\n Maximum value.\n\n Returns\n -------\n y: number\n Restricted value.\n\n Examples\n --------\n > var y = base.clamp( 3.14, 0.0, 5.0 )\n 3.14\n > y = base.clamp( -3.14, 0.0, 5.0 )\n 0.0\n > y = base.clamp( 3.14, 0.0, 3.0 )\n 3.0\n > y = base.clamp( -0.0, 0.0, 5.0 )\n 0.0\n > y = base.clamp( 0.0, -3.14, -0.0 )\n -0.0\n > y = base.clamp( NaN, 0.0, 5.0 )\n NaN\n\n",
64
65
"base.cinv": "\nbase.cinv( [out,] re, im )\n Computes the inverse of a complex number.\n\n Parameters\n ----------\n out: Array|TypedArray|Object (optional)\n Output array.\n\n re: number\n Real component.\n\n im: number\n Imaginary component.\n\n Returns\n -------\n out: Array|TypedArray|Object\n Real and imaginary components.\n\n Examples\n --------\n > var y = base.cinv( 2.0, 4.0 )\n [ 0.1, -0.2 ]\n\n > var out = new Float64Array( 2 );\n > var v = base.cinv( out, 2.0, 4.0 )\n <Float64Array>[ 0.1, -0.2 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.cdiv\n",
65
66
"base.cmul": "\nbase.cmul( [out,] re1, im1, re2, im2 )\n Multiplies two complex numbers.\n\n Parameters\n ----------\n out: Array|TypedArray|Object (optional)\n Output array.\n\n re1: number\n Real component.\n\n im1: number\n Imaginary component.\n\n re2: number\n Real component.\n\n im2: number\n Imaginary component.\n\n Returns\n -------\n out: Array|TypedArray|Object\n Array containing the real and imaginary components of the result.\n\n Examples\n --------\n > var out = base.cmul( 5.0, 3.0, -2.0, 1.0 )\n [ -13.0, -1.0 ]\n\n // Provide an output array:\n > var out = new Float64Array( 2 );\n > var v = base.cmul( out, 5.0, 3.0, -2.0, 1.0 )\n <Float64Array>[ -13.0, -1.0 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.cadd, base.cdiv, base.csub\n",
66
67
"base.continuedFraction": "\nbase.continuedFraction( generator[, options] )\n Evaluates the continued fraction approximation for the supplied series\n generator using the modified Lentz algorithm.\n\n `generator` can be either a function which returns an array with two\n elements, the `a` and `b` terms of the fraction, or an ES6 Generator object.\n\n By default, the function computes\n\n a1\n ---------------\n b1 + a2\n ----------\n b2 + a3\n -----\n b3 + ...\n\n To evaluate\n\n b0 +\t a1\n ---------------\n b1 +\t a2\n ----------\n b2 + a3\n -----\n b3 + ...\n\n set the `keep` option to `true`.\n\n Parameters\n ----------\n generator: Function\n Function returning terms of continued fraction expansion.\n\n options: Object (optional)\n Options.\n\n options.maxIter: integer (optional)\n Maximum number of iterations. Default: `1000000`.\n\n options.tolerance: number (optional)\n Further terms are only added as long as the next term is greater than\n current term times the tolerance. Default: `2.22e-16`.\n\n options.keep: boolean (optional)\n Boolean indicating whether to keep the `b0` term in the continued\n fraction. Default: `false`.\n\n Returns\n -------\n out: number\n Value of continued fraction.\n\n Examples\n --------\n // Continued fraction for (e-1)^(-1):\n > function closure() {\n > var i = 0;\n > return function() {\n > i++;\n > return [ i, i ];\n > };\n > }\n > var gen = closure()\n > var out = base.continuedFraction( gen )\n ~0.582\n\n // Using an ES6 generator:\n > function* generator() {\n > var i = 0;\n > while ( true ) {\n > i++;\n > yield [ i, i ];\n > }\n > }\n > gen = generator();\n > out = base.continuedFraction( gen )\n ~0.582\n\n // Set options:\n > out = base.continuedFraction( generator(), { 'keep': true } )\n ~1.718\n > out = base.continuedFraction( generator(), { 'maxIter': 10 } )\n ~0.582\n > out = base.continuedFraction( generator(), { 'tolerance': 1e-1 } )\n ~0.578\n\n",
0 commit comments