Jeffrey B. Layton wrote:
In Fortran it's always been x**y. The good compilers let x and y be any
data types (I've not tried using a complex as the exponent though).
It should be noted that I haven't been actively using Fortran for the
better part of the last decade. This is not a choice issue, just most
of our work tends to focus on C, Perl, ...
One of the principal advantages of Fortran over C for scientific
computing is the inclusion of Complex as a first class data type. That
means any library/code/function that uses it, knows how to use it, as it
is well defined in terms of a fixed implementation. There are a myriad
of ways to handle complex in C, but you can't easily write
complex A,B,C,D
A = B + C*D
with anything like the clarity of Fortran.
Another principal advantage of Fortran over C for scientific computing
is the inclusion of arrays and matrices as first class data types. Yes,
you can do all sort of allocation wonders in C. You can do some
incredible things at lower levels. Just try to use two array packages
which have slightly different conceptions of what an array is, and how
to manipulate it.
Of course, this is usually the time at which the C++ folks come out of
the background and start talking about objects, interfaces, overloading, ...
Anyone ever debugged an overloaded operator? It ain't fun, at any level.
Add to that the (seriously) non-unity abstraction penalty (TANSTAAFL:
objects cost time/memory/...).
Yeah, you can write
A = B + C*D
in C++, but you have to overload the operators. And heaven forbid you
use an FFT package with a slightly differing conception of a vector of
complex as compared to the matrix package you are using.
There is value (significant value) in first class types that scientists
use commonly. There is value in being able to get close to the actual
metal ... er ... silicon.
We usually advise using what you are comfortable with. Fortran will be
with us for decades more.
Jeff
_______________________________________________
Beowulf mailing list, [email protected]
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf
--
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web : http://www.scalableinformatics.com
http://jackrabbit.scalableinformatics.com
phone: +1 734 786 8423
fax : +1 866 888 3112
cell : +1 734 612 4615
_______________________________________________
Beowulf mailing list, [email protected]
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf