See the attached diff. Bram, this is an RFE, if you don't like it,
don't take it (these are formulas I would use to compute e and pi).

This also moves |float-pi| and |float-e| down by a few lines to put
the paragraph headed "Rationale" where IMHO it belongs.

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  3062856b8dc63bc586760800ce3ca90b84749dd5
RFE: alternative ways to compute pi and e

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1083,29 +1083,34 @@ Examples:
 	1.234e03
 	1.0E-6
 	-3.1416e+88
 
 These are INVALID:
 	3.		empty {M}
 	1e40		missing .{M}
 
-							*float-pi* *float-e*
-A few useful values to copy&paste: >
-	:let pi = 3.14159265359
-	:let e  = 2.71828182846
-
 Rationale:
 Before floating point was introduced, the text "123.456" was interpreted as
 the two numbers "123" and "456", both converted to a string and concatenated,
 resulting in the string "123456".  Since this was considered pointless, and we
 could not find it intentionally being used in Vim scripts, this backwards
 incompatibility was accepted in favor of being able to use the normal notation
 for floating point numbers.
 
+							*float-pi* *float-e*
+A few useful values to copy&paste: >
+	:let pi = 3.14159265359
+	:let e  = 2.71828182846
+Or, if you don't want to write them in as floating-point literals, you can
+also use functions like the following (several choices are possible): >
+	:let pi = acos(-1.0)
+	:let pi = 4.0 * atan(1.0)
+	:let e  = exp(1.0)
+
 						*floating-point-precision*
 The precision and range of floating points numbers depends on what "double"
 means in the library Vim was compiled with.  There is no way to change this at
 runtime.
 
 The default for displaying a |Float| is to use 6 decimal places, like using
 printf("%g", f).  You can select something else when using the |printf()|
 function.  Example: >

Raspunde prin e-mail lui