The author has developed a new version of his Fortran multiprecision computation system that is based on the Fortran-90 language. With this new approach, a translator program is not required -translation of Fortran code for multiprecision is accomplished by merely utilizing advanced features of Fortran-90, such as derived data types and operator extensions. This approach results in more reliable translation and also permits programmers of multiprecision applications to utilize the full power of the Fortran-90 language.Three multiprecision datatypes are supported in this system: multiprecision integer, real and complex. All the usual Fortran conventions for mixed mode operations are supported, and many of the Fortran intrinsics, such as SIN, EXP and MOD, are supported with multiprecision arguments. This paper also briefly describes an interesting application of this software, wherein new number-theoretic identities have been discovered by means of multiprecision computations.
IntroductionReaders may be familiar with the author's previous multiprecision system [3], which consists of the TRANSMP translator program and the MPFUN package of multiprecision (MP) computation routines. Together they permit one to write straightforward Fortran-77 code that can be executed using an arbitrarily high level of numeric precision.From its inception, the TRANSMP program was intended only as an interim tool until Fortran-90 was available. This is because advanced Fortran-90 features such as derived data types and operator extensions permit one to implement multiprecision translation in a much more natural way. Now that day has arrived -Fortran-90 is currently available on several computer systems, and it soon will be available from all major vendors of scientific computers. Accordingly, the author has written a set of Fortran-90 modules that permit the user to handle MP data like any other Fortran data type.With the new Fortran-90 based system, one declares variables to be of type MP integer, MP real or MP complex using Fortran-90 type statements. With a few exceptions, one can then write ordinary Fortran-90 code involving these variables. In particular, arithmetic operations involving these variables are performed with a numeric precision level that can be set to an arbitrarily high level. Also, most of the Fortran intrinsic functions, such as SIN, EXP and MOD, are defined with MP arguments.In comparison to the TRANSMP approach, there are a few disappointments. To begin with, one has to give up the ability to run MP source code, without change, as a standard single precision or double precision program. Also, features such as read/write statements are not as elegant in the new system -subroutines must now be called for formatted MP read and write.On the other hand, features such as generic functions work much better in the Fortran-90 version. Also, the coverage of Fortran features is more complete with the Fortran-90 version than with TRANSMP -programmers can now utilize the full power of the Fortran-90 language in a M...