Real constants and functions: Difference between revisions

Content added Content deleted
(→‎{{header|BASIC}}: Added ANSI BASIC.)
 
Line 3,364: Line 3,364:


=={{header|Standard ML}}==
=={{header|Standard ML}}==
<syntaxhighlight lang="sml">Math.e; (* e *)
<syntaxhighlight lang="sml">Math.e (* e *)
Math.pi; (* pi *)
Math.pi (* pi *)
Math.sqrt x; (* square root *)
(* Math.tau also available in some implementations *)
Math.sqrt x (* square root *)
Math.ln x; (* natural logarithm--log base 10 also available (Math.log10) *)
Math.ln x (* natural logarithm--log base 10 also available (Math.log10) *)
Math.exp x; (* exponential *)
abs x; (* absolute value *)
Math.exp ; (* exponential *)
floor x; (* floor *)
abs x (* absolute value *)
ceil x; (* ceiling *)
floor x (* floor *)
Math.pow (x, y); (* power *)
ceil x (* ceiling *)
Math.pow (x, y) (* power *)
~ x; (* negation *)</syntaxhighlight>
~x (* negation *)</syntaxhighlight>


=={{header|Stata}}==
=={{header|Stata}}==