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 2017-09-15 "" "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
36 These functions return the positive difference, max(\fIx\fP-\fIy\fP,0),
37 between their arguments.
39 On success, these functions return the positive difference.
45 is a NaN, a NaN is returned.
47 If the result overflows,
49 and the functions return
58 for information on how to determine whether an error has occurred
59 when calling these functions.
61 The following errors can occur:
63 Range error: result overflow
67 An overflow floating-point exception
71 These functions do not set
73 .\" FIXME . Is it intentional that these functions do not set errno?
74 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6796
76 These functions first appeared in glibc in version 2.1.
78 For an explanation of the terms used in this section, see
84 Interface Attribute Value
89 T} Thread safety MT-Safe
92 C99, POSIX.1-2001, POSIX.1-2008.