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 2013-07-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 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
33 _POSIX_C_SOURCE\ >=\ 200112L;
40 These functions return the positive difference, max(\fIx\fP-\fIy\fP,0),
41 between their arguments.
43 On success, these functions return the positive difference.
49 is a NaN, a NaN is returned.
51 If the result overflows,
53 and the functions return
62 for information on how to determine whether an error has occurred
63 when calling these functions.
65 The following errors can occur:
67 Range error: result overflow
71 An overflow floating-point exception
75 These functions do not set
77 .\" FIXME . Is it intentional that these functions do not set errno?
78 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6796
80 These functions first appeared in glibc in version 2.1.
82 .SS Multithreading (see pthreads(7))
88 functions are thread-safe.
94 This page is part of release 3.75 of the Linux
97 A description of the project,
98 information about reporting bugs,
99 and the latest version of this page,
101 \%http://www.kernel.org/doc/man\-pages/.