in reply to how would you detect a math expression

Take a look at the code for the venerable unix command 'units'. Here are some samples:
You have: c
You want: km/fortnight
        * 3.6262896e+11

You have: (1/454) pound
You want: gram
        * 0.99910214
The Google algorithm looks like it could well have started from the 'units' code base.

I used to have a CGI form where you could solve an algebra problem. It used http://maxima.sourceforge.net behind the scenes, with lots of input scrubbing. I took it down after someone kept trying to factor very high order polynomials, which had the effect of a denial of service attack. I could have fixed this by limiting the CPU time for any problem.

It should work perfectly the first time! - toma
  • Comment on Re: how would you detect a math expression