[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Tsp-devel] Request for a Mathematical library.

**From**: |
Eric Noulard |

**Subject**: |
Re: [Tsp-devel] Request for a Mathematical library. |

**Date**: |
Tue, 11 Dec 2007 22:47:49 +0100 |

2007/12/11, Stef Euskadi <address@hidden>:
>* Good evening all !!*
>
>* I am looking for a open source mathematical library, written in C that does*
>* the following job :*
>
>* Suppose the formula : sin ( a + cos ( 1 + 2 x phi ) ^2 )*
>
>* The output of the library is a double-linked list of C structures that*
>* enables*
>* me to compute the result as fast as possible :*
>
>* \--- sin*
>* \-- ADD*
>* \-- a*
>* \-- pow*
>* \-- 2*
>* \-- cos*
>* \-- ADD*
>* \-- 1*
>* \-- MULT*
>* \-- 2*
>* \-- phi*
>
>* Any idea before I start coding something ??*
Nope no idea.
Do you want to "parse" the fomula from file
or do you want a way to "represent" the formula ?
I'm not sure the double linked list is an efficient way to implement
the formula.
Depending on the complexity of your formula you
may use RPN representaion (http://en.wikipedia.org/wiki/Reverse_Polish_notation)
with only 2 stacks 1 for the operators/functions and one for operand.
Evaluation algorithm using this is usually both easy and fast.
However if you plan to do realtime computation for each sample
you get with this... I don't know how much CPU time it would crunch.
Could you explain your requirements a little?
--
Erk