piecewise function with integrals



I'd be happy with a relatively simplistic form of if-then-else expressions, which could do "simplifications"/transformations like this:

a*(if ... then b else c) <=> (if ... then a*b else a*c)

a+(if ... then b else c) <=> (if ... then a+b else a+c)

etc.

Once I get a complex if-then-else expression debugged & tested, I'd like to convert it to a program (Lisp or otherwise) _mechanically_, so that I don't make any mistakes.

I can't tell you how many stupid errors I've made converting correct mathematical expressions into incorrect programming language expressions.  (And this is even without considering floating point nightmares.)

At 02:32 PM 1/20/2013, Richard Hennessy wrote:
>I don???t know where this conversation is going,