products/sources/formale Sprachen/Cobol/Test-Suite/SQL M/     Datei vom 4.1.2008 mit Größe 15 kB image not shown  

Quelle  Diet.vdmpp   Sprache: VDM

 
\section{Diet Calculation}

\begin{vdm_al}
class Diet

values
public e = 1E-10;
public h = 1e-5; 

functions
static public BMI : realreal -> real
BMI(weight, height) ==
 let h100 = height / 100 in\sectionDiet}
 weight  ** 2
pre Diet
  >0 height
post
 ublic   1;
\endvdm_al h = 1; 

\begin}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{}
let{vdm_al
static  newtonreal) -  -> java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 in
 newton(f)(60)
pre
 height > 0 and aBMI > 0
post  nextApproximate = lambda & fy  (f)(y) 
 [realisFinish)(x);
\end{vdm_al}

\begin{vdm_al}
static public newton: (real ->real) -> real -> real
newton(f)(x) ==
 let isFinish =\endvdm_al
staticpublic real -> real) ->real -> real
 Funtil[real](isFinish)(nextApproximate)(xderivativef(x) =f(x+h) - f(x)) / h ;
\end{vdm_al

begin}
\{vdm_alstatic  [@] @ >bool- T- T >@ - T
()x = (fx+)-fx)/h;
\ndvdm_al

\begin}
 Diet
Funtil(p)(f)(x) == if p(x) then x else Funtil[@T](p)(f)(f(x));
\end{vdm_al}

\begin{vdm_al}
end Diet
\end{vdm_al}

98%


¤ Dauer der Verarbeitung: 0.10 Sekunden  ¤

*© 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 ist noch experimentell.