[CSC 335] Complex Numbers
Andrew J. Pounds
pounds_aj at mercer.edu
Sat Oct 2 12:25:42 EDT 2021
As I indicated, the first project will evolve into the second project --
which will require the use of complex numbers. Since few of you will
want to write ALL of your own complex number containers and functions, I
recommend that you take ONE of the following paths and stick to it for
both projects:
1. If you are writing in straight C then you can implement complex
numbers via the gnu scientific library (GSL). I installed this on
cobra. It's nice -- but there is a learning curve. You can also try
<complex.h> and see how far you can get with that.
2. If you are writing in Java then I think you will either have to find
find or write a complex class. There are some out there -- but I am
not aware of a complex class that is part of the language standard. If
someone knows otherwise, then please let me know and provide a link.
3. If you are writing in C++ then you have four options. You can use
the GSL like in straight C, you can use a library called Armadillo
(which is a high performance linear algebra library that I have on
cobra), or you can use the <complex> template that is part of newer C++
implementations. Finally, I have use the BOOST libraries in some of my
chemical physics code but, but I don't think that boost is installed on
cobra -- its a BIG library. If you want to go the BOOST route then let
me know.
4. Or you can write in Fortran -- which has all of the types and
functions defined across multiple precisions as a part of the language
standard.
Here is the kicker -- and my biggest recommendation. PICK ONE and STICK
WITH IT. Each one will have a learning curve and each one has strengths
and weaknesses. For example, if you use Armadillo or the GSL, you may
also find out that you have access to all kinds of linear algebra
functions -- but you have to use the methods in either package for
defining vectors and matrices to utilize those packages.
--
Andrew J. Pounds, Ph.D. (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Director of the Computational Science Program
Mercer University, Macon, GA 31207 (478) 301-5627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20211002/60f320be/attachment.html>
More information about the csc335
mailing list