These subprograms are single-precision libm functions and subroutines.
In general, the functions below provide access to single-precision libm functions that do not correspond to standard FORTRAN generic intrinsic functions--data types are determined by the usual data typing rules.
Samples: Single-precision libm functions:
REAL c, s, x, y, z .. z = r_acosh( x ) i = ir_finite( x ) z = r_hypot( x, y ) z = r_infinity() CALL r_sincos( x, s, c )
These functions need not be explicitly typed with a REAL statement as long as default typing holds. (Variables beginning with "r" are REAL, with "i" are INTEGER.)
For details on these routines, see the C math library man pages (3M). For example, for r_acos(x) see the acos(3M) man page.
Table 1-7 Single-Precision libm functions
r_acos( x ) r_acosd( x ) r_acosh( x ) r_acosp( x ) r_acospi( x ) |
REAL REAL REAL REAL REAL |
Function Function Function Function Function |
arc cosine -- arc cosh -- -- |
r_atan( x ) r_atand( x ) r_atanh( x ) r_atanp( x ) r_atanpi( x ) |
REAL REAL REAL REAL REAL |
Function Function Function Function Function |
arc tangent -- arc tanh -- -- |
r_asin( x ) r_asind( x ) r_asinh( x ) r_asinp( x ) r_asinpi( x ) |
REAL REAL REAL REAL REAL |
Function Function Function Function Function |
arc sine -- arc sinh -- -- |
r_atan2(( y, x ) r_atan2d( y, x ) r_atan2pi( y, x ) |
REAL REAL REAL |
Function Function Function |
arc tangent -- -- |
r_cbrt( x ) r_ceil( x ) r_copysign( x, y ) |
REAL REAL REAL |
Function Function Function |
cube root ceiling -- |
r_cos( x ) r_cosd( x ) r_cosh( x ) r_cosp( x ) r_cospi( x ) |
REAL REAL REAL REAL REAL |
Function Function Function Function Function |
cosine -- hyperb cos -- -- |
r_erf( x ) r_erfc( x ) |
REAL REAL |
Function Function |
err function -- |
r_expm1( x ) r_floor( x ) r_hypot( x, y ) r_infinity( ) r_j0( x ) r_j1( x ) r_jn( x ) |
REAL REAL REAL REAL REAL REAL REAL |
Function Function Function Function Function Function Function |
(e**x)-1 floor hypotenuse bessel -- -- -- |
ir_finite( x ) ir_fp_class( x ) ir_ilogb( x ) ir_irint( x ) ir_isinf( x ) ir_isnan( x ) ir_isnormal( x ) ir_issubnormal( x ) ir_iszero( x ) ir_signbit( x ) |
INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER |
Function Function Function Function Function Function Function Function Function Function |
-- -- -- -- -- -- -- -- -- -- |
r_addran() r_addrans( x, p, l, u ) r_lcran() r_lcrans( x, p, l, u ) r_shufrans(x, p, l, u) |
REAl n/a REAL n/a n/a |
Function Subroutine Function Subroutine Subroutine |
random number -- -- -- -- |
r_lgamma( x ) r_logb( x ) r_log1p( x ) r_log2( x ) |
REAL REAL REAL REAL |
Function Function Function Function |
log gamma -- -- -- |
r_max_normal() r_max_subnormal() r_min_normal() r_min_subnormal() r_nextafter( x, y ) r_quiet_nan( n ) r_remainder( x, y ) r_rint( x ) r_scalb( x, y ) r_scalbn( x, n ) r_signaling_nan( n ) r_significand( x ) |
REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL |
Function Function Function Function Function Function Function Function Function Function Function Function |
|
r_sin( x ) r_sind( x ) r_sinh( x ) r_sinp( x ) r_sinpi( x ) |
REAL REAL REAL REAL REAL |
Function Function Function Function Function |
sine -- hyperb sin -- -- |
r_sincos( x, s, c ) r_sincosd( x, s, c ) r_sincosp( x, s, c ) r_sincospi( x, s, c ) |
n/a n/a n/a n/a |
Subroutine Subroutine Subroutine Subroutine |
sine & cosine -- -- -- |
r_tan( x ) r_tand( x ) r_tanh( x ) r_tanp( x ) r_tanpi( x ) |
REAL REAL REAL REAL REAL |
Function Function Function Function Function |
tangent -- hyperb tan -- -- |
r_y0( x ) r_y1( x ) r_yn( n, x ) |
REAL REAL REAL |
Function Function Function |
bessel -- -- |
Variables c, l, p, s, u, x, and y are of type REAL.
Type these functions as explicitly REAL if an IMPLICIT statement is in effect that types names starting with "r" to some other date type.
sind(x), asind(x), ... take degrees rather than radians.
See also: intro(3M) and the Numerical Computation Guide.