Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Cobol/verschiedene-Autoren/Wirth/   (Columbo Version 0.7©)  Datei vom 16.4.2008 mit Größe 764 B image not shown  

Quelle  root.cob   Sprache: Cobol

 
       identification division.
       program-id. root.
      *  aus Wirth, systematisches Programmieren p. 63 
       author"JD".
       date-written. 15.8.2007.
       date-compiled.
       data division.
       working-storage section.
       77 c   pic 9(4)V9(4).
       77 eps pic 9(4)V9(4) value 0.001.
       linkage section.
       77 x   pic 9(4)V9(4).
       77 a   pic 9(4)V9(4).
       procedure division using x returning a.
      * computes sqrt(x), 0<x<2
         move x to a
         subtract x from 1 giving c
         perform until c<=eps
      *    a*a=x*(1-c), c>=0
           compute a = a*(1+0.5*c)
           compute c = c*c*(0.75+0.25*c)
         end-perform.
      *  x*(1-eps)/x<=a*a<x.
        end-program root.

Messung V0.5
C=84 H=100 G=92

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.