Example 3 (3)
Implementation in Java:
static float sqrt (float a) {// Compute approximately the square root of positive real number a. float r = (1.0 + a)/2; while (Math.abs(r*r/a - 1.0) >= 0.00005) r = (r + a/r)/2; return r;}
Diapositive précédente
Diapositive suivante
Revenir à la première diapositive
Afficher la version graphique