Arquivos
hhvm/hphp/system/math.inc
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

62 linhas
25 KiB
SQL

// @generated by "php idl.php inc {input.idl.php} {output.inc}"
#if EXT_TYPE == 0
"pi", T(Double), S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.pi.php )\n *\n *\n * @return float The value of pi as float.\n */",
"min", T(Variant), S(0), "value", T(Variant), NULL, S(0), NULL, S(0), NULL, S(147456), "/**\n * ( excerpt from http://php.net/manual/en/function.min.php )\n *\n * If the first and only parameter is an array, min() returns the lowest\n * value in that array. If at least two parameters are provided, min()\n * returns the smallest of these values.\n *\n * PHP will evaluate a non-numeric string as 0 if compared to integer, but\n * still return the string if it's seen as the numerically lowest value. If\n * multiple arguments evaluate to 0, min() will return the lowest\n * alphanumerical string value if any strings are given, else a numeric 0\n * is returned.\n *\n * @value mixed An array containing the values.\n *\n * @return mixed min() returns the numerically lowest of the\n * parameter values.\n */",
"max", T(Variant), S(0), "value", T(Variant), NULL, S(0), NULL, S(0), NULL, S(147456), "/**\n * ( excerpt from http://php.net/manual/en/function.max.php )\n *\n * If the first and only parameter is an array, max() returns the highest\n * value in that array. If at least two parameters are provided, max()\n * returns the biggest of these values.\n *\n * PHP will evaluate a non-numeric string as 0 if compared to integer, but\n * still return the string if it's seen as the numerically highest value.\n * If multiple arguments evaluate to 0, max() will return a numeric 0 if\n * given, else the alphabetical highest string value will be returned.\n *\n * @value mixed An array containing the values.\n *\n * @return mixed max() returns the numerically highest of the\n * parameter values. If multiple values can be\n * considered of the same size, the one that is listed\n * first will be returned.\n *\n * When max() is given multiple arrays, the longest\n * array is returned. If all the arrays have the same\n * length, max() will use lexicographic ordering to\n * find the return value.\n *\n * When given a string it will be cast as an integer\n * when comparing.\n */",
"abs", T(Variant), S(0), "number", T(Variant), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.abs.php )\n *\n * Returns the absolute value of number.\n *\n * @number mixed The numeric value to process\n *\n * @return mixed The absolute value of number. If the argument number\n * is of type float, the return type is also float,\n * otherwise it is integer (as float usually has a\n * bigger value range than integer).\n */",
"is_finite", T(Boolean), S(0), "val", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.is-finite.php )\n *\n * Checks whether val is a legal finite on this platform.\n *\n * @val float The value to check\n *\n * @return bool TRUE if val is a legal finite number within the\n * allowed range for a PHP float on this platform, else\n * FALSE.\n */",
"is_infinite", T(Boolean), S(0), "val", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.is-infinite.php )\n *\n * Returns TRUE if val is infinite (positive or negative), like the result\n * of log(0) or any value too big to fit into a float on this platform.\n *\n * @val float The value to check\n *\n * @return bool TRUE if val is infinite, else FALSE.\n */",
"is_nan", T(Boolean), S(0), "val", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.is-nan.php )\n *\n * Checks whether val is 'not a number', like the result of acos(1.01).\n *\n * @val float The value to check\n *\n * @return bool Returns TRUE if val is 'not a number', else FALSE.\n */",
"ceil", T(Double), S(0), "value", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.ceil.php )\n *\n *\n * @value float The value to round\n *\n * @return float value rounded up to the next highest integer. The\n * return value of ceil() is still of type float as the\n * value range of float is usually bigger than that of\n * integer.\n */",
"floor", T(Double), S(0), "value", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.floor.php )\n *\n *\n * @value float The numeric value to round\n *\n * @return float value rounded to the next lowest integer. The return\n * value of floor() is still of type float because the\n * value range of float is usually bigger than that of\n * integer.\n */",
"round", T(Double), S(0), "val", T(Variant), NULL, S(0), NULL, S(0), "precision", T(Int64), "i:0;", S(4), "0", S(0), "mode", T(Int64), "i:1;", S(4), "1", S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.round.php )\n *\n * Returns the rounded value of val to specified precision (number of\n * digits after the decimal point). precision can also be negative or zero\n * (default).\n *\n * PHP doesn't handle strings like \"12,300.2\" correctly by default. See\n * converting from strings.\n *\n * @val mixed The value to round\n * @precision int The optional number of decimal digits to round to.\n * @mode int One of the PHP_ROUND_HALF_* constants to determine\n * how rounding should occur.\n *\n * @return float The rounded value\n */",
"deg2rad", T(Double), S(0), "number", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.deg2rad.php )\n *\n * This function converts number from degrees to the radian equivalent.\n *\n * @number float Angular value in degrees\n *\n * @return float The radian equivalent of number\n */",
"rad2deg", T(Double), S(0), "number", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.rad2deg.php )\n *\n * This function converts number from radian to degrees.\n *\n * @number float A radian value\n *\n * @return float The equivalent of number in degrees\n */",
"decbin", T(String), S(0), "number", T(Int64), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.decbin.php )\n *\n * Returns a string containing a binary representation of the given number\n * argument.\n *\n * @number int Decimal value to convert Range of inputs on 32-bit\n * machines positive number negative number return\n * value 0 \240 0 1 \240 1 2 \240 10 ... normal progression ...\n * 2147483646 \240 1111111111111111111111111111110\n * 2147483647 (largest signed integer) \240\n * 1111111111111111111111111111111 (31 1's) 2147483648\n * -2147483648 10000000000000000000000000000000 ...\n * normal progression ... 4294967294 -2\n * 11111111111111111111111111111110 4294967295 (largest\n * unsigned integer) -1\n * 11111111111111111111111111111111 (32 1's) Range of\n * inputs on 64-bit machines positive number negative\n * number return value 0 \240 0 1 \240 1 2 \240 10 ... normal\n * progression ... 9223372036854775806 \240\n * 111111111111111111111111111111111111111111111111111111111111110\n * 9223372036854775807 (largest signed integer) \240\n * 111111111111111111111111111111111111111111111111111111111111111\n * (63 1's) \240 -9223372036854775808\n * 1000000000000000000000000000000000000000000000000000000000000000\n * ... normal progression ... \240 -2\n * 1111111111111111111111111111111111111111111111111111111111111110\n * \240 -1\n * 1111111111111111111111111111111111111111111111111111111111111111\n * (64 1's)\n *\n * @return string Binary string representation of number\n */",
"dechex", T(String), S(0), "number", T(Int64), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.dechex.php )\n *\n * Returns a string containing a hexadecimal representation of the given\n * number argument. The largest number that can be converted is 4294967295\n * in decimal resulting to \"ffffffff\".\n *\n * @number int Decimal value to convert\n *\n * @return string Hexadecimal string representation of number\n */",
"decoct", T(String), S(0), "number", T(Int64), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.decoct.php )\n *\n * Returns a string containing an octal representation of the given number\n * argument. The largest number that can be converted is 4294967295 in\n * decimal resulting to \"37777777777\".\n *\n * @number int Decimal value to convert\n *\n * @return string Octal string representation of number\n */",
"bindec", T(Variant), S(0), "binary_string", T(String), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.bindec.php )\n *\n * Returns the decimal equivalent of the binary number represented by the\n * binary_string argument.\n *\n * bindec() converts a binary number to an integer or, if needed for size\n * reasons, float.\n *\n * bindec() interprets all binary_string values as unsigned integers. This\n * is because bindec() sees the most significant bit as another order of\n * magnitude rather than as the sign bit.\n * Warning\n *\n * The parameter must be a string. Using other data types will produce\n * unexpected results.\n *\n * @binary_string\n * string The binary string to convert\n *\n * @return mixed The decimal value of binary_string\n */",
"hexdec", T(Variant), S(0), "hex_string", T(String), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.hexdec.php )\n *\n * Returns the decimal equivalent of the hexadecimal number represented by\n * the hex_string argument. hexdec() converts a hexadecimal string to a\n * decimal number.\n *\n * hexdec() will ignore any non-hexadecimal characters it encounters.\n *\n * @hex_string string The hexadecimal string to convert\n *\n * @return mixed The decimal representation of hex_string\n */",
"octdec", T(Variant), S(0), "octal_string", T(String), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.octdec.php )\n *\n * Returns the decimal equivalent of the octal number represented by the\n * octal_string argument.\n *\n * @octal_string\n * string The octal string to convert\n *\n * @return mixed The decimal representation of octal_string\n */",
"base_convert", T(Variant), S(0), "number", T(String), NULL, S(0), NULL, S(0), "frombase", T(Int64), NULL, S(0), NULL, S(0), "tobase", T(Int64), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.base-convert.php )\n *\n * Returns a string containing number represented in base tobase. The base\n * in which number is given is specified in frombase. Both frombase and\n * tobase have to be between 2 and 36, inclusive. Digits in numbers with a\n * base higher than 10 will be represented with the letters a-z, with a\n * meaning 10, b meaning 11 and z meaning 35. Warning base_convert() may\n * lose precision on large numbers due to properties related to the\n * internal \"double\" or \"float\" type used. Please see the Floating point\n * numbers section in the manual for more specific information and\n * limitations.\n *\n * @number string The number to convert\n * @frombase int The base number is in\n * @tobase int The base to convert number to\n *\n * @return mixed number converted to base tobase\n */",
"pow", T(Numeric), S(0), "base", T(Variant), NULL, S(0), NULL, S(0), "exp", T(Variant), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.pow.php )\n *\n * Returns base raised to the power of exp. Warning\n *\n * In PHP 4.0.6 and earlier pow() always returned a float, and did not\n * issue warnings.\n *\n * @base mixed The base to use\n * @exp mixed The exponent\n *\n * @return number base raised to the power of exp. If the result can\n * be represented as integer it will be returned as\n * type integer, else it will be returned as type\n * float. If the power cannot be computed FALSE will be\n * returned instead.\n */",
"exp", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.exp.php )\n *\n * Returns e raised to the power of arg.\n *\n * 'e' is the base of the natural system of logarithms, or approximately\n * 2.718282.\n *\n * @arg float The argument to process\n *\n * @return float 'e' raised to the power of arg\n */",
"expm1", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.expm1.php )\n *\n * expm1() returns the equivalent to 'exp(arg) - 1' computed in a way that\n * is accurate even if the value of arg is near zero, a case where 'exp\n * (arg) - 1' would be inaccurate due to subtraction of two numbers that\n * are nearly equal.\n *\n * @arg float The argument to process\n *\n * @return float 'e' to the power of arg minus one\n */",
"log10", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.log10.php )\n *\n * Returns the base-10 logarithm of arg.\n *\n * @arg float The argument to process\n *\n * @return float The base-10 logarithm of arg\n */",
"log1p", T(Double), S(0), "number", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.log1p.php )\n *\n * log1p() returns log(1 + number) computed in a way that is accurate even\n * when the value of number is close to zero. log() might only return\n * log(1) in this case due to lack of precision.\n *\n * @number float The argument to process\n *\n * @return float log(1 + number)\n */",
"log", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), "base", T(Double), "i:0;", S(4), "0", S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.log.php )\n *\n * If the optional base parameter is specified, log() returns logbase arg,\n * otherwise log() returns the natural logarithm of arg.\n *\n * @arg float The value to calculate the logarithm for\n * @base float The optional logarithmic base to use (defaults to\n * 'e' and so to the natural logarithm).\n *\n * @return float The logarithm of arg to base, if given, or the\n * natural logarithm.\n */",
"cos", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.cos.php )\n *\n * cos() returns the cosine of the arg parameter. The arg parameter is in\n * radians.\n *\n * @arg float An angle in radians\n *\n * @return float The cosine of arg\n */",
"cosh", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.cosh.php )\n *\n * Returns the hyperbolic cosine of arg, defined as (exp(arg) +\n * exp(-arg))/2.\n *\n * @arg float The argument to process\n *\n * @return float The hyperbolic cosine of arg\n */",
"sin", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.sin.php )\n *\n * sin() returns the sine of the arg parameter. The arg parameter is in\n * radians.\n *\n * @arg float A value in radians\n *\n * @return float The sine of arg\n */",
"sinh", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.sinh.php )\n *\n * Returns the hyperbolic sine of arg, defined as (exp(arg) -\n * exp(-arg))/2.\n *\n * @arg float The argument to process\n *\n * @return float The hyperbolic sine of arg\n */",
"tan", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.tan.php )\n *\n * tan() returns the tangent of the arg parameter. The arg parameter is in\n * radians.\n *\n * @arg float The argument to process in radians\n *\n * @return float The tangent of arg\n */",
"tanh", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.tanh.php )\n *\n * Returns the hyperbolic tangent of arg, defined as sinh(arg)/cosh(arg).\n *\n * @arg float The argument to process\n *\n * @return float The hyperbolic tangent of arg\n */",
"acos", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.acos.php )\n *\n * Returns the arc cosine of arg in radians. acos() is the complementary\n * function of cos(), which means that a==cos(acos(a)) for every value of a\n * that is within acos()' range.\n *\n * @arg float The argument to process\n *\n * @return float The arc cosine of arg in radians.\n */",
"acosh", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.acosh.php )\n *\n * Returns the inverse hyperbolic cosine of arg, i.e. the value whose\n * hyperbolic cosine is arg.\n *\n * @arg float The value to process\n *\n * @return float The inverse hyperbolic cosine of arg\n */",
"asin", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.asin.php )\n *\n * Returns the arc sine of arg in radians. asin() is the complementary\n * function of sin(), which means that a==sin(asin(a)) for every value of a\n * that is within asin()'s range.\n *\n * @arg float The argument to process\n *\n * @return float The arc sine of arg in radians\n */",
"asinh", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.asinh.php )\n *\n * Returns the inverse hyperbolic sine of arg, i.e. the value whose\n * hyperbolic sine is arg.\n *\n * @arg float The argument to process\n *\n * @return float The inverse hyperbolic sine of arg\n */",
"atan", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.atan.php )\n *\n * Returns the arc tangent of arg in radians. atan() is the complementary\n * function of tan(), which means that a==tan(atan(a)) for every value of a\n * that is within atan()'s range.\n *\n * @arg float The argument to process\n *\n * @return float The arc tangent of arg in radians.\n */",
"atanh", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.atanh.php )\n *\n * Returns the inverse hyperbolic tangent of arg, i.e. the value whose\n * hyperbolic tangent is arg.\n *\n * @arg float The argument to process\n *\n * @return float Inverse hyperbolic tangent of arg\n */",
"atan2", T(Double), S(0), "y", T(Double), NULL, S(0), NULL, S(0), "x", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.atan2.php )\n *\n *\n * @y float Dividend parameter\n * @x float Divisor parameter\n *\n * @return float The arc tangent of y/x in radians.\n */",
"hypot", T(Double), S(0), "x", T(Double), NULL, S(0), NULL, S(0), "y", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.hypot.php )\n *\n * hypot() returns the length of the hypotenuse of a right-angle triangle\n * with sides of length x and y, or the distance of the point (x, y) from\n * the origin. This is equivalent to sqrt(x*x + y*y).\n *\n * @x float Length of first side\n * @y float Length of second side\n *\n * @return float Calculated length of the hypotenuse\n */",
"fmod", T(Double), S(0), "x", T(Double), NULL, S(0), NULL, S(0), "y", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.fmod.php )\n *\n * Returns the floating point remainder of dividing the dividend (x) by\n * the divisor (y). The reminder (r) is defined as: x = i * y + r, for some\n * integer i. If y is non-zero, r has the same sign as x and a magnitude\n * less than the magnitude of y.\n *\n * @x float The dividend\n * @y float The divisor\n *\n * @return float The floating point remainder of x/y\n */",
"sqrt", T(Double), S(0), "arg", T(Double), NULL, S(0), NULL, S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.sqrt.php )\n *\n * Returns the square root of arg.\n *\n * @arg float The argument to process\n *\n * @return float The square root of arg or the special value NAN for\n * negative numbers.\n */",
"getrandmax", T(Int64), S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.getrandmax.php )\n *\n *\n * @return int The largest possible random value returned by rand()\n */",
"srand", T(Void), S(0), "seed", T(Variant), "N;", S(2), "null", S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.srand.php )\n *\n * Seeds the random number generator with seed or with a random value if\n * no seed is given. As of PHP 4.2.0, there is no need to seed the random\n * number generator with srand() or mt_srand() as this is now done\n * automatically.\n *\n * @seed mixed Optional seed value\n *\n * @return mixed No value is returned.\n */",
"rand", T(Int64), S(0), "min", T(Int64), "i:0;", S(4), "0", S(0), "max", T(Int64), "i:2147483647;", S(13), "RAND_MAX", S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.rand.php )\n *\n *\n * @min int The lowest value to return (default: 0)\n * @max int The highest value to return (default: getrandmax())\n *\n * @return int A pseudo random value between min (or 0) and max (or\n * getrandmax(), inclusive).\n */",
"mt_getrandmax", T(Int64), S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.mt-getrandmax.php )\n *\n *\n * @return int Returns the maximum random value returned by\n * mt_rand()\n */",
"mt_srand", T(Void), S(0), "seed", T(Variant), "N;", S(2), "null", S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.mt-srand.php )\n *\n * Seeds the random number generator with seed or with a random value if\n * no seed is given. As of PHP 4.2.0, there is no need to seed the random\n * number generator with srand() or mt_srand() as this is now done\n * automatically.\n *\n * @seed mixed An optional seed value\n *\n * @return mixed No value is returned.\n */",
"mt_rand", T(Int64), S(0), "min", T(Int64), "i:0;", S(4), "0", S(0), "max", T(Int64), "i:2147483647;", S(13), "RAND_MAX", S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.mt-rand.php )\n *\n *\n * @min int Optional lowest value to be returned (default: 0)\n * @max int Optional highest value to be returned (default:\n * mt_getrandmax())\n *\n * @return int A random integer value between min (or 0) and max\n * (or mt_getrandmax(), inclusive)\n */",
"lcg_value", T(Double), S(0), NULL, S(16384), "/**\n * ( excerpt from http://php.net/manual/en/function.lcg-value.php )\n *\n * lcg_value() returns a pseudo random number in the range of (0, 1). The\n * function combines two CGs with periods of 2^31 - 85 and 2^31 - 249. The\n * period of this function is equal to the product of both primes.\n *\n * @return float A pseudo random float value in the range of (0, 1)\n */",
#elif EXT_TYPE == 1
"PHP_ROUND_HALF_UP", T(Int64),
"PHP_ROUND_HALF_DOWN", T(Int64),
"PHP_ROUND_HALF_EVEN", T(Int64),
"PHP_ROUND_HALF_ODD", T(Int64),
#elif EXT_TYPE == 2
#endif