On Fri 20-Jun-08 3:08pm -0600, Bram Moolenaar wrote:

> Ben Schmidt wrote:

>> - No chance of getting sin(), cos(), atan() and log10()? I realised
>>    after thinking a bit further and reading some other users' posts that
>>    these actually would truly be useful. Surely they would only take a
>>    few minutes to implement, no time to maintain, and I would have a lot
>>    of use for them. I don't know how many users are like me, but there
>>    must be a few as surely programming is fairly closely related to
>>    mathematics in many ways. (I'd like exp() and log() as well, but these
>>    can be done with pow() and log10() by appropriately defining e, so not
>>    an issue. tan(), sgn(), rand(), etc. are easy with scripts, too, so no
>>    problems there.)

> log10() is there.  I don't see a use for sin() and the like.  If you
> really want these please come up with an example.

It's useful to have a calculator available at your
fingertips and to be able to create tables in Vim which are
easy when the math functions are there.

I see you have log10, pow and sqrt now.  In a few minutes I
added log and exp to both Vim and Gvim.  In another 10
minutes I could have added sin, cos, tan, asin, acos, atan
and, modeling after pow, atan2 - but I don't like the idea
of needing to patch eval.c every time you make a change.

Since there is virtually no overhead or maintenance, the
question becomes why not just add them.

If you don't have the time, others can do this - I, Ben or
others would likely be happy to make the patch.

-- 
Best regards,
Bill


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

Raspunde prin e-mail lui