←to practical programming

Exercise "math"

  1. Calculate, using mathematical functions form <math.h> and <complex.h> (or <tgmath.h>); :

    Hints:

  2. Find out how many signigicant digits can variables of types float, double, and long double hold in them by calculating the ratio 1/9 with the corresponding precision and then printing out the result. Something like
    float x_float = 1.f/9;
    double x_double = 1./9;
    long double x_long_double = 1.L/9;
    
    Print these numbers with format placeholders "%.25g" for float, "%.25lg" for double, "%.25Lg" for long double.