43 lines
605 B
Text
43 lines
605 B
Text
/* real constants and functions, in JSI */
|
|
var x, y;
|
|
|
|
;Math.E;
|
|
;Math.PI;
|
|
|
|
;x = 100.0;
|
|
;Math.sqrt(x);
|
|
;Math.log(x);
|
|
|
|
;x = 2.0;
|
|
;Math.exp(x);
|
|
|
|
;x = -x;
|
|
;Math.abs(x);
|
|
|
|
;x = 42.42;
|
|
;Math.floor(x);
|
|
;Math.ceil(x);
|
|
|
|
;x = 10.0;
|
|
;y = 5;
|
|
;Math.pow(x,y);
|
|
|
|
/*
|
|
=!EXPECTSTART!=
|
|
Math.E ==> 2.718281828459045
|
|
Math.PI ==> 3.141592653589793
|
|
x = 100.0 ==> 100
|
|
Math.sqrt(x) ==> 10
|
|
Math.log(x) ==> 4.605170185988092
|
|
x = 2.0 ==> 2
|
|
Math.exp(x) ==> 7.38905609893065
|
|
x = -x ==> -2
|
|
Math.abs(x) ==> 2
|
|
x = 42.42 ==> 42.42
|
|
Math.floor(x) ==> 42
|
|
Math.ceil(x) ==> 43
|
|
x = 10.0 ==> 10
|
|
y = 5 ==> 5
|
|
Math.pow(x,y) ==> 100000
|
|
=!EXPECTEND!=
|
|
*/
|