|
|
Darren New <dne### [at] sanrrcom> wrote:
> It was supposed to be something you could read.
I don't think it makes any sense to write out mathematical formulae
as english expressions. It only makes the result confusing and very
hard to understand. I don't even understand why the thought it would
be a good idea. What businessman doesn't understand "x = a+b" equally
well as, if not even better than "ADD A TO B GIVING X"?
The latter form becomes ridiculous when the expression is any longer,
such as:
MULTIPLY B BY B GIVING B-SQUARED.
MULTIPLY 4 BY A GIVING FOUR-A.
MULTIPLY FOUR-A BY C GIVING FOUR-A-C.
SUBTRACT FOUR-A-C FROM B-SQUARED GIVING RESULT-1.
COMPUTE RESULT-2 = RESULT-1 ** .5.
SUBTRACT B FROM RESULT-2 GIVING NUMERATOR.
MULTIPLY 2 BY A GIVING DENOMINATOR.
DIVIDE NUMERATOR BY DENOMINATOR GIVING X.
Who ever thought that would be a good idea? Who understands that?
It seems that COBOL does support the more intuitive way too, ie:
COMPUTE X = (-B + SQRT(B ** 2 - (4 * A * C))) / (2 * A)
So what's the point in having both syntaxes?
Maybe because it was the 50's and computers were a brand new invention,
people thought that it's cool if you can write "plain English" and have
the computer understand it. Whether it's actually practical is secondary.
--
- Warp
Post a reply to this message
|
|