mathematical-expressions

Evaluating Mathematical Expressions using Lua

In my previous question I was looking for a way of evaulating complex mathematical expressions in C, most of the suggestions required implementing some type of parser. However one answer, suggested using Lua for evaluating the expression. I am interested in this approach but I don't know anything about Lua. Can some one with experienc...

Is there a way to override LaTeX's errors about double subscripts and superscripts?

Minor point about LaTeX that bothers me. When one writes a^b^c, a_b_c or a'^b in math mode, LaTeX gives an error message complaining about multiple super/subscripts. This is particularly annoying after replacing a string containing a super/subscript or when using the apostrophe, '. Is there a way to override the error an...

Dijkstra’s algorithm and functions

Hi guys, the question is: suppose I have an input function like sin(2-cos(3*A/B)^2.5)+0.756*(C*D+3-B) specified with a BNF, I will parse input using recursive descent algorithm, and then how can I use or change Dijkstra’s algorithm to handle this given function? I need to execute it with sin | cos | sqrt | ln, where Dijkstra’s algorithm ...

Adding Conditionals & Functions to a Math Parser

I have a binary tree based mathematical expression parser I built, which works great for 'normal' math, like: (3.5 * 2) ^ 1 / (1 << 6). however, I would like to expand it a little to add a ternary selection operator, mirroring the one from C: {expr} ? {true-expr} : {false-expr}. I would also like to add functions, like sin(x) or ave(...)...

Matlab variable type help

How to convert variable of 'struct' type to a matrix in Matlab? How do we convert the q_yearly_w, in the code below, which is of type 'struct' to a matrix with which we can perform normal mathematical operations? %# open the file fid = fopen(Reportq_rwo); %# read it into one big array, row by row fileContents = textscan(fid,'%s','Deli...

mathematical operators in htaccess file

is it possible to use mathematical operators in .htaccess file? for example i want to redirect a page with id=100 to a page with id=30 ? ...

FullSimply Inequalities and then rearranging them in Mathematica 7

Hi I am using Mathematica 7 in the notebook interface and I want to rearrange an inequality so that I get a certain variable on one side. For eg. FullSimplify[x^3+L+r>3x^3+2r] Gives L > r + 2 x^3 However, I want : r < L-2x^3 Is there anyway we can instruct FullSimplify to order variables in a particular way? I am using Mathema...