Ben Schmidt wrote:
> math('sqrt',argument)
> math('exp',exponent[,base=e])
> math('log',argument[,base=e])
> math('sin',argument[,degrees (bool)=0])
> math('cos',argument[,degrees (bool)=0])
> math('tan',argument[,degrees (bool)=0])
> math('atan',argument[,degrees (bool)=0])

Considering the functions, not the syntax to call them, I would have to suggest 
that
it would be better to use Python-in-Vim for this sort of thing (and get complex
numbers as well, plus heaps more).

For example:
http://vim.wikia.com/wiki/Scientific_calculator

Someone might like to consider how moving Vim float variables into Python, and
getting float results back, works.

It would be a pointless waste of development time to do much more with floats in
Vim, IMHO.

> Are floats or doubles being used? They are definitely being 
> displayed with float, not double, precision at present.

Vim's float code is using doubles.

I haven't done anything serious with floats for years, but my vague 
recollection is
that you would have to use something like printf('%.20f',myfloat) to see lots of
precision (i.e. I think what you are seeing in Vim is just standard behaviour).

John


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

Raspunde prin e-mail lui