Math Formulae
Tom Leylan
tleylan at pegasus.com
Wed Jan 2 12:54:46 AEST 1991
In article <18444:Dec3104:13:5090 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>
>cost = 0.03 * total;
>if (total > 1000.00)
> cost = 0.03 * 1000.00 + 0.02 * (total - 1000.00);
>if (cost < 20.00)
> cost = 20.00;
>
Dan, Thanks for "solution" I obviously didn't phrase my query correctly as it
wasn't _that_ particular problem I was interested in solving it was the
problem of solving whatever business formula was required. Some start with
a base commission depending upon monthly sales with minimums and maximums and
10 companies can calculate it 10 different ways. I'm trying to avoid being
a "formula maintainer" for the rest of my career.
A few people have suggested that I write my own little math formula processor
and that sound like the solution... a sort of SQL for math problems.
I also accidentally (I stand behind the 5th amendment to the Constitution)
posted my message as a follow-up to someone elses thread and while I'm
sorry I did it it seems irreversible at this point.
tom
More information about the Comp.lang.c
mailing list