comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » problem converting FORTRAN to IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
problem converting FORTRAN to IDL [message #3962] Thu, 13 April 1995 00:00 Go to next message
brooker is currently offline  brooker
Messages: 12
Registered: March 1994
Junior Member
This is an observation I have just made about IDL.

When you compile a FORTRAN program, you can specify G_floating
implementations of REAL*8. This extends the range of numbers to +-0.56D308.
(For default D_floating, the maximum number allowed is 0.29D38.)

On the other hand, IDL has no option for the larger G_floating numbers. This
makes for problems when you convert a "G_floating REAL*8 " FORTRAN program to
IDL.

Peter Brooker
Re: problem converting FORTRAN to IDL [message #4043 is a reply to message #3962] Mon, 17 April 1995 00:00 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
rivers@cars3.uchicago.edu (Mark Rivers) writes:

> In article <3mlnpd$qnd@reznor.larc.nasa.gov>, zawodny@arbd0.larc.nasa.gov (Joseph M Zawodny) writes:
>> In article <D6zHn2.LyF@ireq.hydro.qc.ca> brooker@toka.ireq-ccfm.hydro.qc.ca writes:
>>> This is an observation I have just made about IDL.
>>>
>>> When you compile a FORTRAN program, you can specify G_floating
>>> implementations of REAL*8. This extends the range of numbers to +-0.56D308.
>>> (For default D_floating, the maximum number allowed is 0.29D38.)
>>>
>>> On the other hand, IDL has no option for the larger G_floating numbers. This
>>> makes for problems when you convert a "G_floating REAL*8 " FORTRAN program to
>>> IDL.
>>>
>>> Peter Brooker
>>
>> Gee, maybe I do not understand your problem, but I did this quick test.
>>
>> IDL> a=.5d308
>> IDL> print,a
>> 5.0000000e+307
>>
>> Therefor you should be able to use the IDL DOUBLE to implement FORTRAN
>> G_floating calculations.


> I belive the original post was probably referring to a DEC Alpha machine. On
> the Alpha one can compile double precision code to be D_FLOAT, G_FLOAT or
> IEEE_FLOAT. The default for the DEC C compiler is G_FLOAT. IDL is clearly
> compiled with D_FLOAT, presumably so that the Alpha version is compatible with
> old VAX binary files, where D_FLOAT is the default. It would be possible and
> perhaps nice if RSI would provide 3 different versions (D_FLOAT, G_FLOAT and
> IEEE_FLOAT) of IDL for the Alpha platform. If you use CALL_EXTERNAL on the
> Alpha you need to make sure any routines you call are compiled with the same
> floating point format used for IDL.

Actually, the only thing that can be said for certain is that the original post
referred to a machine running VMS. You can't tell whether that's VMS on the
VAX or on the Alpha/AXP platform.

When running IDL under OSF/1, DEC's implementation of Unix for the Alpha, the
floating point format used is IEEE.

Bill Thompson
Re: problem converting FORTRAN to IDL [message #4048 is a reply to message #3962] Sat, 15 April 1995 00:00 Go to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <3mlnpd$qnd@reznor.larc.nasa.gov>, zawodny@arbd0.larc.nasa.gov (Joseph M Zawodny) writes:
> In article <D6zHn2.LyF@ireq.hydro.qc.ca> brooker@toka.ireq-ccfm.hydro.qc.ca writes:
>> This is an observation I have just made about IDL.
>>
>> When you compile a FORTRAN program, you can specify G_floating
>> implementations of REAL*8. This extends the range of numbers to +-0.56D308.
>> (For default D_floating, the maximum number allowed is 0.29D38.)
>>
>> On the other hand, IDL has no option for the larger G_floating numbers. This
>> makes for problems when you convert a "G_floating REAL*8 " FORTRAN program to
>> IDL.
>>
>> Peter Brooker
>
> Gee, maybe I do not understand your problem, but I did this quick test.
>
> IDL> a=.5d308
> IDL> print,a
> 5.0000000e+307
>
> Therefor you should be able to use the IDL DOUBLE to implement FORTRAN
> G_floating calculations.


I belive the original post was probably referring to a DEC Alpha machine. On
the Alpha one can compile double precision code to be D_FLOAT, G_FLOAT or
IEEE_FLOAT. The default for the DEC C compiler is G_FLOAT. IDL is clearly
compiled with D_FLOAT, presumably so that the Alpha version is compatible with
old VAX binary files, where D_FLOAT is the default. It would be possible and
perhaps nice if RSI would provide 3 different versions (D_FLOAT, G_FLOAT and
IEEE_FLOAT) of IDL for the Alpha platform. If you use CALL_EXTERNAL on the
Alpha you need to make sure any routines you call are compiled with the same
floating point format used for IDL.

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: double precision complex #s
Next Topic: how to use pwidget in widget application

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 29 15:54:31 PDT 2025

Total time taken to generate the page: 1.92238 seconds