-- VDMTools STANDARD LIBRARY: MATH -- -------------------------------------------- -- -- Standard library for the VDMTools Interpreter. When the interpreter -- evaluates the preliminary functions/operations in this file, -- corresponding internal functions is called instead of issuing a run -- time error. Signatures should not be changed, as well as name of -- module (VDM-SL) or class (VDM++). Pre/post conditions is -- fully user customisable. -- Dont care's may NOT be used in the parameter lists.
publicstatic
cos:real +> real
cos(v) == isnotyetspecified postabsRESULT <= 1;
publicstatic
tan:real -> real
tan(a) == isnotyetspecified pre cos(a) <> 0;
publicstatic
cot:real -> real
cot(a) == isnotyetspecified-- Could also be: 1/tan(r) pre sin(a) <> 0;
publicstatic
asin:real -> real
asin(a) == isnotyetspecified preabs a <= 1;
publicstatic
acos:real -> real
acos(a) == isnotyetspecified preabs a <= 1;
publicstatic
atan:real +> real
atan(v) == isnotyetspecified;
publicstatic
acot:real +> real
acot(a) ==
atan(1/a) pre a <> 0;
publicstatic
sqrt:real -> real
sqrt(a) == isnotyetspecified pre a >= 0;
publicstatic
pi_f:() +> real
pi_f () == isnotyetspecified
operations
publicstatic
srand:int ==> ()
srand(a) == let - = MATH`srand2(a) inskip pre a >= -1;
publicstatic
rand:int ==> int
rand(a) == isnotyetspecified;
publicstatic
srand2:int ==> int
srand2(a) == isnotyetspecified pre a >= -1
functions
publicstatic
exp:real +> real
exp(a) == isnotyetspecified;
publicstatic
ln:real -> real
ln(a) == isnotyetspecified pre a > 0;
publicstatic
log:real -> real
log(a) == isnotyetspecified pre a > 0;
values public
pi = 3.14159265358979323846
end MATH
¤ 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.0.14Bemerkung:
(vorverarbeitet)
¤
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.