Re: financial math

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jacques Deschenes wrote:

>    I seem to me that it would be easy to write financial math function in
> euphoria.
> One could consider number as string and work on each of the string character.

Je,je,je you move faster than me ;)
I was writting such a routine when I read your mail Jacques. I have
already
implemented addition,subtraction and multiplication, tomorrow I'll
finish
divition and I'll upload it to my webpage.
Curiosity: I was using the same variable name, "result".

But note that such a routine is not *that* acurrate in some
circumstances:
atom x
x = 1/3         --x is 0.333333333333333 (15 threes)
x = x * 3       --x is 1
Using "string" math 1/3 would be 0.333333333333333...
but x*3 would be 0.999999999999999....

--
Regards,
        Daniel Berstein
        architek at geocities.com
        http://www.geocities.com/SiliconValley/Heights/9316

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu