doc-exports/docs/dli/sqlreference/dli_spark_exp.html
Su, Xiaomeng 76a5b1ee83 dli_sqlreference_20240227
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-03-27 22:02:33 +00:00

50 lines
4.8 KiB
HTML

<a name="dli_spark_exp"></a><a name="dli_spark_exp"></a>
<h1 class="topictitle1">exp</h1>
<div id="body8662426"><p id="dli_spark_exp__en-us_topic_0000001696401509_p18471163815215">This function is used to return the value of <strong id="dli_spark_exp__en-us_topic_0000001696401509_b1697671816378">e</strong> raised to the power of <strong id="dli_spark_exp__en-us_topic_0000001696401509_b16622422173720">a</strong>.</p>
<div class="section" id="dli_spark_exp__en-us_topic_0000001696401509_section45291954203217"><h4 class="sectiontitle">Syntax</h4><pre class="screen" id="dli_spark_exp__en-us_topic_0000001696401509_screen19928459112517">exp(DOUBLE a)</pre>
</div>
<div class="section" id="dli_spark_exp__en-us_topic_0000001696401509_section992014913317"><h4 class="sectiontitle">Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_spark_exp__en-us_topic_0000001696401509_table1829154762513" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter</caption><thead align="left"><tr id="dli_spark_exp__en-us_topic_0000001696401509_row8830104792517"><th align="left" class="cellrowborder" valign="top" width="18.310000000000002%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_spark_exp__en-us_topic_0000001696401509_p983074711252">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.35%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_spark_exp__en-us_topic_0000001696401509_p6830124732517">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.57%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_spark_exp__en-us_topic_0000001696401509_p13318164512614">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.77%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_spark_exp__en-us_topic_0000001696401509_p08301547132513">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_spark_exp__en-us_topic_0000001696401509_row15830184792511"><td class="cellrowborder" valign="top" width="18.310000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_spark_exp__en-us_topic_0000001696401509_p683034714250">a</p>
</td>
<td class="cellrowborder" valign="top" width="14.35%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_spark_exp__en-us_topic_0000001696401509_p12830184752518">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.57%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_spark_exp__en-us_topic_0000001696401509_p0318545102615">DOUBLE, BIGINT, DECIMAL, or STRING</p>
</td>
<td class="cellrowborder" valign="top" width="51.77%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_spark_exp__en-us_topic_0000001696401509_p18653154615263">The value can be a float, integer, or string.</p>
<p id="dli_spark_exp__en-us_topic_0000001696401509_p9484232112711">If the value is not of the DOUBLE type, the system will implicitly convert it to the DOUBLE type for calculation.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_spark_exp__en-us_topic_0000001696401509_section210162513312"><h4 class="sectiontitle">Return Values</h4><p id="dli_spark_exp__en-us_topic_0000001696401509_p184124317231">The return value is of the DOUBLE type.</p>
<div class="note" id="dli_spark_exp__en-us_topic_0000001696401509_note61422099395"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_spark_exp__en-us_topic_0000001696401509_p11468110152814">If the value of <strong id="dli_spark_exp__en-us_topic_0000001696401509_b84509657031317">a</strong> is <strong id="dli_spark_exp__en-us_topic_0000001696401509_b17914323131317">NULL</strong>, <strong id="dli_spark_exp__en-us_topic_0000001696401509_b40873094331317">NULL</strong> is returned.</p>
</div></div>
</div>
<div class="section" id="dli_spark_exp__en-us_topic_0000001696401509_section13277192233920"><h4 class="sectiontitle">Example Code</h4><p id="dli_spark_exp__en-us_topic_0000001696401509_p138082306200">The value <strong id="dli_spark_exp__en-us_topic_0000001696401509_b622595020373">7.38905609893065</strong> is returned.</p>
<pre class="screen" id="dli_spark_exp__en-us_topic_0000001696401509_screen125971252213">select exp(2);</pre>
<p id="dli_spark_exp__en-us_topic_0000001696401509_p0496532102010">The value <strong id="dli_spark_exp__en-us_topic_0000001696401509_b8166603387">20.085536923187668</strong> is returned.</p>
<pre class="screen" id="dli_spark_exp__en-us_topic_0000001696401509_screen1792115536203">select exp(3);</pre>
<p id="dli_spark_exp__en-us_topic_0000001696401509_p94731235122014">The value <strong id="dli_spark_exp__en-us_topic_0000001696401509_b13824570381">NULL</strong> is returned.</p>
<pre class="screen" id="dli_spark_exp__en-us_topic_0000001696401509_screen65611843202019">select exp(null);</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_0473.html">Mathematical Functions</a></div>
</div>
</div>