Reference/exp

From Kx Wiki
(Difference between revisions)
Jump to: navigation, search
(Initial version)
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= exp =
+
{{refheader|exp|exp function}}
  
This function computes e<sup>x</sup>, where e is the base of the natural logarithms. Integer arguments are promoted to floating point. Null is returned if the argument is null.
+
The <tt>exp</tt> function computes e<sup>x</sup>, where e is the base of natural logarithms. The result is type float.
 +
 
 +
== Syntax ==
 +
 
 +
<pre>
 +
q)r:exp X
 +
</pre>
 +
 
 +
== Example ==
  
 
<pre>
 
<pre>
Line 8: Line 16:
 
q)exp 0.5
 
q)exp 0.5
 
1.648721
 
1.648721
q)exp -4.2 0 0w 0.1
+
q)exp -4.2 0 0.1 0n 0w
0.01499558 1 0w 1.105171
+
0.01499558 1 1.105171 0n 0w
 
</pre>
 
</pre>
  
 
== See also ==
 
== See also ==
  
*[[log]]
+
*[[Reference/log|log]]
 +
*[[Reference/xexp|xexp]]
 +
*[[Reference/xlog|xlog]]
  
 
----
 
----
For a complete list of functions, see the [[Cookbook/FunctionReference|kdb+ Function Reference]].
+
For a complete list of functions, see the [[Reference|kdb+ Function Reference]].

Latest revision as of 04:48, 13 April 2010

Contents

exp (exp function)

The exp function computes ex, where e is the base of natural logarithms. The result is type float.

Syntax

q)r:exp X

Example

q)exp 1
2.718282
q)exp 0.5
1.648721
q)exp -4.2 0 0.1 0n 0w
0.01499558 1 1.105171 0n 0w

See also


For a complete list of functions, see the kdb+ Function Reference.

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox