Sun Studio 12: Fortran ライブラリ・リファレンス

1.3.1 単精度関数

これらの副プログラムは、単精度の数学関数およびサブルーチンです。

通常、次に示す数学単精度関数にアクセスする関数は、Fortran 規格の総称組み込み関数とは対応していません。データ型は通常の型決定規則によって決定されます。

デフォルトの型宣言を保持しているかぎり、REAL 文でこれらの関数の型を明示的に指定する必要はありません。r で始まる名前は REAL 型、i で始まる名前は INTEGER 型になります。

これらのルーチンの詳細については、C 数学ライブラリのマニュアルページ (3M) を参照してください。たとえば、r_acos(x) の場合は、マニュアルページの acos(3M) を参照します。

表 1–2 数学単精度関数

関数名 

結果の型 

説明 

r_acos( x )

r_acosd( x )

r_acosh( x )

r_acosp( x )

r_acospi( x )

REAL

REAL

REAL

REAL

REAL

逆余弦

--

逆双曲余弦

--

--

r_atan( x )

r_atand( x )

r_atanh( x )

r_atanp( x )

r_atanpi( x )

REAL

REAL

REAL

REAL

REAL

逆正接

--

逆双曲正接

--

--

r_asin( x )

r_asind( x )

r_asinh( x )

r_asinp( x )

r_asinpi( x )

REAL

REAL

REAL

REAL

REAL

逆正弦

--

逆双曲正弦

--

--

r_atan2(( y, x )

r_atan2d( y, x )

r_atan2pi( y, x )

REAL

REAL

REAL

逆正接

--

--

r_cbrt( x )

r_ceil( x )

r_copysign( x, y )

REAL

REAL

REAL

立方根

小数点以下切り上げ

--

r_cos( x )

r_cosd( x )

r_cosh( x )

r_cosp( x )

r_cospi( x )

REAL

REAL

REAL

REAL

REAL

余弦

--

双曲余弦

--

--

r_erf( x )

r_erfc( x )

REAL

REAL

誤差関数

--

r_expm1( x )

r_floor( x )

r_hypot( x, y )

r_infinity( )

REAL

REAL

REAL

REAL

(e**x)-1

小数点以下切捨て

斜辺

--

r_j0( x )

r_j1( x )

r_jn(n, x )

REAL

REAL

REAL

ベッセル関数--

--

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

--

--

--

--

--

--

--

--

--

--

r_addran()

r_addrans( x, p, l, u )

r_lcran()

r_lcrans( x, p, l, u )

r_shufrans(x, p, l, u)

REAL

サブルーチン

REAL

サブルーチン

サブルーチン

乱数発生関数

r_lgamma( x )

r_logb( x )

r_log1p( x )

r_log2( x )

REAL

REAL

REAL

REAL

ガンマの対数

--

--

--

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

 

r_sin( x )

r_sind( x )

r_sinh( x )

r_sinp( x )

r_sinpi( x )

REAL

REAL

REAL

REAL

REAL

正弦

--

双曲正弦

--

--

r_sincos( x, s, c )

r_sincosd( x, s, c )

r_sincosp( x, s, c )

r_sincospi( x, s, c )

サブルーチン

サブルーチン

サブルーチン

サブルーチン

正弦と余弦

--

--

--

r_tan( x )

r_tand( x )

r_tanh( x )

r_tanp( x )

r_tanpi( x )

REAL

REAL

REAL

REAL

REAL

正接

--

双曲正接

--

--

r_y0( x )

r_y1( x )

r_yn( n, x )

REAL

REAL

REAL

ベッセル関数

--

--

参照: intro(3M)、『数値計算ガイド