1 .\" Copyright 2003 Walter Harms, Andries Brouwer
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
9 .TH FDIM 3 2015-04-19 "" "Linux Programmer's Manual"
11 fdim, fdimf, fdiml \- positive difference
15 .BI "double fdim(double " x ", double " y );
17 .BI "float fdimf(float " x ", float " y );
19 .BI "long double fdiml(long double " x ", long double " y );
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
32 _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
39 These functions return the positive difference, max(\fIx\fP-\fIy\fP,0),
40 between their arguments.
42 On success, these functions return the positive difference.
48 is a NaN, a NaN is returned.
50 If the result overflows,
52 and the functions return
61 for information on how to determine whether an error has occurred
62 when calling these functions.
64 The following errors can occur:
66 Range error: result overflow
70 An overflow floating-point exception
74 These functions do not set
76 .\" FIXME . Is it intentional that these functions do not set errno?
77 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6796
79 These functions first appeared in glibc in version 2.1.
81 For an explanation of the terms used in this section, see
87 Interface Attribute Value
92 T} Thread safety MT-Safe
95 C99, POSIX.1-2001, POSIX.1-2008.