[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/numeric/math/fdim [Back]  [Original]

std::fdim cppreference.com
cppreference.com

std::fdim

cppreference.com

<metanoindex/>

 
C++
(C++20)
(C++20)
(C++11)
(C++20)
/
(C++11)
(C++11)
(C++11)
(C++17)
 
(C++17)
(C++20)
(C++11)
(C++11)
(C++17)
(C++17)
(C++20)
(C++20)
(C++11)
(C++17)
(C++20)
(C++23)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
 
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)
(C++11)
/
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
-
(C++11)(C++11)(C++11)(C++11)(C++11)
 
<tbody> </tbody>
float fdim( float x, float y );
(1) ( C++11)
double fdim( double x, double y );
(2) ( C++11)
long double fdim( long double x, long double y );
(3) ( C++11)
Promoted fdim( Arithmetic x, Arithmetic y );
(4) ( C++11)
x y.
:
Returns the positive difference between x and y.
Google.
. .
fmax (x - y, 0), x y, 0, x - y.
:
This could be implemented as fmax (x - y, 0), so if x y, the result is always equals to 0, otherwise it is x - y.
Google.
. .

4)

- , double. long double, long double, double.
:
If any argument has integral type, it is cast to double. If any other argument is long double, then the return type is long double, otherwise it is double.
Google.
. .

x, y
:
floating point value
Google.
. .

.
:
The positive difference value.
Google.
. .

.

(\(\small{|x|}\)|x|)
() []
(C++11)(C++11)(C++11)

() []

Web Proxy Viewer  |  New URL  |  Original Page