[Actually the patch I attached goes over a couple of other patches I also
had applied; but it still applies to the current source and runtimes OK,
just with some offsets.]

Ben Schmidt wrote:
>> I'm not sure how to add the variables.
> 
> I am. :-)
> 
>> I've patched 7.1.386 with the new floating point patch.
> 
> 326 perhaps?
> 
>> The attached patch to that includes log, exp, sin, cos, tan,
>> asin, acos, atan and atan2.
> 
> OK, here's a counter-patch, including documentation, which is the bigger
> task, I think. It includes all my suggestions, as well as Bill's work,
> plus a couple of other things that have been suggested/that I noticed:
> 
> - New variables: v:inf, v:nan, v:e, v:pi.
> - New functions: abs, acos, asin, atan, atan2, cos, cosh, deg2rad, exp,
>    log, rad2deg, sin, sinh, tan, tanh.
> - Change division by zero behaviour for Numbers to match what float2nr()
>    does.
> - Fixes get_float_arg so it's inside #ifdef FEAT_FLOAT and you can still
>    compile without float support!
> - Documentation for new variables, new functions, float and altered
>    Number division by zero behaviour, float precision, another pow()
>    example, and more conspicuous noting of the use of str2float as
>    nr2float. Fix in alphabetical order in a list, too. I noticed also
>    that only using %e can you be sure of getting maximum precision. %g
>    you can in some situations get more or less shown than you want.
> 
>> Caution - it's DOS format and is applied from the src
>> directory.
> 
> This one is in Unix format and applies from the root of the source tree
> with -p1. It goes on top of 7.1.326 and Bram's floating point patch.
> 
> So at least this won't take any signficant amount of Bram's time, now. We 
> just 
> have to convince him about what are the best parts of it to include!
> 
> I suggest:
>    - We could easily do without: cosh, sinh, tanh (they are simple to
>      implement with scripts and rarely used).
>    - We could probably do without: v:inf, v:nan, v:e, v:pi, exp, log,
>      tan, deg2rad, rad2deg (simple to implement with scripts, but they
>      are convenient and common so worth keeping, particularly the last
>      two, which make sin, cos and atan much more useful).
>    - We could probably do without: asin, acos, atan2 (but implementing
>      them with script, although possible, is quite a lot of pain, so I
>      would suggest keeping them, even though they are more rare).
>    - The rest of the functional changes have either already been agreed
>      to or I personally deem to be pretty much essential.
> 
> By the way, Bram, I am getting warnings when compiling on the Mac about
> MAXPATHL being redefined. It is defined at os_mac.h:222 and
> os_unix.h:438, which are evidently both included. I think simply
> removing line os_mac.h:222 will correctly fix it.
> 
> Ben.
> 
> 
> 
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui