File: fdim.3

package info (click to toggle)
manpages-ja 0.5.0.0.20120606-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 25,964 kB
  • sloc: perl: 161; makefile: 116
file content (69 lines) | stat: -rw-r--r-- 2,527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.\" Copyright 2003 Walter Harms, Andries Brouwer
.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
.\"     <mtk.manpages@gmail.com>
.\" Distributed under GPL.
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH FDIM 3 2010\-09\-20 "" "Linux Programmer's Manual"
.SH 名前
fdim, fdimf, fdiml \- 正の差分を計算する
.SH 書式
\fB#include <math.h>\fP
.sp
\fBdouble fdim(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
.br
\fBfloat fdimf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
.br
\fBlong double fdiml(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
.sp
\fI\-lm\fP でリンクする。
.sp
.in -4n
glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
.in
.sp
.ad l
\fBfdimf\fP(), \fBfdiml\fP():
.RS 4
_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
.br
or \fIcc\ \-std=c99\fP
.RE
.ad
.SH 説明
これらの関数は、二つの引き数間の正の差分 max(\fIx\fP\-\fIy\fP,0) を返す。
.SH 返り値
成功すると、これらの関数は正の差分を返す。

\fIx\fP か \fIy\fP が NaN の場合、NaN が返される。

結果がオーバーフローする場合、範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP, \fBHUGE_VALF\fP,
\fBHUGE_VALL\fP を返す。
.SH エラー
これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
.PP
以下のエラーが発生する可能性がある。
.TP 
範囲エラー (range error): 結果のオーバーフロー
.\" .I errno
.\" is set to
.\" .BR ERANGE .
オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
.PP
.\" FIXME . Is it intentional that these functions do not set errno?
.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6796
これらの関数は \fIerrno\fP を設定しない。
.SH バージョン
これらの関数は glibc バージョン 2.1 で初めて登場した。
.SH 準拠
C99, POSIX.1\-2001.
.SH 関連項目
\fBfmax\fP(3)
.SH この文書について
この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。