![]() I tested increasing the "1d-50" imaginary part and found that it starts "crapping out" at around "1e-38", which looks suspiciously close to 2^-127, so their "double precision" is behaving as if it only had a 8 bit exponent. ![]() I've got the Silverfrost (Salford) ftn95 freeware version and also the g95 windows port. I just tested both of the freely available Fortran95 compilers that I have for Windows and both failed miserably. I would hope that modern compiler systems (and certainly open-source software) would not have that problem, but if I was using an unknown Fortran implementation for anything serious involving complex arithmetic my first program would probably be something like this (tranalate from Fortran 77 to whatever version you are using!)Īnd if the output is "1 + 0i", throw the software away and get something that works properly! (Of course the output should be 1 + 1.000000001d-50i) Re "double precision complex", historically some Fortran implementations have had very poor implementations of 64-bit complex arithmetic. ![]() The "no-brain" method almost always wins, except in specialized situations like real-time computing. Or, you take the cost of your time in figuring out what is the "optimum" solution, running benchmarks to verify you made the correct decision, etc. ![]() Either you go for the no-brain option of double precision for everything, and if necessary take the cost hit of buying some more memory or a slightly faster processor of you need them.
0 Comments
Leave a Reply. |