| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
#include <stdio.h> // printf |
|---|
| 16 |
#include <math.h> // fabsl |
|---|
| 17 |
#include <float.h> // DBL_DIG |
|---|
| 18 |
#include <stdbool.h> // type boolean: bool |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
typedef long NombreEntier; |
|---|
| 27 |
typedef double NombreReel; |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
NombreReel Abs (NombreReel x) |
|---|
| 31 |
{ |
|---|
| 32 |
return fabs(x); |
|---|
| 33 |
} |
|---|
| 34 |
|
|---|
| 35 |
#define Precision 12 // MAX = 20 en long double |
|---|
| 36 |
#define PuissancePrecision 1e-12 // =1e-(Precision), MAX = -20 en long double |
|---|
| 37 |
#define AfficheExemple(A,B) printf (A); printf ("(%.3g) = %.12g\n",x,B(x)); |
|---|
| 38 |
|
|---|
| 39 |
NombreReel Racine (NombreReel x) |
|---|
| 40 |
{ |
|---|
| 41 |
|
|---|
| 42 |
if (x==0) return 0; |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
if (x==1) return 1; |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
if (x<0) { |
|---|
| 50 |
printf ("ERREUR Racine : Résultat complexe ... "); |
|---|
| 51 |
return -1; |
|---|
| 52 |
} |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
NombreReel Racine,SauveX; |
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
Racine = x; |
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
if (2<x) x /= 2; |
|---|
| 67 |
|
|---|
| 68 |
SauveX = x+1; |
|---|
| 69 |
while (PuissancePrecision<Abs(SauveX-x)) { |
|---|
| 70 |
SauveX = x; |
|---|
| 71 |
x = (x + Racine/x)/2; |
|---|
| 72 |
} |
|---|
| 73 |
|
|---|
| 74 |
return x; |
|---|
| 75 |
} |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
NombreReel Cos (NombreReel x) |
|---|
| 79 |
{ |
|---|
| 80 |
NombreReel |
|---|
| 81 |
ValCosinus, |
|---|
| 82 |
Xpuissance,Factoriel,i,Quotient; |
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
ValCosinus = 1; |
|---|
| 87 |
x = x*x; |
|---|
| 88 |
|
|---|
| 89 |
Xpuissance = x; |
|---|
| 90 |
Factoriel = 2; |
|---|
| 91 |
i = 2; |
|---|
| 92 |
Quotient = Xpuissance/Factoriel; |
|---|
| 93 |
|
|---|
| 94 |
do { |
|---|
| 95 |
ValCosinus = ValCosinus -Quotient; |
|---|
| 96 |
Xpuissance = Xpuissance*x; |
|---|
| 97 |
|
|---|
| 98 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 99 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 100 |
|
|---|
| 101 |
ValCosinus = ValCosinus +Xpuissance/Factoriel; |
|---|
| 102 |
Xpuissance = Xpuissance*x; |
|---|
| 103 |
|
|---|
| 104 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 105 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 106 |
Quotient = Xpuissance/Factoriel; |
|---|
| 107 |
} while (PuissancePrecision<Abs(Quotient)); |
|---|
| 108 |
|
|---|
| 109 |
return ValCosinus; |
|---|
| 110 |
} |
|---|
| 111 |
|
|---|
| 112 |
NombreReel Sin (NombreReel x) |
|---|
| 113 |
{ |
|---|
| 114 |
NombreReel |
|---|
| 115 |
ValSin, |
|---|
| 116 |
Xpuissance,Factoriel,i,Quotient; |
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 |
ValSin = x; |
|---|
| 121 |
Xpuissance = x*x*x; |
|---|
| 122 |
x = x*x; |
|---|
| 123 |
|
|---|
| 124 |
Factoriel = 6; |
|---|
| 125 |
i = 3; |
|---|
| 126 |
Quotient = Xpuissance/Factoriel; |
|---|
| 127 |
|
|---|
| 128 |
do { |
|---|
| 129 |
ValSin = ValSin -Quotient; |
|---|
| 130 |
Xpuissance = Xpuissance*x; |
|---|
| 131 |
|
|---|
| 132 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 133 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 134 |
|
|---|
| 135 |
ValSin = ValSin +Xpuissance/Factoriel; |
|---|
| 136 |
Xpuissance = Xpuissance*x; |
|---|
| 137 |
|
|---|
| 138 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 139 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 140 |
Quotient = Xpuissance/Factoriel; |
|---|
| 141 |
} while (PuissancePrecision<Abs(Quotient)); |
|---|
| 142 |
return ValSin; |
|---|
| 143 |
} |
|---|
| 144 |
|
|---|
| 145 |
NombreReel Tan (NombreReel x) |
|---|
| 146 |
{ |
|---|
| 147 |
NombreReel |
|---|
| 148 |
ValSin,ValCos, |
|---|
| 149 |
Xpuissance,Factoriel,i,Quotient; |
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
ValCos = 1; |
|---|
| 157 |
ValSin = x; |
|---|
| 158 |
Xpuissance = x*x; |
|---|
| 159 |
Factoriel = 2; |
|---|
| 160 |
i = 2; |
|---|
| 161 |
Quotient = Xpuissance/Factoriel; |
|---|
| 162 |
|
|---|
| 163 |
do { |
|---|
| 164 |
ValCos = ValCos -Quotient; |
|---|
| 165 |
Xpuissance = Xpuissance*x; |
|---|
| 166 |
|
|---|
| 167 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 168 |
|
|---|
| 169 |
ValSin = ValSin -(Xpuissance/Factoriel); |
|---|
| 170 |
Xpuissance = Xpuissance*x; |
|---|
| 171 |
|
|---|
| 172 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 173 |
|
|---|
| 174 |
ValCos = ValCos +(Xpuissance/Factoriel); |
|---|
| 175 |
Xpuissance = Xpuissance*x; |
|---|
| 176 |
|
|---|
| 177 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 178 |
|
|---|
| 179 |
ValSin = ValSin +(Xpuissance/Factoriel); |
|---|
| 180 |
Xpuissance = Xpuissance*x; |
|---|
| 181 |
|
|---|
| 182 |
i = i +1; Factoriel = Factoriel*i; |
|---|
| 183 |
|
|---|
| 184 |
Quotient = Xpuissance/Factoriel; |
|---|
| 185 |
} while (PuissancePrecision<Abs(Quotient)); |
|---|
| 186 |
|
|---|
| 187 |
return ValSin/ValCos; |
|---|
| 188 |
} |
|---|
| 189 |
|
|---|
| 190 |
|
|---|
| 191 |
|
|---|
| 192 |
NombreReel Exp (NombreReel x) |
|---|
| 193 |
{ |
|---|
| 194 |
NombreReel |
|---|
| 195 |
ValExp, |
|---|
| 196 |
Xpuissance,q,f,i; |
|---|
| 197 |
|
|---|
| 198 |
|
|---|
| 199 |
|
|---|
| 200 |
ValExp = 1; |
|---|
| 201 |
Xpuissance = x; |
|---|
| 202 |
f = 1; |
|---|
| 203 |
i = 1; |
|---|
| 204 |
|
|---|
| 205 |
q = Xpuissance/f; |
|---|
| 206 |
do { |
|---|
| 207 |
ValExp = ValExp +q; |
|---|
| 208 |
Xpuissance = Xpuissance*x; |
|---|
| 209 |
i = i +1; |
|---|
| 210 |
f = f*i; |
|---|
| 211 |
q = Xpuissance/f; |
|---|
| 212 |
} while (PuissancePrecision<Abs(q)); |
|---|
| 213 |
|
|---|
| 214 |
return ValExp; |
|---|
| 215 |
} |
|---|
| 216 |
|
|---|
| 217 |
NombreReel Ln (NombreReel x) |
|---|
| 218 |
{ |
|---|
| 219 |
NombreReel |
|---|
| 220 |
ValLn, |
|---|
| 221 |
Xpuissance,q,f,i; |
|---|
| 222 |
bool |
|---|
| 223 |
ResultatOppose; |
|---|
| 224 |
|
|---|
| 225 |
|
|---|
| 226 |
|
|---|
| 227 |
|
|---|
| 228 |
|
|---|
| 229 |
|
|---|
| 230 |
|
|---|
| 231 |
|
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 |
if (x==1) return 0; |
|---|
| 235 |
|
|---|
| 236 |
|
|---|
| 237 |
if (x<=0) { |
|---|
| 238 |
printf ("La fonction LN n'est pas definie sur ]-inf,0] !\n"); |
|---|
| 239 |
return 0; |
|---|
| 240 |
} |
|---|
| 241 |
|
|---|
| 242 |
|
|---|
| 243 |
if (1<x) { |
|---|
| 244 |
x = 1/x; |
|---|
| 245 |
ResultatOppose = true; |
|---|
| 246 |
} else ResultatOppose = false; |
|---|
| 247 |
|
|---|
| 248 |
|
|---|
| 249 |
x--; |
|---|
| 250 |
|
|---|
| 251 |
|
|---|
| 252 |
ValLn = 0; |
|---|
| 253 |
Xpuissance = x; |
|---|
| 254 |
i = 1; |
|---|
| 255 |
|
|---|
| 256 |
q = Xpuissance/i; |
|---|
| 257 |
do { |
|---|
| 258 |
ValLn += q; |
|---|
| 259 |
Xpuissance *= x; |
|---|
| 260 |
i++; |
|---|
| 261 |
|
|---|
| 262 |
ValLn -= Xpuissance/i; |
|---|
| 263 |
Xpuissance *= x; |
|---|
| 264 |
i++; |
|---|
| 265 |
|
|---|
| 266 |
q = Xpuissance/i; |
|---|
| 267 |
} while (PuissancePrecision<Abs(q)); |
|---|
| 268 |
|
|---|
| 269 |
if (ResultatOppose) |
|---|
| 270 |
return (-ValLn); |
|---|
| 271 |
else |
|---|
| 272 |
return ValLn; |
|---|
| 273 |
|
|---|
| 274 |
} |
|---|
| 275 |
|
|---|
| 276 |
|
|---|
| 277 |
NombreReel ArcSin (NombreReel x) |
|---|
| 278 |
{ |
|---|
| 279 |
NombreReel |
|---|
| 280 |
ValArcSin,k,xp,q; |
|---|
| 281 |
NombreEntier si1,si2; |
|---|
| 282 |
|
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 |
|
|---|
| 286 |
|
|---|
| 287 |
|
|---|
| 288 |
|
|---|
| 289 |
|
|---|
| 290 |
ValArcSin = x; |
|---|
| 291 |
k = 1; |
|---|
| 292 |
xp = x; |
|---|
| 293 |
si1 = 1; |
|---|
| 294 |
si2 = 2; |
|---|
| 295 |
x = x*x; |
|---|
| 296 |
q = 1; |
|---|
| 297 |
|
|---|
| 298 |
do { |
|---|
| 299 |
k = k*si1/si2; |
|---|
| 300 |
si1 += 2; |
|---|
| 301 |
si2 += 2; |
|---|
| 302 |
xp = xp*x; |
|---|
| 303 |
q = xp*k/si1; |
|---|
| 304 |
ValArcSin = ValArcSin +q; |
|---|
| 305 |
} while (PuissancePrecision<Abs(q)); |
|---|
| 306 |
|
|---|
| 307 |
return ValArcSin; |
|---|
| 308 |
} |
|---|
| 309 |
|
|---|
| 310 |
NombreReel ArcCos (NombreReel x) |
|---|
| 311 |
{ |
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
return M_PI/2 -ArcSin(x); |
|---|
| 315 |
} |
|---|
| 316 |
|
|---|
| 317 |
NombreReel ArcTan (NombreReel x) |
|---|
| 318 |
{ |
|---|
| 319 |
NombreReel |
|---|
| 320 |
ValArcTan, |
|---|
| 321 |
Xpuissance,Denominateur,Quotient; |
|---|
| 322 |
|
|---|
| 323 |
|
|---|
| 324 |
|
|---|
| 325 |
|
|---|
| 326 |
if (1<=x) { |
|---|
| 327 |
printf (" <-OVERFLOW-> "); |
|---|
| 328 |
return 0; |
|---|
| 329 |
} |
|---|
| 330 |
|
|---|
| 331 |
|
|---|
| 332 |
ValArcTan = 0; |
|---|
| 333 |
Xpuissance = x; |
|---|
| 334 |
Denominateur = 1; |
|---|
| 335 |
Quotient = Xpuissance/Denominateur; |
|---|
| 336 |
x = x*x; |
|---|
| 337 |
|
|---|
| 338 |
|
|---|
| 339 |
do { |
|---|
| 340 |
ValArcTan = ValArcTan +Quotient; |
|---|
| 341 |
Xpuissance = Xpuissance*x; |
|---|
| 342 |
|
|---|
| 343 |
Denominateur = Denominateur+2; |
|---|
| 344 |
|
|---|
| 345 |
ValArcTan = ValArcTan -Xpuissance/Denominateur; |
|---|
| 346 |
Xpuissance = Xpuissance*x; |
|---|
| 347 |
|
|---|
| 348 |
Denominateur = Denominateur+2; |
|---|
| 349 |
Quotient = Xpuissance/Denominateur; |
|---|
| 350 |
} while (PuissancePrecision<Abs(Quotient)); |
|---|
| 351 |
|
|---|
| 352 |
|
|---|
| 353 |
return ValArcTan; |
|---|
| 354 |
} |
|---|
| 355 |
|
|---|
| 356 |
NombreReel CosH (NombreReel x) |
|---|
| 357 |
{ |
|---|
| 358 |
NombreReel |
|---|
| 359 |
ValCosH, |
|---|
| 360 |
Xpuissance,Factoriel,i,Quotient; |
|---|
| 361 |
|
|---|
| 362 |
|
|---|
| 363 |
|
|---|
| 364 |
|
|---|
| 365 |
ValCosH = 1; |
|---|
| 366 |
x = x*x; |
|---|
| 367 |
|
|---|
| 368 |
Xpuissance = x; |
|---|
| 369 |
Factoriel = 2; |
|---|
| 370 |
i = 3; |
|---|
| 371 |
Quotient = Xpuissance/Factoriel; |
|---|
| 372 |
|
|---|
| 373 |
do { |
|---|
| 374 |
ValCosH = ValCosH +Quotient; |
|---|
| 375 |
Xpuissance = Xpuissance*x; |
|---|
| 376 |
|
|---|
| 377 |
Factoriel = Factoriel*i*(i+1); |
|---|
| 378 |
i = i +2; |
|---|
| 379 |
|
|---|
| 380 |
Quotient = Xpuissance/Factoriel; |
|---|
| 381 |
} while (PuissancePrecision<Abs(Quotient)); |
|---|
| 382 |
|
|---|
| 383 |
return ValCosH; |
|---|
| 384 |
} |
|---|
| 385 |
|
|---|
| 386 |
NombreReel SinH (NombreReel x) |
|---|
| 387 |
{ |
|---|
| 388 |
NombreReel |
|---|
| 389 |
ValSinH, |
|---|
| 390 |
Xpuissance,Factoriel,i,Quotient; |
|---|
| 391 |
|
|---|
| 392 |
|
|---|
| 393 |
|
|---|
| 394 |
|
|---|
| 395 |
ValSinH = x; |
|---|
| 396 |
Xpuissance = x*x*x; |
|---|
| 397 |
x = x*x; |
|---|
| 398 |
|
|---|
| 399 |
Factoriel = 6; |
|---|
| 400 |
i = 4; |
|---|
| 401 |
Quotient = Xpuissance/Factoriel; |
|---|
| 402 |
|
|---|
| 403 |
do { |
|---|
| 404 |
ValSinH = ValSinH +Quotient; |
|---|
| 405 |
Xpuissance = Xpuissance*x; |
|---|
| 406 |
|
|---|
| 407 |
Factoriel = Factoriel*i*(i+1); |
|---|
| 408 |
i = i +2; |
|---|
| 409 |
|
|---|
| 410 |
Quotient = Xpuissance/Factoriel; |
|---|
| 411 |
} while (PuissancePrecision<Abs(Quotient)); |
|---|
| 412 |
|
|---|
| 413 |
return ValSinH; |
|---|
| 414 |
} |
|---|
| 415 |
|
|---|
| 416 |
NombreReel TanH (NombreReel x) |
|---|
| 417 |
{ |
|---|
| 418 |
|
|---|
| 419 |
|
|---|
| 420 |
return SinH(x)/CosH(x); |
|---|
| 421 |
} |
|---|
| 422 |
|
|---|
| 423 |
|
|---|
| 424 |
|
|---|
| 425 |
NombreReel ArcCosH (NombreReel x) |
|---|
| 426 |
{ |
|---|
| 427 |
|
|---|
| 428 |
x += Racine(x*x-1); |
|---|
| 429 |
return Ln(x); |
|---|
| 430 |
} |
|---|
| 431 |
|
|---|
| 432 |
NombreReel ArcSinH (NombreReel x) |
|---|
| 433 |
{ |
|---|
| 434 |
NombreReel |
|---|
| 435 |
ValArcSinH,Rapport,XPuissance,Total; |
|---|
| 436 |
NombreEntier |
|---|
| 437 |
Impair,Pair; |
|---|
| 438 |
|
|---|
| 439 |
|
|---|
| 440 |
|
|---|
| 441 |
|
|---|
| 442 |
|
|---|
| 443 |
|
|---|
| 444 |
|
|---|
| 445 |
|
|---|
| 446 |
XPuissance = x*x*x; |
|---|
| 447 |
ValArcSinH = x-XPuissance/6; |
|---|
| 448 |
Rapport = (NombreReel)(1*3)/(2*4); |
|---|
| 449 |
Impair = 5; |
|---|
| 450 |
Pair = 6; |
|---|
| 451 |
x= x*x; |
|---|
| 452 |
XPuissance = XPuissance*x; |
|---|
| 453 |
Total = XPuissance/Impair*Rapport; |
|---|
| 454 |
do { |
|---|
| 455 |
ValArcSinH = ValArcSinH +Total; |
|---|
| 456 |
Rapport = Rapport*Impair/Pair; |
|---|
| 457 |
Impair += 2; |
|---|
| 458 |
Pair += 2; |
|---|
| 459 |
XPuissance = XPuissance*x; |
|---|
| 460 |
|
|---|
| 461 |
ValArcSinH = ValArcSinH -XPuissance/Impair*Rapport; |
|---|
| 462 |
Rapport = Rapport*Impair/Pair; |
|---|
| 463 |
Impair += 2; |
|---|
| 464 |
Pair += 2; |
|---|
| 465 |
XPuissance = XPuissance*x; |
|---|
| 466 |
|
|---|
| 467 |
Total = XPuissance/Impair*Rapport; |
|---|
| 468 |
} while (PuissancePrecision<Abs(Total)); |
|---|
| 469 |
|
|---|
| 470 |
return ValArcSinH; |
|---|
| 471 |
} |
|---|
| 472 |
|
|---|
| 473 |
NombreReel ArcTanH (NombreReel x) |
|---|
| 474 |
{ |
|---|
| 475 |
NombreReel |
|---|
| 476 |
ValArcTanH,XPuissance,Quotient; |
|---|
| 477 |
NombreEntier d; |
|---|
| 478 |
|
|---|
| 479 |
|
|---|
| 480 |
|
|---|
| 481 |
if ((x<=-1) || (1<=x)) { |
|---|
| 482 |
printf ("x doit appartenir à ]-1,1[ !!!\n"); |
|---|
| 483 |
return 0; |
|---|
| 484 |
} |
|---|
| 485 |
|
|---|
| 486 |
ValArcTanH = x; |
|---|
| 487 |
XPuissance = x*x*x; |
|---|
| 488 |
x= x*x; |
|---|
| 489 |
d = 3; |
|---|
| 490 |
Quotient = XPuissance/d; |
|---|
| 491 |
do { |
|---|
| 492 |
ValArcTanH = ValArcTanH +Quotient; |
|---|
| 493 |
XPuissance = XPuissance*x; |
|---|
| 494 |
d += 2; |
|---|
| 495 |
Quotient = XPuissance/d; |
|---|
| 496 |
} while (PuissancePrecision<Abs(Quotient)); |
|---|
| 497 |
|
|---|
| 498 |
return ValArcTanH; |
|---|
| 499 |
} |
|---|
| 500 |
|
|---|
| 501 |
|
|---|
| 502 |
|
|---|
| 503 |
int main(int argc, char* argv[]) |
|---|
| 504 |
{ |
|---|
| 505 |
NombreReel x,e; |
|---|
| 506 |
printf (">>> Precision = %u (=nombre de chiffres significatifs) <<<\n\n",Precision); |
|---|
| 507 |
|
|---|
| 508 |
x = 1; AfficheExemple ("Exp",Exp); |
|---|
| 509 |
x = 2; AfficheExemple ("Exp",Exp); |
|---|
| 510 |
x = 2; AfficheExemple ("Ln",Ln); |
|---|
| 511 |
x = 3; AfficheExemple ("Ln",Ln); |
|---|
| 512 |
printf ("\n"); |
|---|
| 513 |
getchar (); |
|---|
| 514 |
|
|---|
| 515 |
|
|---|
| 516 |
x = 0.123; AfficheExemple ("Cos",Cos); |
|---|
| 517 |
x = 0.456; AfficheExemple ("Cos",Cos); |
|---|
| 518 |
x = 0.789; AfficheExemple ("Cos",Cos); |
|---|
| 519 |
printf ("\n"); |
|---|
| 520 |
x = 0.123; AfficheExemple ("Sin",Sin); |
|---|
| 521 |
x = 0.456; AfficheExemple ("Sin",Sin); |
|---|
| 522 |
x = 0.789; AfficheExemple ("Sin",Sin); |
|---|
| 523 |
printf ("\n"); |
|---|
| 524 |
x = 0.123; AfficheExemple ("Tan",Tan); |
|---|
| 525 |
x = 0.456; AfficheExemple ("Tan",Tan); |
|---|
| 526 |
x = 0.789; AfficheExemple ("Tan",Tan); |
|---|
| 527 |
printf ("\n"); |
|---|
| 528 |
getchar (); |
|---|
| 529 |
|
|---|
| 530 |
|
|---|
| 531 |
x = 0.123; AfficheExemple ("ArcCos",ArcCos); |
|---|
| 532 |
x = 0.456; AfficheExemple ("ArcCos",ArcCos); |
|---|
| 533 |
x = 0.789; AfficheExemple ("ArcCos",ArcCos); |
|---|
| 534 |
printf ("\n"); |
|---|
| 535 |
x = 0.123; AfficheExemple ("ArcSin",ArcSin); |
|---|
| 536 |
x = 0.456; AfficheExemple ("ArcSin",ArcSin); |
|---|
| 537 |
x = 0.789; AfficheExemple ("ArcSin",ArcSin); |
|---|
| 538 |
printf ("\n"); |
|---|
| 539 |
x = 0.123; AfficheExemple ("ArcTan",ArcTan); |
|---|
| 540 |
x = 0.456; AfficheExemple ("ArcTan",ArcTan); |
|---|
| 541 |
x = 0.789; AfficheExemple ("ArcTan",ArcTan); |
|---|
| 542 |
printf ("\n"); |
|---|
| 543 |
getchar (); |
|---|
| 544 |
|
|---|
| 545 |
|
|---|
| 546 |
x = 0.123; AfficheExemple ("CosH",CosH); |
|---|
| 547 |
x = 0.456; AfficheExemple ("CosH",CosH); |
|---|
| 548 |
x = 0.789; AfficheExemple ("CosH",CosH); |
|---|
| 549 |
printf ("\n"); |
|---|
| 550 |
x = 0.123; AfficheExemple ("SinH",SinH); |
|---|
| 551 |
x = 0.456; AfficheExemple ("SinH",SinH); |
|---|
| 552 |
x = 0.789; AfficheExemple ("SinH",SinH); |
|---|
| 553 |
printf ("\n"); |
|---|
| 554 |
x = 0.123; AfficheExemple ("TanH",TanH); |
|---|
| 555 |
x = 0.456; AfficheExemple ("TanH",TanH); |
|---|
| 556 |
x = 0.789; AfficheExemple ("TanH",TanH); |
|---|
| 557 |
printf ("\n"); |
|---|
| 558 |
getchar (); |
|---|
| 559 |
|
|---|
| 560 |
|
|---|
| 561 |
x = 0.123; AfficheExemple ("ArcCosH",ArcCosH); |
|---|
| 562 |
x = 0.456; AfficheExemple ("ArcCosH",ArcCosH); |
|---|
| 563 |
x = 0.789; AfficheExemple ("ArcCosH",ArcCosH); |
|---|
| 564 |
printf ("\n"); |
|---|
| 565 |
x = 0.123; AfficheExemple ("ArcSinH",ArcSinH); |
|---|
| 566 |
x = 0.456; AfficheExemple ("ArcSinH",ArcSinH); |
|---|
| 567 |
x = 0.789; AfficheExemple ("ArcSinH",ArcSinH); |
|---|
| 568 |
printf ("\n"); |
|---|
| 569 |
x = 0.123; AfficheExemple ("ArcTanH",ArcTanH); |
|---|
| 570 |
x = 0.456; AfficheExemple ("ArcTanH",ArcTanH); |
|---|
| 571 |
x = 0.789; AfficheExemple ("ArcTanH",ArcTanH); |
|---|
| 572 |
printf ("\n"); |
|---|
| 573 |
getchar(); |
|---|
| 574 |
|
|---|
| 575 |
|
|---|
| 576 |
x = 2; AfficheExemple ("Racine",Racine); |
|---|
| 577 |
x = 3; AfficheExemple ("Racine",Racine); |
|---|
| 578 |
x = 4; AfficheExemple ("Racine",Racine); |
|---|
| 579 |
printf ("\n"); |
|---|
| 580 |
|
|---|
| 581 |
|
|---|
| 582 |
printf ("PI = %.12g (= ArcTan(1/2)+ArcTan(1/3))\n",(4*(ArcTan ((NombreReel)1/2)+ArcTan((NombreReel)1/3)))); |
|---|
| 583 |
getchar (); |
|---|
| 584 |
return 0; |
|---|
| 585 |
} |
|---|
| 586 |
|
|---|