SlideServe
Menu
Préférences
© SlideServe · v2026

Writing Programs

hetal avatar
5 diapositives · 216 Views · Sep 09, 2014

Writing Programs. Comment Translation Progressive Envelopment. Bisection Method of Root Finding. Bisection. Algorithm Initialization Begin Loop Single step calculations e.g., X K = F(X K-1 ) Test for early exit End Loop. FORTRAN X = X0 DO K = 1, MAXK XT = X X = F(X)

Writing Programs - slide 1
01 / 5Writing Programs
1 / 17

Télécharger la présentation

Writing Programs
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Writing Programs • Comment Translation • Progressive Envelopment

  2. Bisection Method of Root Finding Bisection

  3. Algorithm Initialization Begin Loop Single step calculations e.g., XK = F(XK-1) Test for early exit End Loop FORTRAN X = X0 DO K = 1, MAXK XT = X X = F(X) PR = ABS( (XXT) / X ) IF( PR .LT. PRCSN ) GOTO 10 ENDDO 10 CONTINUE Iteration

  4. Comment Translation Initialize XL, XR Set KMAX, PRCSN Test F(XL) & F(XR) for early exit Begin Loop: Set XM Test F(XM) for early exit Choose new XL, XR End loop Exit: Output End Program Programs: HTMLDOC

  5. 10 CONTINUE WRITE(*,*) ‘Root at X = ‘, XM WRITE(*,*) ‘ F(X) = ‘, F(XM) END Progressive Envelopment XL = XR = DO K = 1, KMAX XM = ( XL+XR ) / 2. IF( F(XM) .LE. PRCSN ) GOTO 10 IF( F(XM)*F(XR) .LT. 0. ) XL = XM IF( F(XM)*F(XL) .LT. 0. ) XR = XM ENDDO ProgramGraph