From d9664e694ddeb8cc0218f6869dc92c27ad1fd2ab Mon Sep 17 00:00:00 2001 From: Markus Heidelberg Date: Fri, 13 Feb 2009 01:19:53 +0100 Subject: [PATCH] floating point ext: sort the function descriptions --- runtime/doc/eval.txt | 236 ++++++++++++++++++++++++--------------------------- 1 file changed, 113 insertions(+), 123 deletions(-) diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 44626ebb..f985a36a 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1949,6 +1949,17 @@ abs({expr}) *abs()* < 4 {only available when compiled with the |+float| feature} +acos({expr}) *acos()* + Return the arc cosine of {expr} measured in radians, as a + |Float|in the range of [0,pi]. + {expr} must evaluate to a|Float|or a|Number|in [-1,1]. + Examples: > + :echo acos(0) +< 1.570796 > + :echo acos(-0.5) +< 2.094395 + {only available when compiled with|+float|and extention} + add({list}, {expr}) *add()* Append the item {expr} to |List| {list}. Returns the resulting |List|. Examples: > @@ -1991,6 +2002,17 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the < Without the {nr} argument a |List| with the whole |arglist| is returned. +asin({expr}) *asin()* + Return the arc sine of {expr} measured in radians, as a|Float| + in the range of [-pi/2,pi/2]. + {expr} must evaluate to a|Float|or a|Number|in [-1,1]. + Examples: > + :echo asin(0.8) +< 0.927295 > + :echo asin(-0.5) +< -0.523599 + {only available when compiled with|+float|and extention} + atan({expr}) *atan()* Return the principal value of the arc tangent of {expr}, in the range [-pi/2, +pi/2] radians, as a |Float|. @@ -2002,6 +2024,17 @@ atan({expr}) *atan()* < -1.326405 {only available when compiled with the |+float| feature} +atan2({expr1},{expr2}) *atan2()* + Return the arc tangent of {expr1}/{expr2}, measured in radians, + as a|Float|in the range [-pi,pi]. + {expr1} and {expr2} must evaluate to a|Float|or a|Number|. + Examples: > + :echo atan2(-1,1) +< -0.785398 > + :echo atan2(1,-1) +< 2.356194 + {only available when compiled with|+float|and extention} + *browse()* browse({save}, {title}, {initdir}, {default}) Put up a file requester. This only works when "has("browse")" @@ -2346,6 +2379,17 @@ cos({expr}) *cos()* < -0.646043 {only available when compiled with the |+float| feature} + +cosh({expr}) *cosh()* + Return the hyperbolic cosine of {expr} as a|Float|in [1,inf]. + {expr} must evaluate to a|Float|or a|Number|. + Examples: > + :echo cosh(0.5) +< 1.127626 > + :echo cosh(-0.5) +< -1.127626 + {only available when compiled with|+float|and extention} + count({comp}, {expr} [, {ic} [, {start}]]) *count()* Return the number of times an item with value {expr} appears @@ -2605,6 +2649,16 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is < This doesn't check for existence of the "bufcount" variable, but gets the value of "bufcount", and checks if that exists. +exp({expr}) *exp()* + Return the exponential of {expr} as a|Float|in [0,inf]. + {expr} must evaluate to a|Float|or a|Number|. + Examples: > + :echo exp(2) +< 7.389056 > + :echo exp(-1) +< 0.367879 + {only available when compiled with|+float|and extention} + expand({expr} [, {flag}]) *expand()* Expand wildcards and the following special keywords in {expr}. The result is a String. @@ -2837,6 +2891,21 @@ floor({expr}) *floor()* < 4.0 {only available when compiled with the |+float| feature} +fmod({expr1},{expr2}) *fmod()* + Return the remainder of {expr1}/{expr2}, even if the division + is not representable. Returns {expr1} - i * {expr2} for some + integer i such that if {expr2} is non-zero, the result has the + same sign as {expr1} and magnitude less than the magnitude of + {expr2}. If {expr2} is zero, the value returned is zero. The + value returned is a|Float|. + {expr1} and {expr2} must evaluate to a|Float|or a|Number|. + Examples: > + :echo fmod(12.33,1.22) +< 0.13 > + :echo fmod(-12.33,1.22) +< -0.13 + {only available when compiled with|+float|and extention} + fnameescape({string}) *fnameescape()* Escape {string} for use as file name command argument. All characters that have a special meaning, such as '%' and '|' @@ -3786,6 +3855,17 @@ localtime() *localtime()* 1970. See also |strftime()| and |getftime()|. +log({expr}) *log()* + Return the natural logarithm (base e) of {expr} as a|Float|. + {expr} must evaluate to a|Float|or a|Number|in (0,inf]. + Examples: > + :echo log(10) +< 2.302585 > + :echo log(exp(5)) +< 5.0 + {only available when compiled with|+float|and extention} + + log10({expr}) *log10()* Return the logarithm of Float {expr} to base 10 as a |Float|. {expr} must evaluate to a |Float| or a |Number|. @@ -5038,6 +5118,17 @@ sin({expr}) *sin()* {only available when compiled with the |+float| feature} +sinh({expr}) *sinh()* + Return the hyperbolic sine of {expr} as a|Float|in [-inf,inf]. + {expr} must evaluate to a|Float|or a|Number|. + Examples: > + :echo sinh(0.5) +< 0.521095 > + :echo sinh(-0.9) +< -1.026517 + {only available when compiled with|+float|and extention} + + sort({list} [, {func}]) *sort()* *E702* Sort the items in {list} in-place. Returns {list}. If you want a list to remain unmodified make a copy first: > @@ -5499,6 +5590,28 @@ taglist({expr}) *taglist()* located by Vim. Refer to |tags-file-format| for the format of the tags file generated by the different ctags tools. +tan({expr}) *tan()* + Return the tangent of {expr}, measured in radians, as a|Float| + in the range [-inf,inf]. + {expr} must evaluate to a|Float|or a|Number|. + Examples: > + :echo tan(10) +< 0.648361 > + :echo tan(-4.01) +< -1.181502 + {only available when compiled with|+float|and extention} + + +tanh({expr}) *tanh()* + Return the hyperbolic tangent of {expr} as a|Float|in [-1,1]. + {expr} must evaluate to a|Float|or a|Number|. + Examples: > + :echo tanh(0.5) +< 0.462117 > + :echo tanh(-1) +< -0.761594 + {only available when compiled with|+float|and extention} + tempname() *tempname()* *temp-file-name* The result is a String, which is the name of a file that doesn't exist. It can be used for a temporary file. The name @@ -5737,129 +5850,6 @@ writefile({list}, {fname} [, {binary}]) :call writefile(fl, "foocopy", "b") < -A description of the 10 functions added to the floating point support. This -is for the extention provided by Bill McCarthy. - - -acos({expr}) *acos()* - Return the arc cosine of {expr} measured in radians, as a - |Float|in the range of [0,pi]. - {expr} must evaluate to a|Float|or a|Number|in [-1,1]. - Examples: > - :echo acos(0) -< 1.570796 > - :echo acos(-0.5) -< 2.094395 - {only available when compiled with|+float|and extention} - - -asin({expr}) *asin()* - Return the arc sine of {expr} measured in radians, as a|Float| - in the range of [-pi/2,pi/2]. - {expr} must evaluate to a|Float|or a|Number|in [-1,1]. - Examples: > - :echo asin(0.8) -< 0.927295 > - :echo asin(-0.5) -< -0.523599 - {only available when compiled with|+float|and extention} - - -atan2({expr1},{expr2}) *atan2()* - Return the arc tangent of {expr1}/{expr2}, measured in radians, - as a|Float|in the range [-pi,pi]. - {expr1} and {expr2} must evaluate to a|Float|or a|Number|. - Examples: > - :echo atan2(-1,1) -< -0.785398 > - :echo atan2(1,-1) -< 2.356194 - {only available when compiled with|+float|and extention} - - -cosh({expr}) *cosh()* - Return the hyperbolic cosine of {expr} as a|Float|in [1,inf]. - {expr} must evaluate to a|Float|or a|Number|. - Examples: > - :echo cosh(0.5) -< 1.127626 > - :echo cosh(-0.5) -< -1.127626 - {only available when compiled with|+float|and extention} - - -exp({expr}) *exp()* - Return the exponential of {expr} as a|Float|in [0,inf]. - {expr} must evaluate to a|Float|or a|Number|. - Examples: > - :echo exp(2) -< 7.389056 > - :echo exp(-1) -< 0.367879 - {only available when compiled with|+float|and extention} - - -fmod({expr1},{expr2}) *fmod()* - Return the remainder of {expr1}/{expr2}, even if the division - is not representable. Returns {expr1} - i * {expr2} for some - integer i such that if {expr2} is non-zero, the result has the - same sign as {expr1} and magnitude less than the magnitude of - {expr2}. If {expr2} is zero, the value returned is zero. The - value returned is a|Float|. - {expr1} and {expr2} must evaluate to a|Float|or a|Number|. - Examples: > - :echo fmod(12.33,1.22) -< 0.13 > - :echo fmod(-12.33,1.22) -< -0.13 - {only available when compiled with|+float|and extention} - - -log({expr}) *log()* - Return the natural logarithm (base e) of {expr} as a|Float|. - {expr} must evaluate to a|Float|or a|Number|in (0,inf]. - Examples: > - :echo log(10) -< 2.302585 > - :echo log(exp(5)) -< 5.0 - {only available when compiled with|+float|and extention} - - -sinh({expr}) *sinh()* - Return the hyperbolic sine of {expr} as a|Float|in [-inf,inf]. - {expr} must evaluate to a|Float|or a|Number|. - Examples: > - :echo sinh(0.5) -< 0.521095 > - :echo sinh(-0.9) -< -1.026517 - {only available when compiled with|+float|and extention} - - -tan({expr}) *tan()* - Return the tangent of {expr}, measured in radians, as a|Float| - in the range [-inf,inf]. - {expr} must evaluate to a|Float|or a|Number|. - Examples: > - :echo tan(10) -< 0.648361 > - :echo tan(-4.01) -< -1.181502 - {only available when compiled with|+float|and extention} - - -tanh({expr}) *tanh()* - Return the hyperbolic tangent of {expr} as a|Float|in [-1,1]. - {expr} must evaluate to a|Float|or a|Number|. - Examples: > - :echo tanh(0.5) -< 0.462117 > - :echo tanh(-1) -< -0.761594 - {only available when compiled with|+float|and extention} - - *feature-list* There are three types of features: 1. Features that are only supported when they have been enabled when Vim -- 2.11.4.GIT