X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fmath%2Ffdim.c;h=5956e5f32a229043aaac23fd2f3b83f90cd0df8f;hp=99167630663c61ccf3908ee1416e3ec6123e940c;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/math/fdim.c b/functions/math/fdim.c index 9916763..5956e5f 100644 --- a/functions/math/fdim.c +++ b/functions/math/fdim.c @@ -1,19 +1,17 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * --------------------------------------------------------------------------*/ -// ---------------------------------------------------------------------------- -// C++ - -float fdim( float x, float y ) { /* TODO */ }; -long double fdim( long double x, long double y ) { /* TODO */ }; +double fdim( double x, double y ) { /* TODO */ }; -// ---------------------------------------------------------------------------- -// Standard C +/* Therx code +{ + return ( ( x - y ) < 1 ) ? 0 : x - y; +} +*/ -double fdim( double x, double y ) { /* TODO */ }; float fdimf( float x, float y ) { /* TODO */ }; long double fdiml( long double x, long double y ) { /* TODO */ };