Sun Studio 12: Fortran Library Reference

## 1.3.2 Double-Precision Functions

The following subprograms are double-precision math functions and subroutines.

In general, these functions do not correspond to standard Fortran generic intrinsic functions—data types are determined by the usual data typing rules.

These DOUBLE PRECISION functions need to appear in a DOUBLE PRECISION statement.

Refer to the C library man pages for details: the man page for d_acos(x) is acos(3M)

Table 1–3 Double Precision Math Functions

Function Name

Return Type

Description

d_acos( x )

d_acosd( x )

d_acosh( x )

d_acosp( x )

d_acospi( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

arc cosine

--

arc cosh

--

--

d_atan( x )

d_atand( x )

d_atanh( x )

d_atanp( x )

d_atanpi( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

arc tangent

--

arc tanh

--

--

d_asin( x )

d_asind( x )

d_asinh( x )

d_asinp( x )

d_asinpi( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

arc sine

--

arc sinh

--

--

d_atan2( y, x )

d_atan2d( y, x )

d_atan2pi( y, x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

arc tangent

--

--

d_cbrt( x )

d_ceil( x )

d_copysign( x, x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

cube root

ceiling

--

d_cos( x )

d_cosd( x )

d_cosh( x )

d_cosp( x )

d_cospi( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

cosine

--

hyperb cos

--

--

d_erf( x )

d_erfc( x )

DOUBLE PRECISION

DOUBLE PRECISION

error func

--

d_expm1( x )

d_floor( x )

d_hypot( x, y )

d_infinity( )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

(e**x)-1

floor

hypotenuse

--

d_j0( x )

d_j1( x )

d_jn(n, x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

Bessel

--

--

id_finite( x )

id_fp_class( x )

id_ilogb( x )

id_irint( x )

id_isinf( x )

id_isnan( x )

id_isnormal( x )

id_issubnormal( x )

id_iszero( x )

id_signbit( x )

INTEGER

INTEGER

INTEGER

INTEGER

INTEGER

INTEGER

INTEGER

INTEGER

INTEGER

INTEGER

d_lcran()

d_lcrans(x, p, l, u )

d_shufrans(x, p, l,u)

DOUBLE PRECISION

subroutine

DOUBLE PRECISION

subroutine

subroutine

random number generators

d_lgamma( x )

d_logb( x )

d_log1p( x )

d_log2( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

log gamma

--

--

--

d_max_normal()

d_max_subnormal()

d_min_normal()

d_min_subnormal()

d_nextafter( x, y )

d_quiet_nan( n )

d_remainder( x, y )

d_rint( x )

d_scalb( x, y )

d_scalbn( x, n )

d_signaling_nan( n )

d_significand( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

d_sin( x )

d_sind( x )

d_sinh( x )

d_sinp( x )

d_sinpi( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

sine

--

hyper sine

--

--

d_sincos( x, s, c )

d_sincosd( x, s, c )

d_sincosp( x, s, c )

d_sincospi( x, s, c )

subroutine

subroutine

subroutine

subroutine

sine & cosine

--

--

d_tan( x )

d_tand( x )

d_tanh( x )

d_tanp( x )

d_tanpi( x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

tangent

--

hyperb tan

--

--

d_y0( x )

d_y1( x )

d_yn( n, x )

DOUBLE PRECISION

DOUBLE PRECISION

DOUBLE PRECISION

bessel

--

--

• Variables c, l, p, s, u, x, and y are of type DOUBLE PRECISION. Variable n is of type INTEGER.

• Explicitly type these functions on a DOUBLE PRECISION statement or with an appropriate IMPLICIT statement).

• sind(x), asind(x), … take degrees rather than radians.