syntax to express mathematical formula concisely in your language of choice

Posted by aaa on Stack Overflow See other posts from Stack Overflow or by aaa
Published on 2010-05-24T17:23:13Z Indexed on 2010/05/24 17:31 UTC
Read the original article Hit count: 233

hello.

I am developing functional domain specific embedded language within C++ to translate formulas into working code as concisely and accurately as possible. Right now my language looks something like this:

// implies two nested loops j=0:N, i=0,j
(range(i) < j < N)[T(i,j) = (T(i,j) - T(j,i))/e(i+j)];

// implies summation over above expression
sum(range(i) < j < N))[(T(i,j) - T(j,i))/e(i+j)];

I am looking for possible syntax improvements/extensions or just different ideas about expressing mathematical formulas as clearly and precisely as possible.

Can you give me some syntax examples relating to my question which can be accomplished in your language of choice which consider useful. In particular, if you have some ideas about how to translate the above code segments, I would be happy to hear them

Thank you

© Stack Overflow or respective owner

Related posts about c++

Related posts about math