Re: mathematica & fortran ??

*To*: mathgroup at smc.vnet.net*Subject*: [mg71426] Re: mathematica & fortran ??*From*: "Beliavsky" <beliavsky at aol.com>*Date*: Sat, 18 Nov 2006 04:40:57 -0500 (EST)*References*: <ejjvg3$l3f$1@smc.vnet.net>

fish wrote: > I have been using the software of Mathematica for 2 years. It is a > good software. > > Those days, I meet a difficulty. I compile a program, which is > written in Fortran language. In it, there is a Bessel function. I want > to get the high precision value of the function. Unfortunately, I > failed. > > As we know, the software of Mathematica supplies the Bessel function > with high precision. So I want to ask whether we can run the two > softwares, Mathematica and Fortran language, simultaneously? Then I can > directly use the Bessel function in Mathematica for my Fortran program. A Fortran solution could be to find a compiler that supports quadruple precision (16 byte floating point variables) or 10-byte reals. Then you could either change the code to use quadruple precision or (depending on the compiler) invoke a compiler switch that automatically promotes double precision variables to quadruple precision. The Lahey/Fujitsu compiler has the -quad option. If you want to try this route, the best newsgroups for follow-up questions would be comp.lang.fortran and/or sci.math.num-analysis.