Skip to main content

MASS Fortran interface blocks for Linux


Product documentation


Abstract

This document provides the Fortran interface blocks for MASS scalar functions, and single-precision and double-precision vector functions.

Content

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

c     Fortran interface blocks for the MASS scalar functions.
c     Interface declarations for MASS scalar functions that are
c     not Fortran intrinsic functions are also available in
c     mass.include.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c     Fortran interface block for the single-precision MASS
c     scalar functions.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

      interface

      real*4 function acosf (%val(x))
        real*4 x
c       Returns the arccosine of x.
      end function acosf

      real*4 function acoshf (%val(x))
        real*4 x
c       Returns the arc hyperbolic cosine of x.
      end function acoshf

      real*4 function asinf (%val(x))
        real*4 x
c       Returns the arcsine of x.
      end function asinf

      real*4 function asinhf (%val(x))
        real*4 x
c       Returns the arc hyperbolic sine of x.
      end function asinhf

      real*4 function atan2f (%val(x), %val(y))
        real*4 x, y
c       Returns the arctangent of x/y.
      end function atan2f

      real*4 function atanf (%val(x))
        real*4 x
c       Returns the arctangent of x.
      end function atanf

      real*4 function atanhf (%val(x))
        real*4 x
c       Returns the arc hyperbolic tangent of x.
      end function atanhf

      real*4 function cbrtf  (%val(x))
        real*4 x
c       Returns the cube root of x.
      end function cbrtf

      real*4 function copysignf (%val(x), %val(y))
        real*4 x, y
c       Returns a value with the magnitude of x and the sign of y.
      end function copysignf

      real*4 function cosf (%val(x))
        real*4 x
c       Returns the cosine of x.
      end function cosf

      real*4 function coshf (%val(x))
        real*4 x
c       Returns the hyperbolic cosine of x.
      end function coshf

      real*4 function erff (%val(x))
        real*4 x
c       Returns the error function of x.
      end function erff

      real*4 function erfcf (%val(x))
        real*4 x
c       Returns 1.0 - the error function of x.
      end function erfcf

      real*4 function expf (%val(x))
        real*4 x
c       Returns the exponential function of x.
      end function expf

      real*4 function expm1f (%val(x))
        real*4 x
c       Returns (the exponential function of x)-1.
      end function expm1f

      real*4 function hypotf (%val(x), %val(y))
        real*4 x, y
c       Returns the square root of x2+ y2   .
      end function hypotf

      real*4 function lgammaf (%val(x))
        real*4 x
c       Returns the natural logarithm of the absolute value of the
c       gamma function of x.
      end function lgammaf

      real*4 function logf (%val(x))
        real*4 x
c       Returns the natural logarithm of x.
      end function logf

      real*4 function log10f (%val(x))
        real*4 x
c       Returns the base-10 logarithm of x.
      end function log10f

      real*4 function log1pf (%val(x))
        real*4 x
c       Returns the natural logarithm of (x-1).
      end function log1pf

      real*4 function powf (%val(x), %val(y))
        real*4 x, y
c       Returns the value of x raised to the power y.
      end function powf

      real*4 function rintf (%val(x))
        real*4 x
c       Rounds x to an integer value according to the current rounding mode.
c       The default rounding mode is to round to the nearest integer.
      end function rintf

      real*4 function sinf (%val(x))
        real*4 x
c       Returns the sine of x.
      end function sinf

      real*4 function sinhf (%val(x))
        real*4 x
c       Returns the hyperbolic sine of x.
      end function sinhf

      real*4 function tanf  (%val(x))
        real*4 x
c       Returns the tangent of x.
      end function tanf

      real*4 function tanhf (%val(x))
        real*4 x
c       Returns the hyperbolic tangent of x.
      end function tanhf

      end interface

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c     Fortran interface block for the double-precision MASS
c     scalar functions.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

      interface

      real*8 function acos (%val(x))
        real*8 x
c       Returns the arccosine of x.
      end function acos

      real*8 function acosh (%val(x))
        real*8 x
c       Returns the arc hyperbolic cosine of x.
      end function acosh

      real*8 function asin (%val(x))
        real*8 x
c       Returns the arcsine of x.
      end function asin

      real*8 function asinh (%val(x))
        real*8 x
c       Returns the arc hyperbolic sine of x.
      end function asinh

      real*8 function atan (%val(x))
        real*8 x
c       Returns the arctangent of x.
      end function atan

      real*8 function atan2 (%val(x), %val(y))
        real*8 x, y
c       Returns the arctangent of x/y.
      end function atan2

      real*8 function atanh (%val(x))
        real*8 x
c       Returns the arc hyperbolic tangent of x.
      end function atanh

      real*8 function cbrt (%val(x))
        real*8 x
c       Returns the cube root of x.
      end function cbrt

      real*8 function copysign (%val(x), %val(y))
        real*8 x, y
c       Returns a value with the magnitude of x and the sign of y.
      end function copysign

      real*8 function cos (%val(x))
        real*8 x
c       Returns the cosine of x.
      end function cos

      real*8 function cosh (%val(x))
        real*8 x
c       Returns the hyperbolic cosine of x.
      end function cosh

      complex*16 function cosisin (%val(x))
        real*8 x
c       Returns a complex number with real part the sine of x and
c       imaginary part the cosine of x.
      end function cosisin

      real*8 function dnint (%val(x))
        real*8 x
c       Returns the nearest integer to x (as a real*8 value).
      end function dnint

      real*8 function erf (%val(x))
        real*8 x
c       Returns the error function of x.
      end function erf

      real*8 function erfc (%val(x))
        real*8 x
c       Returns 1.0 - the error function of x.
      end function erfc

      real*8 function exp (%val(x))
        real*8 x
c       Returns the exponential function of x.
      end function exp

      real*8 function expm1 (%val(x))
        real*8 x
c       Returns (the exponential function of x)-1
      end function expm1

      real*8 function hypot (%val(x), %val(y))
        real*8 x, y
c       Returns the square root of x*x + y*y.
      end function hypot

      real*8 function lgamma (%val(x))
        real*8 x
c       Returns the natural logarithm of the absolute value of the
c       gamma function of x.
      end function lgamma

      real*8 function log (%val(x))
        real*8 x
c       Returns the natural logarithm of x.
      end function log

      real*8 function log10 (%val(x))
        real*8 x
c       Returns the base-10 logarithm of x.
      end function log10

      real*8 function log1p (%val(x))
        real*8 x
c       Returns the natural logarithm of (x+1)
      end function log1p

c     ** operator
c     real*8 x, y
c     x**y returns x raised to the power y.

      real*8 function rsqrt (%val(x))
        real*8 x
c       Returns the reciprocal of the square root of x.
      end function rsqrt

      real*8 function sin (%val(x))
        real*8 x
c       Returns the sine of x.
      end function sin

      subroutine sincos (%val(x), s, c)
        real*8 x, s, c
c       Sets s to the sine of x and c to the cosine of x.
      end subroutine sincos

      real*8 function sinh (%val(x))
        real*8 x
c       Returns the hyperbolic sine of x.
      end function sinh

      real*8 function sqrt (%val(x))
        real*8 x
c       Returns the square root of x.
      end function sqrt

      real*8 function tan (%val(x))
        real*8 x
c       Returns the tangent of x.
      end function tan

      real*8 function tanh (%val(x))
        real*8 x
c       Returns the hyperbolic tangent of x.
      end function tanh

      end interface

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c     Fortran interface blocks for MASS vector functions.
c     These interface blocks are also in massv.include.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c     Fortran interface block for MASS double-precision vector
c     functions.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

      interface

      subroutine vacos (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the arccosine of x(i), for i=1,..,n
      end subroutine vacos

      subroutine vacosh (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the arc hyperbolic cosine of x(i),
c       for i=1,..,n
      end subroutine vacosh

      subroutine vasin(y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the arcsine of x(i), for i=1,..,n
      end subroutine vasin

      subroutine vasinh (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the arc hyperbolic sine of x(i), for i=1,..,n
      end subroutine vasinh

      subroutine vatan2 (z, x, y, n)
        real*8 z(*), x(*), y(*)
        integer n
c       Sets z(i) to the arctangent of x(i)/y(i), for i=1,..,n
      end subroutine vatan2

      subroutine vatanh (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the arc hyperbolic tangent of x(i),
c       for i=1,..,n
      end subroutine vatanh

      subroutine vcbrt (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the cube root of x(i), for i=1,..,n
      end subroutine vcbrt

      subroutine vcos (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the cosine of x(i), for i=1,..,n
      end subroutine vcos

      subroutine vcosh (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the hyperbolic cosine of x(i), for i=1,..,n
      end subroutine vcosh

      subroutine vcosisin (y, x, n)
        complex*16 y(*)
        real*8 x(*)
        integer n
c       Sets the real part of y(i) to the cosine of x(i) and the
c       imaginary part c of y(i) to the sine of x(i), for i=1,..,n
      end subroutine vcosisin

      subroutine vdint (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the integer truncation of x(i), for i=1,..,n
      end subroutine vdint

      subroutine vdiv (z, x, y, n)
        real*8 z(*), x(*), y(*)
        integer n
c       Sets z(i) to x(i)/y(i), for i=1,..,n
      end subroutine vdiv

      subroutine vdnint (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the nearest integer to x(i), for i=1,..,n
      end subroutine vdnint

      subroutine vexp (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the exponential function of x(i),
c       for i=1,..,n
      end subroutine vexp

      subroutine vexpm1 (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to (the exponential function of x(i))-1,
c       for i=1,..,n
      end subroutine vexpm1

      subroutine vlog (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the natural logarithm of x(i), for i=1,..,n
      end subroutine vlog

      subroutine vlog10 (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the base-10 logarithm of x(i), for i=1,..,n
      end subroutine vlog10

      subroutine vlog1p (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the natural logarithm of (x(i)+1),
c       for i=1,..,n
      end subroutine vlog1p

      subroutine vpow (z, x, y, n)
        real*8 z(*), x(*), y(*)
        integer n
c       Sets z(i) to x(i) raised to the power y(i), for i=1,..,n
      end subroutine vpow

      subroutine vqdrt (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the 4th root of x(i), for i=1,..,n
      end subroutine vqdrt

      subroutine vrcbrt (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of the cube root of x(i),
c       for i=1,..,n
      end subroutine vrcbrt

      subroutine vrec (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of x(i), for i=1,..,n
      end subroutine vrec

      subroutine vrqdrt (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of the 4th root of x(i),
c       for i=1,..,n
      end subroutine vrqdrt

      subroutine vrsqrt (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of the square root of x(i),
c       for i=1,..,n
      end subroutine vrsqrt

      subroutine vsin (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the sine of x(i), for i=1,..,n
      end subroutine vsin

      subroutine vsincos (y, z, x, n)
        real*8 y(*), z(*), x(*)
        integer n
c       Sets y(i) to the sine of x(i)
c       and z(i) to the cosine of x(i), i=1,..,n
      end subroutine vsincos

      subroutine vsinh (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the hyperbolic sine of x(i), for i=1,..,n
      end subroutine vsinh

      subroutine vsqrt (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the square root of x(i), for i=1,..,n
      end subroutine vsqrt

      subroutine vtan (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the tangent of x(i), for i=1,..,n
      end subroutine vtan

      subroutine vtanh (y, x, n)
        real*8 y(*), x(*)
        integer n
c       Sets y(i) to the hyperbolic tangent of x(i), for i=1,..,n
      end subroutine vtanh

      end interface

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c     Fortran interface block for MASS single-precision vector
c     functions.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

      interface

      subroutine vsacos (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the arccosine of x(i), for i=1,..,n
      end subroutine vsacos

      subroutine vsacosh (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the arc hyperbolic cosine of x(i),
c       for i=1,..,n
      end subroutine vsacosh

      subroutine vsasin(y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the arcsine of x(i), for i=1,..,n
      end subroutine vsasin

      subroutine vsasinh (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the arc hyperbolic sine of x(i), for i=1,..,n
      end subroutine vsasinh

      subroutine vsatan2 (z, x, y, n)
        real*4 z(*), x(*), y(*)
        integer n
c       Sets z(i) to the arctangent of x(i)/y(i), for i=1,..,n
      end subroutine vsatan2

      subroutine vsatanh (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the arc hyperbolic tangent of x(i),
c       for i=1,..,n
      end subroutine vsatanh

      subroutine vscbrt (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the cube root of x(i), for i=1,..,n
      end subroutine vscbrt

      subroutine vscos (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the cosine of x(i), for i=1,..,n
      end subroutine vscos

      subroutine vscosh (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the hyperbolic cosine of x(i), for i=1,..,n
      end subroutine vscosh

      subroutine vscosisin (y, x, n)
        complex*16 y(*)
        real*4 x(*)
        integer n
c       Sets the real part of y(i) to the cosine of x(i) and the
c       imaginary part c of y(i) to the sine of x(i), for i=1,..,n
      end subroutine vscosisin

      subroutine vsdiv (z, x, y, n)
        real*4 z(*), x(*), y(*)
        integer n
c       Sets z(i) to x(i)/y(i), for i=1,..,n
      end subroutine vsdiv

      subroutine vsexp (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the exponential function of x(i),
c       for i=1,..,n
      end subroutine vsexp

      subroutine vsexpm1 (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to (the exponential function of x(i))-1,
c       for i=1,..,n
      end subroutine vsexpm1

      subroutine vslog (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the natural logarithm of x(i), for i=1,..,n
      end subroutine vslog

      subroutine vslog10 (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the base-10 logarithm of x(i), for i=1,..,n
      end subroutine vslog10

      subroutine vslog1p (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the natural logarithm of (x(i)+1),
c       for i=1,..,n
      end subroutine vslog1p

      subroutine vspow (z, x, y, n)
        real*4 z(*), x(*), y(*)
        integer n
c       Sets z(i) to x(i) raised to the power y(i), for i=1,..,n
      end subroutine vspow

      subroutine vsqdrt (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the 4th root of x(i), for i=1,..,n
      end subroutine vsqdrt

      subroutine vsrcbrt (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of the cube root of x(i),
c       for i=1,..,n
      end subroutine vsrcbrt

      subroutine vsrec (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of x(i), for i=1,..,n
      end subroutine vsrec

      subroutine vsrqdrt (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of the 4th root of x(i),
c       for i=1,..,n
      end subroutine vsrqdrt

      subroutine vsrsqrt (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the reciprocal of the square root of x(i),
c       for i=1,..,n
      end subroutine vsrsqrt

      subroutine vssin (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the sine of x(i), for i=1,..,n
      end subroutine vssin

      subroutine vssincos (y, z, x, n)
        real*4 y(*), z(*), x(*)
        integer n
c       Sets y(i) to the sine of x(i) and z(i) to the cosine of x(i), c       i=1,..,n
      end subroutine vssincos

      subroutine vssinh (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the hyperbolic sine of x(i), for i=1,..,n
      end subroutine vssinh

      subroutine vssqrt (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the square root of x(i), for i=1,..,n
      end subroutine vssqrt

      subroutine vstan (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the tangent of x(i), for i=1,..,n
      end subroutine vstan

      subroutine vstanh (y, x, n)
        real*4 y(*), x(*)
        integer n
c       Sets y(i) to the hyperbolic tangent of x(i), for i=1,..,n
      end subroutine vstanh

      end interface

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c     Fortran interface block for MASS integer vector functions.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

      interface

      integer*4 function vpopcnt4 (x, n)
        integer*4 x(*), n
c       Returns the total number of 1 bits in the concatenation
c       of the binary representation of x(i), for i=1,...,n.
      end function vpopcnt4

      integer*4 function vpopcnt8 (x, n)
        integer*8 x(*), n
c       Returns the total number of 1 bits in the concatenation
c       of the binary representation of x(i), for i=1,...,n.
      end function vpopcnt8

      end interface


Cross Reference information
Segment Product Component Platform Version Edition
pSeries Unix Servers (incl pSeries Intellistation) pSeries - Enterprise Servers
Operating System Linux

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

Mathematical Acceleration Subsystem

Libraries


Software version:
4.4


Operating system(s):
Linux


Reference #:
7005473


Modified date:
2010-07-08

Translate my page

Content navigation