fdim: returns zero if a is less than or equal to b. Otherwise, returns a - b : fdim « math.h « C / ANSI-C






fdim: returns zero if a is less than or equal to b. Otherwise, returns a - b


    

//Declaration: float fdimf(float a, float b); 
               double fdim(double a, double b); 
               long double fdiml(long double a, long double b);  
//Return:      returns 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
        */ 

           
       








Related examples in the same category