Numeric error propagation: Difference between revisions

Content added Content deleted
m (Use symbols to make the code more readable.)
m (→‎Fortran 90 et seq.: Cross-reference.)
Line 877: Line 877:
TYPE(POINT) P1,P2
TYPE(POINT) P1,P2
</lang>
</lang>
Whereupon, instead of a swarm of separate variables named according to some scheme, you can have a collection of variables with subcomponents named systematically. Further, via a great deal of syntax one can devise functions dealing with those compound types and moreover, prepare procedures that will perform operations such as addition and subtraction, etc. and merge these with the ordinary usages of addition, etc. of ordinary variables. One would then write the formula to be calculated, and it would all just happen. With the details out of sight, probably not a good idea.
Whereupon, instead of a swarm of separate variables named according to some scheme, you can have a collection of variables with subcomponents named systematically. Further, via a great deal of syntax one can devise functions dealing with those compound types and moreover, prepare procedures that will perform operations such as addition and subtraction, etc. and merge these with the ordinary usages of addition, etc. of ordinary variables. One would then write the formula to be calculated, and it would all just happen. This has been done for arithmetic with rational numbers, in [[Arithmetic/Rational#Fortran]] for example.

But with the details of the calculation's progress out of sight. This is probably not a good idea.


=={{header|Go}}==
=={{header|Go}}==