```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 ``` ```#include #include static double rt_powd_snf(double u0, double u1); static double rt_powd_snf(double u0, double u1) { double y; double d0; double d1; if (rtIsNaN(u0) || rtIsNaN(u1)) { y = rtNaN; } else { d0 = fabs(u0); d1 = fabs(u1); if (rtIsInf(u1)) { if (d0 == 1.0) { y = rtNaN; } else if (d0 > 1.0) { if (u1 > 0.0) { y = rtInf; } else { y = 0.0; } } else if (u1 > 0.0) { y = 0.0; } else { y = rtInf; } } else if (d1 == 0.0) { y = 1.0; } else if (d1 == 1.0) { if (u1 > 0.0) { y = u0; } else { y = 1.0 / u0; } } else if (u1 == 2.0) { y = u0 * u0; } else if ((u1 == 0.5) && (u0 >= 0.0)) { y = sqrt(u0); } else if ((u0 < 0.0) && (u1 > floor(u1))) { y = rtNaN; } else { y = pow(u0, u1); } } return y; } void prob1(double n, double App[3]) { double s; int i; /* Ceci est un fichier fonction qui calcule la valeur de pi */ /* avec une série énoncée dans le TP au problème 1. */ s = 0.0; for (i = 0; i < (int)n; i++) { s += 4.0 * (rt_powd_snf(-1.0, (1.0 + (double)i) - 1.0) / (2.0 * (1.0 + (double)i) - 1.0)); } App[0] = n; App[1] = s; App[2] = fabs((s - 3.1415926535897931) / 3.1415926535897931); ```
 ```1 2 3 4 5 6 7 ``` ```In function 'rt_powd_snf': Line 10: error: 'rtNaN' undeclared (first use in this function) Line 10: error: (Each undeclared identifier is reported only once Line 10: error: for each function it appears in.) Line 19: error: 'rtInf' undeclared (first use in this function) In function 'prob1': Line 61: error: expected declaration or statement at end of input ```