summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-29 21:55:35 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-29 21:55:35 +0200
commit04186095346daa60e82e981dad114de2b641d672 (patch)
tree0026222b735297b056c4961160b9940ef72cd3b7 /runtime
parent7f7bd297d6d989254f71c694f1c72d07cbc5c306 (diff)
patch 7.4.2291v7.4.2291
Problem: printf() handles floats wrong when there is a sign. Solution: Fix placing the sign. Add tests. (Dominique Pelle)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt24
1 files changed, 14 insertions, 10 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 011807bfe5..aa32839a05 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 Aug 28
+*eval.txt* For Vim version 7.4. Last change: 2016 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -643,7 +643,7 @@ It's possible to form a variable name with curly braces, see
Expression syntax summary, from least to most significant:
-|expr1| expr2 ? expr1 : expr1 if-then-else
+|expr1| expr2 ? expr1 : expr1 if-then-else
|expr2| expr3 || expr3 .. logical OR
@@ -736,7 +736,9 @@ use in a variable such as "a:1".
expr2 and expr3 *expr2* *expr3*
---------------
- *expr-barbar* *expr-&&*
+expr3 || expr3 .. logical OR *expr-barbar*
+expr4 && expr4 .. logical AND *expr-&&*
+
The "||" and "&&" operators take one argument on each side. The arguments
are (converted to) Numbers. The result is:
@@ -1981,7 +1983,7 @@ assert_notmatch({pat}, {text} [, {msg}]) none assert {pat} not matches {text}
assert_true({actual} [, {msg}]) none assert {actual} is true
asin({expr}) Float arc sine of {expr}
atan({expr}) Float arc tangent of {expr}
-atan2({expr}, {expr}) Float arc tangent of {expr1} / {expr2}
+atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
browse({save}, {title}, {initdir}, {default})
String put up a file requester
browsedir({title}, {initdir}) String put up a directory requester
@@ -5905,9 +5907,10 @@ printf({fmt}, {expr1} ...) *printf()*
%X hex number using upper case letters
%o octal number
%08b binary number padded with zeros to at least 8 chars
- %f floating point number in the form 123.456
- %e floating point number in the form 1.234e3
- %E floating point number in the form 1.234E3
+ %f floating point number as 12.23, inf, -inf or nan
+ %F floating point number as 12.23, INF, -INF or NAN
+ %e floating point number as 1.23e3, inf, -inf or nan
+ %E floating point number as 1.23E3, INF, -INF or NAN
%g floating point number, as %f or %e depending on value
%G floating point number, as %f or %E depending on value
%% the % character itself
@@ -6039,8 +6042,9 @@ printf({fmt}, {expr1} ...) *printf()*
digits after the decimal point. When the precision is
zero the decimal point is omitted. When the precision
is not specified 6 is used. A really big number
- (out of range or dividing by zero) results in "inf".
- "0.0 / 0.0" results in "nan".
+ (out of range or dividing by zero) results in "inf"
+ or "-inf" with %f (INF or -INF with %F).
+ "0.0 / 0.0" results in "nan" with %f (NAN with %F).
Example: >
echo printf("%.2f", 12.115)
< 12.12
@@ -7507,7 +7511,7 @@ system({expr} [, {input}]) *system()* *E677*
Pipes are not used, the 'shelltemp' option is not used.
- When prepended by |:silent| the shell will not be set to
+ When prepended by |:silent| the terminal will not be set to
cooked mode. This is meant to be used for commands that do
not need the user to type. It avoids stray characters showing
up on the screen which require |CTRL-L| to remove. >