aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-22 00:29:58 +0100
committerGitHub <noreply@github.com>2017-03-22 00:29:58 +0100
commitab16535580e8ceaae437bb0528b28f220fb06950 (patch)
treec126e9dc54c176dbf6017d9983ac1677f96e17ef /runtime/doc/eval.txt
parent82c67768fa6b56689f22b7ba5f1e4bcf620aaa7d (diff)
parent3e33025133e1e77c7ad3b8670e06175b9757cf30 (diff)
downloadrneovim-ab16535580e8ceaae437bb0528b28f220fb06950.tar.gz
rneovim-ab16535580e8ceaae437bb0528b28f220fb06950.tar.bz2
rneovim-ab16535580e8ceaae437bb0528b28f220fb06950.zip
Merge #6231 from jbradaric/vim-7.4.2266
vim-patch:7.4.2266,7.4.2280,7.4.2291
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index a52b3cd080..341e65d381 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -5683,9 +5683,10 @@ printf({fmt}, {expr1} ...) *printf()*
%04x hex number padded with zeros to at least 4 characters
%X hex number using upper case letters
%o octal number
- %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
@@ -5810,8 +5811,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