.\" Copyright 2003 Walter Harms, Andries Brouwer .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" Distributed under GPL. .\" .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO .\" all rights reserved. .\" Translated Sat Jul 24 10:14:17 JST 2004 .\" by Yuichi SATO .\" Updated & Modified Mon Jan 10 08:17:08 JST 2005 by Yuichi SATO .\" Updated 2008-09-16, Akihiro MOTOKI .\" .TH FDIM 3 2010-09-20 "" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O fdim, fdimf, fdiml \- positive difference fdim, fdimf, fdiml \- 正の差分を計算する .\"O .SH SYNOPSIS .SH 書式 .B #include .sp .BI "double fdim(double " x ", double " y ); .br .BI "float fdimf(float " x ", float " y ); .br .BI "long double fdiml(long double " x ", long double " y ); .sp .\"O Link with \fI\-lm\fP. \fI-lm\fP でリンクする。 .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR fdimf (), .BR fdiml (): .RS 4 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .ad .\"O .SH DESCRIPTION .SH 説明 .\"O These functions return the positive difference, max(\fIx\fP-\fIy\fP,0), .\"O between their arguments. これらの関数は、二つの引き数間の正の差分 max(\fIx\fP-\fIy\fP,0) を返す。 .\"O .SH RETURN VALUE .SH 返り値 .\"O On success, these functions return the positive difference. 成功すると、これらの関数は正の差分を返す。 .\"O If .\"O .I x .\"O or .\"O .I y .\"O is a NaN, a NaN is returned. .I x か .I y が NaN の場合、NaN が返される。 .\"O If the result overflows, .\"O a range error occurs, .\"O and the functions return .\"O .BR HUGE_VAL , .\"O .BR HUGE_VALF , .\"O or .\"O .BR HUGE_VALL , .\"O respectively. 結果がオーバーフローする場合、範囲エラーが発生し、 各関数はそれぞれ .BR HUGE_VAL , .BR HUGE_VALF , .B HUGE_VALL を返す。 .\"O .SH ERRORS .SH エラー .\"O See .\"O .BR math_error (7) .\"O for information on how to determine whether an error has occurred .\"O when calling these functions. これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は .BR math_error (7) を参照のこと。 .PP .\"O The following errors can occur: 以下のエラーが発生する可能性がある。 .TP .\"O Range error: result overflow 範囲エラー (range error)、オーバーフローの場合 .\" .I errno .\" is set to .\" .BR ERANGE . .\"O An overflow floating-point exception .\"O .RB ( FE_OVERFLOW ) .\"O is raised. オーバーフロー浮動小数点例外 .RB ( FE_OVERFLOW ) が上がる。 .PP .\"O These functions do not set .\"O .IR errno . これらの関数は .I errno を設定しない。 .\" FIXME . Is it intentional that these functions do not set errno? .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6796 .\"O .SH VERSIONS .SH バージョン .\"O These functions first appeared in glibc in version 2.1. これらの関数は glibc バージョン 2.1 で初めて登場した。 .\"O .SH "CONFORMING TO" .SH 準拠 C99, POSIX.1-2001. .\"O .SH "SEE ALSO" .SH 関連項目 .BR fmax (3)