From 4af8e58936001a8f0ae0d2afef9c8225c0d43c14 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Sat, 31 Mar 2007 19:18:23 +0000 Subject: [PATCH] conversion to new format finished git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@233023 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/math/functions/abs.xml | 14 +-- reference/math/functions/acos.xml | 4 +- reference/math/functions/asin.xml | 4 +- reference/math/functions/asinh.xml | 25 ++-- reference/math/functions/atan.xml | 25 ++-- reference/math/functions/atan2.xml | 28 ++--- reference/math/functions/atanh.xml | 19 ++- reference/math/functions/base-convert.xml | 92 ++++++++------ reference/math/functions/bindec.xml | 94 ++++++++------ reference/math/functions/ceil.xml | 22 ++-- reference/math/functions/cos.xml | 65 +++++----- reference/math/functions/cosh.xml | 26 ++-- reference/math/functions/decbin.xml | 64 +++++----- reference/math/functions/dechex.xml | 64 +++++----- reference/math/functions/decoct.xml | 64 +++++----- reference/math/functions/deg2rad.xml | 58 ++++----- reference/math/functions/exp.xml | 61 ++++----- reference/math/functions/expm1.xml | 29 ++--- reference/math/functions/floor.xml | 62 +++++----- reference/math/functions/fmod.xml | 70 +++++------ reference/math/functions/getrandmax.xml | 33 +---- reference/math/functions/hexdec.xml | 97 +++++++++------ reference/math/functions/hypot.xml | 30 ++--- reference/math/functions/is-finite.xml | 27 ++-- reference/math/functions/is-infinite.xml | 21 +--- reference/math/functions/is-nan.xml | 24 ++-- reference/math/functions/lcg-value.xml | 28 +---- reference/math/functions/log.xml | 65 ++++++---- reference/math/functions/log10.xml | 16 +-- reference/math/functions/log1p.xml | 22 ++-- reference/math/functions/mt-getrandmax.xml | 35 +----- reference/math/functions/mt-rand.xml | 112 ++++++++++------- reference/math/functions/mt-srand.xml | 92 ++++++++------ reference/math/functions/octdec.xml | 94 ++++++++------ reference/math/functions/pi.xml | 46 ++----- reference/math/functions/pow.xml | 137 +++++++++++++-------- reference/math/functions/rad2deg.xml | 58 ++++----- reference/math/functions/rand.xml | 132 +++++++++++--------- reference/math/functions/round.xml | 63 +++++----- reference/math/functions/sin.xml | 66 +++++----- reference/math/functions/sinh.xml | 26 ++-- reference/math/functions/sqrt.xml | 58 ++++----- reference/math/functions/srand.xml | 70 +++++------ reference/math/functions/tan.xml | 40 ++++-- reference/math/functions/tanh.xml | 26 ++-- 45 files changed, 1103 insertions(+), 1205 deletions(-) diff --git a/reference/math/functions/abs.xml b/reference/math/functions/abs.xml index ded03a598a..c940580a12 100644 --- a/reference/math/functions/abs.xml +++ b/reference/math/functions/abs.xml @@ -1,5 +1,5 @@ - + abs @@ -12,11 +12,7 @@ mixednumber - Returns the absolute value of number. If the - argument number is - of type float, the return type is also float, - otherwise it is integer (as float usually has a - bigger value range than integer). + Returns the absolute value of number. @@ -37,7 +33,11 @@ &reftitle.returnvalues; - The absoulte value of number + The absoulte value of number. If the + argument number is + of type float, the return type is also float, + otherwise it is integer (as float usually has a + bigger value range than integer). diff --git a/reference/math/functions/acos.xml b/reference/math/functions/acos.xml index 93248709b1..92954e9a02 100644 --- a/reference/math/functions/acos.xml +++ b/reference/math/functions/acos.xml @@ -1,5 +1,5 @@ - + acos @@ -37,7 +37,7 @@ &reftitle.returnvalues; - The arc consine of arg + The arc consine of arg in radians. diff --git a/reference/math/functions/asin.xml b/reference/math/functions/asin.xml index 4583282687..853093df4e 100644 --- a/reference/math/functions/asin.xml +++ b/reference/math/functions/asin.xml @@ -1,5 +1,5 @@ - + asin @@ -37,7 +37,7 @@ &reftitle.returnvalues; - The arc sine of arg + The arc sine of arg in radians diff --git a/reference/math/functions/asinh.xml b/reference/math/functions/asinh.xml index 309f135606..b78830a552 100644 --- a/reference/math/functions/asinh.xml +++ b/reference/math/functions/asinh.xml @@ -1,5 +1,5 @@ - + asinh @@ -17,22 +17,16 @@ hyperbolic sine is arg. ¬e.no-windows; - - See also: - asin, - acosh, and - atanh. - &reftitle.parameters; - + arg - + The argument to process @@ -42,20 +36,17 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The inverse hyperbolic sine of arg &reftitle.seealso; - + sinh + asin + acosh + atanh diff --git a/reference/math/functions/atan.xml b/reference/math/functions/atan.xml index 399bb980e0..88208ef13c 100644 --- a/reference/math/functions/atan.xml +++ b/reference/math/functions/atan.xml @@ -1,5 +1,5 @@ - + atan @@ -18,22 +18,16 @@ a==tan(atan(a)) for every value of a that is within atan's range. - - See also: - atanh, - asin, and - acos. - &reftitle.parameters; - + arg - + The argument to process @@ -43,20 +37,17 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The arc tangent of arg in radians. &reftitle.seealso; - + tan + atanh + asin + acos diff --git a/reference/math/functions/atan2.xml b/reference/math/functions/atan2.xml index 78544109ae..b4d0b187a7 100644 --- a/reference/math/functions/atan2.xml +++ b/reference/math/functions/atan2.xml @@ -1,5 +1,5 @@ - + atan2 @@ -24,19 +24,24 @@ The function returns the result in radians, which is between -PI and PI (inclusive). - - See also acos and atan. - &reftitle.parameters; - + x - + Dividend parameter + + + + + y + + + Divisor parameter @@ -46,20 +51,15 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The arg tangent of x/y + in radians. &reftitle.seealso; - + atan diff --git a/reference/math/functions/atanh.xml b/reference/math/functions/atanh.xml index 0d06759740..683f8e21a3 100644 --- a/reference/math/functions/atanh.xml +++ b/reference/math/functions/atanh.xml @@ -1,5 +1,5 @@ - + atanh @@ -29,10 +29,10 @@ - + arg - + The argument to process @@ -42,20 +42,17 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + Inverse hyperbolic tangent of arg &reftitle.seealso; - + tanh + atan + asinh + acosh diff --git a/reference/math/functions/base-convert.xml b/reference/math/functions/base-convert.xml index 15f9f75016..01fd1b1ac8 100644 --- a/reference/math/functions/base-convert.xml +++ b/reference/math/functions/base-convert.xml @@ -1,5 +1,5 @@ - + base_convert @@ -22,6 +22,56 @@ have to be between 2 and 36, inclusive. Digits in numbers with a base higher than 10 will be represented with the letters a-z, with a meaning 10, b meaning 11 and z meaning 35. + + + + base_convert may lose precision on large numbers + due to properties related to the internal "double" or "float" type used. + Please see the Floating point numbers + section in the manual for more specific information and limitations. + + + + + &reftitle.parameters; + + + + number + + + The number to convert + + + + + frombase + + + The base number is in + + + + + tobase + + + The base to convert number to + + + + + + + + &reftitle.returnvalues; + + number converted to base tobase + + + + &reftitle.examples; + <function>base_convert</function> example @@ -42,50 +92,12 @@ echo base_convert($hexadecimal, 16, 2); - - - base_convert may lose precision on large numbers - due to properties related to the internal "double" or "float" type used. - Please see the Floating point numbers - section in the manual for more specific information and limitations. - - - - See also: intval. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + intval diff --git a/reference/math/functions/bindec.xml b/reference/math/functions/bindec.xml index 741ed047b4..3b471e419a 100644 --- a/reference/math/functions/bindec.xml +++ b/reference/math/functions/bindec.xml @@ -1,5 +1,5 @@ - + bindec @@ -17,11 +17,57 @@ bindec converts a binary number to an - integer. The largest number that can be converted is - 31 bits of 1's or 2147483647 in decimal. - As of PHP 4.1.0, this function can also convert larger numbers. It returns - float in that case. + integer or, if needed for size reasons, float. + + + &reftitle.parameters; + + + + binary_string + + + The binary string to convert + + + + + + + + &reftitle.returnvalues; + + The decimal value of binary_string + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 4.1.0 + + The function can now convert numbers that are too large to + fit into the platforms integer type, larger values + are returned as float in that case. + + + + + + + + + &reftitle.examples; <function>bindec</function> example @@ -45,45 +91,15 @@ echo bindec('111'); - - See also decbin, - octdec, - hexdec and - base_convert. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + decbin + octdec + hexdec + base_convert diff --git a/reference/math/functions/ceil.xml b/reference/math/functions/ceil.xml index 04856ac6f8..e94db512d5 100644 --- a/reference/math/functions/ceil.xml +++ b/reference/math/functions/ceil.xml @@ -1,5 +1,5 @@ - + ceil @@ -14,9 +14,6 @@ Returns the next highest integer value by rounding up value if necessary. - The return value of ceil is still of type - float as the value range of float is - usually bigger than that of integer. @@ -32,20 +29,16 @@ echo ceil(-3.14); // -3 - - See also floor and - round. - &reftitle.parameters; - + value - + The value to round @@ -55,7 +48,11 @@ echo ceil(-3.14); // -3 &reftitle.returnvalues; - + value rounded up to the next highest + integer. + The return value of ceil is still of type + float as the value range of float is + usually bigger than that of integer. @@ -68,7 +65,8 @@ echo ceil(-3.14); // -3 &reftitle.seealso; - + floor + round diff --git a/reference/math/functions/cos.xml b/reference/math/functions/cos.xml index 9d37b313ea..558709e8a7 100644 --- a/reference/math/functions/cos.xml +++ b/reference/math/functions/cos.xml @@ -1,5 +1,5 @@ - + cos @@ -15,6 +15,30 @@ cos returns the cosine of the arg parameter. The arg parameter is in radians. + + + &reftitle.parameters; + + + + arg + + + An angle in radians + + + + + + + + &reftitle.returnvalues; + + The cosine of arg + + + + &reftitle.examples; <function>cos</function> example @@ -29,46 +53,15 @@ echo cos(M_PI); // -1 - - See also: - acos, - sin, - tan, and - deg2rad. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + acos + sin + tan + deg2rad diff --git a/reference/math/functions/cosh.xml b/reference/math/functions/cosh.xml index 1041fb3451..a31f1b57c4 100644 --- a/reference/math/functions/cosh.xml +++ b/reference/math/functions/cosh.xml @@ -1,5 +1,5 @@ - + cosh @@ -15,23 +15,16 @@ Returns the hyperbolic cosine of arg, defined as (exp(arg) + exp(-arg))/2. - - See also: - cos, - acosh, - sin, and - tan. - &reftitle.parameters; - + arg - + The argument to process @@ -41,20 +34,17 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The hyperbolic cosine of arg &reftitle.seealso; - + cos + acosh + sinh + cosh diff --git a/reference/math/functions/decbin.xml b/reference/math/functions/decbin.xml index ae3b0d0718..aee6623916 100644 --- a/reference/math/functions/decbin.xml +++ b/reference/math/functions/decbin.xml @@ -1,5 +1,5 @@ - + decbin @@ -16,6 +16,30 @@ number argument. The largest number that can be converted is 4294967295 in decimal resulting to a string of 32 1's. + + + &reftitle.parameters; + + + + number + + + Decimal value to convert + + + + + + + + &reftitle.returnvalues; + + Binary string representation of number + + + + &reftitle.examples; <function>decbin</function> example @@ -36,45 +60,15 @@ echo decbin(26); - - See also bindec, - decoct, - dechex and - base_convert. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + bindec + decoct + dechex + base_convert diff --git a/reference/math/functions/dechex.xml b/reference/math/functions/dechex.xml index d05ef91e87..7e297a081f 100644 --- a/reference/math/functions/dechex.xml +++ b/reference/math/functions/dechex.xml @@ -1,5 +1,5 @@ - + dechex @@ -16,6 +16,30 @@ given number argument. The largest number that can be converted is 4294967295 in decimal resulting to "ffffffff". + + + &reftitle.parameters; + + + + number + + + Decimal value to convert + + + + + + + + &reftitle.returnvalues; + + Hexadecimal string representation of number + + + + &reftitle.examples; <function>dechex</function> example @@ -36,45 +60,15 @@ a - - See also hexdec, - decbin, - decoct and - base_convert. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + hexdec + decbin + decoct + base_convert diff --git a/reference/math/functions/decoct.xml b/reference/math/functions/decoct.xml index 128624dbcf..341fca856c 100644 --- a/reference/math/functions/decoct.xml +++ b/reference/math/functions/decoct.xml @@ -1,5 +1,5 @@ - + decoct @@ -16,6 +16,30 @@ number argument. The largest number that can be converted is 4294967295 in decimal resulting to "37777777777". + + + &reftitle.parameters; + + + + + + + Decimal value to convert + + + + + + + + &reftitle.returnvalues; + + Octal string representation of number + + + + &reftitle.examples; <function>decoct</function> example @@ -36,45 +60,15 @@ echo decoct(264); - - See also octdec, - decbin, - dechex and - base_convert. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + octdec + decbin + dechex + base_convert diff --git a/reference/math/functions/deg2rad.xml b/reference/math/functions/deg2rad.xml index 957ab773da..41b82d1867 100644 --- a/reference/math/functions/deg2rad.xml +++ b/reference/math/functions/deg2rad.xml @@ -1,5 +1,5 @@ - + deg2rad @@ -17,6 +17,30 @@ This function converts number from degrees to the radian equivalent. + + + &reftitle.parameters; + + + + number + + + Angular value in degrees + + + + + + + + &reftitle.returnvalues; + + The radian equivalent of number + + + + &reftitle.examples; <function>deg2rad</function> example @@ -32,42 +56,12 @@ var_dump(deg2rad(45) === M_PI_4); // bool(true) - - See also rad2deg. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + rad2deg diff --git a/reference/math/functions/exp.xml b/reference/math/functions/exp.xml index 8796b03ee8..2bcd20f14f 100644 --- a/reference/math/functions/exp.xml +++ b/reference/math/functions/exp.xml @@ -1,5 +1,5 @@ - + exp @@ -20,6 +20,30 @@ 2.718282. + + + &reftitle.parameters; + + + + arg + + + The argument to process + + + + + + + + &reftitle.returnvalues; + + 'e' raised to the power of arg + + + + &reftitle.examples; <function>exp</function> example @@ -40,44 +64,13 @@ echo exp(5.7); - - See also - log and - pow. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + log + pow diff --git a/reference/math/functions/expm1.xml b/reference/math/functions/expm1.xml index 589a2b7a8e..d1a86e2e9d 100644 --- a/reference/math/functions/expm1.xml +++ b/reference/math/functions/expm1.xml @@ -1,5 +1,5 @@ - + expm1 @@ -12,31 +12,27 @@ &reftitle.description; floatexpm1 - floatnumber + floatarg &warn.experimental.func; expm1 returns the equivalent to - 'exp(number) - 1' computed in a way that is - accurate even if the value of number is near zero, - a case where 'exp (number) - 1' would be + 'exp(arg) - 1' computed in a way that is + accurate even if the value of arg is near zero, + a case where 'exp (arg) - 1' would be inaccurate due to subtraction of two numbers that are nearly equal. ¬e.no-windows; - - See also log1p and - exp. - &reftitle.parameters; - + arg - + The argument to process @@ -46,20 +42,15 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + 'e' to the power of arg minus one &reftitle.seealso; - + log1p + exp diff --git a/reference/math/functions/floor.xml b/reference/math/functions/floor.xml index 807a92c736..7e0753fcf7 100644 --- a/reference/math/functions/floor.xml +++ b/reference/math/functions/floor.xml @@ -1,5 +1,5 @@ - + floor @@ -14,10 +14,34 @@ Returns the next lowest integer value by rounding down value if necessary. + + + + &reftitle.parameters; + + + + number + + + The numeric value to round + + + + + + + + &reftitle.returnvalues; + + arg rounded to the next lowest integer. The return value of floor is still of type float because the value range of float is usually bigger than that of integer. - + + + + &reftitle.examples; <function>floor</function> example @@ -32,43 +56,13 @@ echo floor(-3.14); // -4 - - See also ceil and - round. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + ceil + round diff --git a/reference/math/functions/fmod.xml b/reference/math/functions/fmod.xml index c394b19468..dbacd80c9a 100644 --- a/reference/math/functions/fmod.xml +++ b/reference/math/functions/fmod.xml @@ -1,5 +1,5 @@ - + fmod @@ -22,6 +22,39 @@ x and a magnitude less than the magnitude of y. + + + &reftitle.parameters; + + + + x + + + The dividend + + + + + y + + + The divisor + + + + + + + + &reftitle.returnvalues; + + The floating point remainder of + x/y + + + + &reftitle.examples; Using <function>fmod</function> @@ -38,41 +71,6 @@ $r = fmod($x, $y); - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - - - - &reftitle.seealso; - - - - - - + getrandmax @@ -15,43 +15,20 @@ Returns the maximum value that can be returned by a call to rand. - - See also rand, srand - and mt_getrandmax. - - - - &reftitle.parameters; - - - - - - - - - - - - &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The largest possible random value returned by rand &reftitle.seealso; - + rand + srand + mt_getrandmax diff --git a/reference/math/functions/hexdec.xml b/reference/math/functions/hexdec.xml index 03bfed6c27..8ba6c8ca19 100644 --- a/reference/math/functions/hexdec.xml +++ b/reference/math/functions/hexdec.xml @@ -1,5 +1,5 @@ - + hexdec @@ -15,14 +15,62 @@ Returns the decimal equivalent of the hexadecimal number represented by the hex_string argument. hexdec converts a hexadecimal string to a - decimal number. The largest number that can be converted is - 7fffffff or 2147483647 in decimal. - As of PHP 4.1.0, this function can also convert larger numbers. It returns - float in that case. + decimal number. hexdec will ignore any non-hexadecimal characters it encounters. + + + + &reftitle.parameters; + + + + hex_string + + + The hexadezimal string to convert + + + + + + + + &reftitle.returnvalues; + + The decimal representation of hex_string + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 4.1.0 + + The function can now convert values that are to big for + the platforms integer type, it will return + the value as float instead in that case. + + + + + + + + + &reftitle.examples; + <function>hexdec</function> example @@ -39,50 +87,19 @@ var_dump(hexdec("a0")); // print "int(160)" - - See also dechex, - bindec, - octdec and - base_convert. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + dechex + bindec + octdec + base_convert - + hypot @@ -27,10 +27,18 @@ - + x - + Length of first side + + + + + y + + + Length of second side @@ -40,21 +48,7 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - - - - - &reftitle.seealso; - - - - + Calculated length of the hyptenuse diff --git a/reference/math/functions/is-finite.xml b/reference/math/functions/is-finite.xml index 639e26b911..014b632cec 100644 --- a/reference/math/functions/is-finite.xml +++ b/reference/math/functions/is-finite.xml @@ -1,5 +1,5 @@ - + is_finite @@ -12,12 +12,8 @@ floatval - Returns &true; if val is a legal finite - number within the allowed range for a PHP float on this platform. - - - See also is_infinite and - is_nan. + Checks whether val is a lecal finite + on this platform. @@ -25,10 +21,10 @@ - + val - + The value to check @@ -38,20 +34,17 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + &true; if val is a legal finite + number within the allowed range for a PHP float on this platform, + else &false;. &reftitle.seealso; - + is_infinite + is_nan diff --git a/reference/math/functions/is-infinite.xml b/reference/math/functions/is-infinite.xml index 8f11442e6f..5a0293db10 100644 --- a/reference/math/functions/is-infinite.xml +++ b/reference/math/functions/is-infinite.xml @@ -1,5 +1,5 @@ - + is_infinite @@ -16,20 +16,16 @@ negative), like the result of log(0) or any value too big to fit into a float on this platform. - - See also is_finite and - is_nan. - &reftitle.parameters; - + val - + The value to check @@ -39,20 +35,15 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + &true; if val is infinite, else &false;. &reftitle.seealso; - + is_finite + is_nan diff --git a/reference/math/functions/is-nan.xml b/reference/math/functions/is-nan.xml index 1cefd370bd..f434c5fff9 100644 --- a/reference/math/functions/is-nan.xml +++ b/reference/math/functions/is-nan.xml @@ -1,5 +1,5 @@ - + is_nan @@ -12,23 +12,19 @@ floatval - Returns &true; if val is 'not a number', + Checks whether val is 'not a number', like the result of acos(1.01). - - See also is_finite and - is_infinite. - &reftitle.parameters; - + val - + The value to check @@ -38,20 +34,16 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + Returns &true; if val is 'not a number', + else &false;. &reftitle.seealso; - + is_finite + is_infinite diff --git a/reference/math/functions/lcg-value.xml b/reference/math/functions/lcg-value.xml index 14b4ba83c1..b671bdd9de 100644 --- a/reference/math/functions/lcg-value.xml +++ b/reference/math/functions/lcg-value.xml @@ -1,5 +1,5 @@ - + lcg_value @@ -18,38 +18,18 @@ to the product of both primes. - - &reftitle.parameters; - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - &reftitle.examples; - - + A pseudo random float value in the range of (0, 1) &reftitle.seealso; - + rand + mt_rand diff --git a/reference/math/functions/log.xml b/reference/math/functions/log.xml index a5378327b4..1daceef58a 100644 --- a/reference/math/functions/log.xml +++ b/reference/math/functions/log.xml @@ -1,5 +1,5 @@ - + log @@ -18,31 +18,25 @@ arg, otherwise log returns the natural logarithm of arg. - - - The base parameter became available - with PHP 4.3.0. - - - As always you can calculate the logarithm in base b - of a number n, but using the mathematical identity: - logb(n) = log(n)/log(b), where log is the - neperian (or natural) logarithm. - - - - See also exp. - &reftitle.parameters; - + arg - + The value to calculate the logarithm for + + + + + base + + + The optinal logarithmic base to use + (defaults to 'e' and so to the natural logarithm). @@ -52,20 +46,45 @@ &reftitle.returnvalues; - + The logarithm of arg to + base, if given, or the + natural logarithm. - - &reftitle.examples; + + &reftitle.changelog; - + + + + + &Version; + &Description; + + + + + Since 4.3.0 + + The optinal parameter base became available. + For older versions you can calculate the logarithm in base b + of a number n, but using the mathematical identity: + logb(n) = log(n)/log(b), where log is the + neperian (or natural) logarithm. + + + + + &reftitle.seealso; - + log10 + exp + pow diff --git a/reference/math/functions/log10.xml b/reference/math/functions/log10.xml index f6efcdf6c0..f48a3ac95d 100644 --- a/reference/math/functions/log10.xml +++ b/reference/math/functions/log10.xml @@ -1,5 +1,5 @@ - + log10 @@ -24,10 +24,10 @@ - + arg - + The argument to process @@ -37,20 +37,14 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The base-10 logaritm of arg &reftitle.seealso; - + log diff --git a/reference/math/functions/log1p.xml b/reference/math/functions/log1p.xml index 17557d0576..e90d018c1a 100644 --- a/reference/math/functions/log1p.xml +++ b/reference/math/functions/log1p.xml @@ -1,5 +1,5 @@ - + log1p @@ -21,20 +21,16 @@ when the value of number is close to zero. ¬e.no-windows; - - See also expm1 and - log. - &reftitle.parameters; - + number - + The argument to process @@ -44,20 +40,16 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + log(1 + number) &reftitle.seealso; - + expm1 + log + log10 diff --git a/reference/math/functions/mt-getrandmax.xml b/reference/math/functions/mt-getrandmax.xml index 64da484ea2..e842cc4c9d 100644 --- a/reference/math/functions/mt-getrandmax.xml +++ b/reference/math/functions/mt-getrandmax.xml @@ -1,5 +1,5 @@ - + mt_getrandmax @@ -15,45 +15,20 @@ Returns the maximum value that can be returned by a call to mt_rand. - - See also: - mt_rand, - mt_srand, and - getrandmax. - - - - &reftitle.parameters; - - - - - - - - - - - - &reftitle.returnvalues; - - - - - &reftitle.examples; - - + Returns the maximum random value returned by mt_rand &reftitle.seealso; - + mt_rand + mt_srand + getrandmax diff --git a/reference/math/functions/mt-rand.xml b/reference/math/functions/mt-rand.xml index 9589d8dd46..0bf03e7270 100644 --- a/reference/math/functions/mt-rand.xml +++ b/reference/math/functions/mt-rand.xml @@ -1,5 +1,5 @@ - + mt_rand @@ -30,6 +30,68 @@ between 5 and 15 (inclusive), for example, use mt_rand (5, 15). + ¬e.randomseed; + + + + &reftitle.parameters; + + + + min + + + Optional lowest value to be returned (default: 0) + + + + + man + + + Optional highest value to be returned (default: RAND_MAX) + + + + + + + + &reftitle.returnvalues; + + A random integer value between min (or 0) + and max (or RAND_MAX, inclusive) + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 3.0.7 + + In versions before 3.0.7 the meaning of + max was range. To + get the same results in these versions the short example should + be rand (5, 11) to get a random number + between 5 and 15. + + + + + + + + + &reftitle.examples; <function>mt_rand</function> example @@ -53,56 +115,14 @@ echo mt_rand(5, 15); - ¬e.randomseed; - - - - In versions before 3.0.7 the meaning of - max was range. To - get the same results in these versions the short example should - be mt_rand (5, 11) to get a random number - between 5 and 15. - - - - See also: - mt_srand, - mt_getrandmax, and - rand. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + mt_srand + mt_getrandmax + rand diff --git a/reference/math/functions/mt-srand.xml b/reference/math/functions/mt-srand.xml index cd8bfee77a..81dbdf0008 100644 --- a/reference/math/functions/mt-srand.xml +++ b/reference/math/functions/mt-srand.xml @@ -1,5 +1,5 @@ - + mt_srand @@ -13,10 +13,54 @@ Seeds the random number generator with - seed. - Since PHP 4.2.0, the seed - becomes optional and defaults to a random value if omitted. + seed or with a random value + if no seed is given. + + ¬e.randomseed; + + + + &reftitle.parameters; + + + + seed + + + An optional seed value + + + + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 4.2.0 + + The seed becomes optional + and defaults to a random value if omitted. + + + + + + + + + &reftitle.examples; <function>mt_srand</function> example @@ -36,48 +80,14 @@ $randval = mt_rand(); - - ¬e.randomseed; - - - See also: - mt_rand, - mt_getrandmax, and - srand. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + mt_rand + mt_getrandmax + srand diff --git a/reference/math/functions/octdec.xml b/reference/math/functions/octdec.xml index 978a2127a7..ab2e754ca8 100644 --- a/reference/math/functions/octdec.xml +++ b/reference/math/functions/octdec.xml @@ -1,5 +1,5 @@ - + octdec @@ -14,11 +14,56 @@ Returns the decimal equivalent of the octal number represented by the octal_string argument. - The largest number that can be converted is 17777777777 or 2147483647 in - decimal. - As of PHP 4.1.0, this function can also convert larger numbers. It returns - float in that case. + + + &reftitle.parameters; + + + + octal_string + + + The octal string to convert + + + + + + + + &reftitle.returnvalues; + + The decimal representation of octal_string + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 4.1.0 + + The function can now convert numbers that are too large to + fit into the platforms integer type, larger values + are returned as float in that case. + + + + + + + + + &reftitle.examples; <function>octdec</function> example @@ -39,46 +84,15 @@ echo octdec(decoct(45)); - - See also: - decoct, - bindec, - hexdec, and - base_convert. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + decoct + bindec + hexdec + base_convert diff --git a/reference/math/functions/pi.xml b/reference/math/functions/pi.xml index cf22615e9a..2928648eda 100644 --- a/reference/math/functions/pi.xml +++ b/reference/math/functions/pi.xml @@ -1,5 +1,5 @@ - + pi @@ -19,6 +19,15 @@ Also, you can use the M_PI constant which yields identical results to pi. + + + &reftitle.returnvalues; + + The value of pi as float. + + + + &reftitle.examples; <function>pi</function> example @@ -33,41 +42,6 @@ echo M_PI; // 3.1415926535898 - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - - - - &reftitle.seealso; - - - - - - + pow @@ -14,22 +14,89 @@ Returns base raised to the power of - exp. If possible, this function will - return an integer. - - - If the power cannot be computed, a warning will be issued, - and pow will return &false;. Since PHP 4.2.0 - pow doesn't issue any warning. + exp. PHP cannot handle negative exps. - - Some examples of <function>pow</function> - + + + In PHP 4.0.6 and earlier pow always returned + a float, and did not issue warnings. + + + + + &reftitle.parameters; + + + + base + + + The base to use + + + + + exp + + + The exponent + + + + + + + + &reftitle.returnvalues; + + base raised to the power of exp. + If the result can be represented as integer it will be returned as type + integer, else it will be returned as type float. + If the power cannot be computed &false; will be returned instead. + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 4.0.6 + + The function will now return integer results if possible, + before this it always returned a float result. + + + + Since 4.2.0 + + PHP stops to emit a warning if the value can't be computed, + it will now silently return &false; only. + + + + + + + + + &reftitle.examples; + + + Some examples of <function>pow</function> + ]]> - - - - - In PHP 4.0.6 and earlier pow always returned - a float, and did not issue warnings. - - - - See also: - exp, - sqrt, - bcpow, and - gmp_pow, - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - + + &reftitle.seealso; - + exp + sqrt + bcpow + gmp_pow diff --git a/reference/math/functions/rad2deg.xml b/reference/math/functions/rad2deg.xml index a8a07bafcb..e8fbd2523d 100644 --- a/reference/math/functions/rad2deg.xml +++ b/reference/math/functions/rad2deg.xml @@ -1,5 +1,5 @@ - + rad2deg @@ -17,6 +17,30 @@ This function converts number from radian to degrees. + + + &reftitle.parameters; + + + + number + + + A radian value + + + + + + + + &reftitle.returnvalues; + + The equivalent of number in degrees + + + + &reftitle.examples; <function>rad2deg</function> example @@ -31,42 +55,12 @@ echo rad2deg(M_PI_4); // 45 - - See also deg2rad. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + deg2rad diff --git a/reference/math/functions/rand.xml b/reference/math/functions/rand.xml index 579a2e2eb1..d250692a86 100644 --- a/reference/math/functions/rand.xml +++ b/reference/math/functions/rand.xml @@ -1,5 +1,5 @@ - + rand @@ -20,6 +20,78 @@ between 5 and 15 (inclusive), for example, use rand (5, 15). + + + On some platforms (such as Windows) RAND_MAX + is only 32768. If you require a range larger than 32768, specifying + min and max will allow + you to create a range larger than RAND_MAX, or consider using + mt_rand instead. + + + + ¬e.randomseed; + + + + &reftitle.parameters; + + + + min + + + The lowest value to return (default: 0) + + + + + max + + + The highest value to return (default: RAND_MAX) + + + + + + + + &reftitle.returnvalues; + + A pseudo random value between min + (or 0) and max (or RAND_MAX, inclusive). + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + Since 3.0.7 + + In versions before 3.0.7 the meaning of + max was range. To + get the same results in these versions the short example should + be rand (5, 11) to get a random number + between 5 and 15. + + + + + + + + + &reftitle.examples; <function>rand</function> example @@ -43,66 +115,14 @@ echo rand(5, 15); - - - On some platforms (such as Windows) RAND_MAX - is only 32768. If you require a range larger than 32768, specifying - min and max will allow - you to create a range larger than RAND_MAX, or consider using - mt_rand instead. - - - - ¬e.randomseed; - - - - In versions before 3.0.7 the meaning of - max was range. To - get the same results in these versions the short example should - be rand (5, 11) to get a random number - between 5 and 15. - - - - See also: - srand, - getrandmax, and - mt_rand. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + srand + getrandmax + mt_rand diff --git a/reference/math/functions/round.xml b/reference/math/functions/round.xml index ae401e8d4f..1c471d15a8 100644 --- a/reference/math/functions/round.xml +++ b/reference/math/functions/round.xml @@ -1,5 +1,5 @@ - + round @@ -18,25 +18,6 @@ (number of digits after the decimal point). precision can also be negative or zero (default). - - - <function>round</function> examples - - -]]> - - - + sin @@ -15,6 +15,30 @@ sin returns the sine of the arg parameter. The arg parameter is in radians. + + + &reftitle.parameters; + + + + arg + + + A value in radians + + + + + + + + &reftitle.returnvalues; + + The sine of arg + + + + &reftitle.examples; <function>sin</function> example @@ -31,46 +55,16 @@ echo sin(60); // -0.304810621 ... - - See also: - asin, - cos, - tan, and - deg2rad. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + asin + sinh + cos + tan + deg2rad diff --git a/reference/math/functions/sinh.xml b/reference/math/functions/sinh.xml index 909ef3922b..56177c5ce6 100644 --- a/reference/math/functions/sinh.xml +++ b/reference/math/functions/sinh.xml @@ -1,5 +1,5 @@ - + sinh @@ -15,23 +15,16 @@ Returns the hyperbolic sine of arg, defined as (exp(arg) - exp(-arg))/2. - - See also: - sin, - asinh, - cos, and - tan. - &reftitle.parameters; - + arg - + The argument to process @@ -41,20 +34,17 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The hyperbolic sine of arg &reftitle.seealso; - + sin + asinh + cosh + tanh diff --git a/reference/math/functions/sqrt.xml b/reference/math/functions/sqrt.xml index e366950e2d..e7d2979997 100644 --- a/reference/math/functions/sqrt.xml +++ b/reference/math/functions/sqrt.xml @@ -1,5 +1,5 @@ - + sqrt @@ -14,6 +14,30 @@ Returns the square root of arg. + + + &reftitle.parameters; + + + + arg + + + The argument to process + + + + + + + + &reftitle.returnvalues; + + The square root of arg + + + + &reftitle.examples; <function>sqrt</function> example @@ -28,42 +52,12 @@ echo sqrt(10); // 3.16227766 ... - - See also pow. - - - - &reftitle.parameters; - - - - - - - - - - - - - - - &reftitle.returnvalues; - - - - - - &reftitle.examples; - - - &reftitle.seealso; - + pow diff --git a/reference/math/functions/srand.xml b/reference/math/functions/srand.xml index 55de7bbb7f..68f322ed93 100644 --- a/reference/math/functions/srand.xml +++ b/reference/math/functions/srand.xml @@ -1,5 +1,5 @@ - + srand @@ -12,71 +12,59 @@ intseed - Seeds the random number generator with seed. - Since PHP 4.2.0, the seed - becomes optional and defaults to a random value if omitted. - - - - <function>srand</function> example - - -]]> - - + Seeds the random number generator with seed + or with a random value if no seed is given. ¬e.randomseed; - - See also: - rand, - getrandmax, and - mt_srand. - &reftitle.parameters; - + seed - + Optional seed value - - &reftitle.returnvalues; + + &reftitle.changelog; - - - - - &reftitle.examples; - - + + + + + &Version; + &Description; + + + + + Since 4.2.0 + + The seed becomes optional + and defaults to a random value if omitted. + + + + + &reftitle.seealso; - + rand + getrandmax + mt_srand diff --git a/reference/math/functions/tan.xml b/reference/math/functions/tan.xml index d0e22de7ec..bc483aed9c 100644 --- a/reference/math/functions/tan.xml +++ b/reference/math/functions/tan.xml @@ -1,5 +1,5 @@ - + tan @@ -29,23 +29,16 @@ echo tan(M_PI_4); // 1 - - See also: - atan, - sin, - cos, and - deg2rad. - &reftitle.parameters; - + arg - + The argument to process in radians @@ -55,20 +48,41 @@ echo tan(M_PI_4); // 1 &reftitle.returnvalues; - + The tangent of arg &reftitle.examples; - + + <function>srand</function> example + + +]]> + + &reftitle.seealso; - + atan + atan2 + sin + cos + tanh + deg2rad diff --git a/reference/math/functions/tanh.xml b/reference/math/functions/tanh.xml index 46b48e440e..33f88c419d 100644 --- a/reference/math/functions/tanh.xml +++ b/reference/math/functions/tanh.xml @@ -1,5 +1,5 @@ - + tanh @@ -15,23 +15,16 @@ Returns the hyperbolic tangent of arg, defined as sinh(arg)/cosh(arg). - - See also: - tan, - atanh, - sin, and - cos. - &reftitle.parameters; - + arg - + The argument to process @@ -41,20 +34,17 @@ &reftitle.returnvalues; - - - - - &reftitle.examples; - - + The hyperbolic tangent of arg &reftitle.seealso; - + tan + atanh + sinh + cosh