[comp.os.vms] Looking for QEXTD codes

jhpark@cs.utexas.edu (Jihun Park) (03/17/91)

Hello,

I am looking for a routine named QEXTD which converts single precision(?)
to double precision number. I heard this is only supported on VMS/Fortran.
But I am using UNIX so I can not access QEXTD. Does anybody out there can
provide me source codes of QEXTD ?

I converts fortran to C using f2c, but f2c can not help here.
Some equivalent C codes are also appreciated.

Thanks in advance,
---
Park

KENCB@SLACVM.SLAC.STANFORD.EDU (03/17/91)

In article <1186@earth.cs.utexas.edu>, jhpark@cs.utexas.edu (Jihun Park) says:
>I am looking for a routine named QEXTD which converts single precision(?)
>to double precision number. I heard this is only supported on VMS/Fortran.
>But I am using UNIX so I can not access QEXTD. Does anybody out there can
>provide me source codes of QEXTD ?

    I can't help with C-code, but I can help with what QEXT *does*.
QEXT is the generic "convert to REAL*16" intrinsic function, QEXTD
is the _specific_ version used to convert REAL*8 to REAL*16.  From
the VMS Fortran help file:


FORTRAN

  Intrinsic_Functions

    QEXT

       QEXT (number)

       A function that converts the argument to a REAL*16 value.
       +------+---------+----------+------------+-------------+
       | Args | Generic | Specific |  Argument  | Result Type |
       +------+---------+----------+------------+-------------+
       |  1   |  QEXT   | QEXT     | INTEGER*2  | REAL*16     |
       |      |         | QEXT     | INTEGER*4  | REAL*16     |
       |      |         | QEXT     | REAL*4     | REAL*16     |
       |      |         | QEXTD    | REAL*8     | REAL*16     |
       |      |         | QEXT     | REAL*16    | REAL*16     |
       |      |         | QEXT     | COMPLEX*8  | REAL*16     |
       |      |         | QEXT     | COMPLEX*16 | REAL*16     |
       +------+---------+----------+------------+-------------+


If your Unix system supports quadword real's, just do the extend from
the double precision.  If the hardware doesn't support it, you'll need
to write a whole library of REAL*16 math functions.  Do you need that?

-Ken


 Dr. Kenneth H. Fairfield        Internet: Fairfield@Tpc.Slac.Stanford.Edu
 SLAC, P.O.Box 4349, Bin 98      DECnet:   45047::FAIRFIELD (TPC::)
 Stanford, CA   94309            BITNET    Fairfield@SlacTpc
 "These opinions are worth what you paid for 'em...
         ...and are they mine, not SLAC's, Stanford's, nor the DOE's..."