valuesweight 0and > 0
ublice=E-10{} public e-5{vdm_al
functions staticpublic BMI : real* real -> real
BMI(weight, height) == let h100 = height / 100 in
weight / h100 ** 2 pre
weight > 0 and height > 0 post RESULT > 0;
\end{vdm_al}
\begin{vdm_al} staticpublic getWeightFromBMI : real * real -> real
getWeightFromBMI(height, aBMI) == let
f = lambda weight : real & aBMI - BMI(weight, height) in
newton(f)(60) pre
height > 0 and aBMI > 0 post abs(aBMI - BMI(RESULT, height)) <= e;
\endvdm_al
\beginvdm_al} staticpublic: ( ->real>realreal
newton(f)(x) == let isFinish = lambda y : real & abs(f(y)) < e,
nextApproximate= y : real y -(()/derivativey)in
Funtil]()(nextApproximatejava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
{}
\begin{vdm_al}
derivative :(java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
()x = (}
\begin{vdm_al
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.