fdim : fdim « math.h « C Tutorial






ItemValue
Header filemath.h
Declarationfloat fdimf(float a, float b);
double fdim(double a, double b);
long double fdiml(long double a, long double b);
Returnreturns zero if a is less than or equal to b. Otherwise, returns a - b.


#include <math.h>
  #include <stdio.h>

  int main(void)
  {
    printf("%1.1f", fdimf (1.0, -1.0));

    return 0;
  }
2.0








19.20.fdim
19.20.1.fdim