Jump to content

Perl Programming/Keywords/exp: Difference between revisions

From Wikibooks, open books for an open world
[unreviewed revision][checked revision]
Content deleted Content added
Tags: Reverted Mobile edit Mobile web edit
m Reverted edits by 39.45.157.11 (talk) to last version by DannyS712
Tag: Rollback
 
Line 15: Line 15:
{{Code:Valid|
{{Code:Valid|
<syntaxhighlight lang=perl>
<syntaxhighlight lang=perl>
print exp(-15) . "\n";
print exp(1) . "\n";
print exp(2) . "\n";
print exp(2) . "\n";
</syntaxhighlight>|
</syntaxhighlight>|
Line 21: Line 21:
7.38905609893065
7.38905609893065
|}}
|}}

=== See also ===
=== See also ===



Latest revision as of 22:59, 10 June 2023

Previous: exit Keywords Next: fcntl

The exp keyword

[edit | edit source]

exp returns exponent e to the power of EXPRESSION. If EXPRESSION is omitted, exp($_) is executed.

Syntax

[edit | edit source]
  exp EXPRESSION
  exp

Examples

[edit | edit source]
print exp(1) . "\n";
print exp(2) . "\n";
2.71828182845905
7.38905609893065

See also

[edit | edit source]
Previous: exit Keywords Next: fcntl