xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Exp()

Calculates the value of e raised by an exponent.

Syntax

Exp( <nExponent> ) --> nAntiLogarithm

Arguments

<nExponent>
A numeric expression used as exponent for e (2.71828...)

Return

The function returns the numeric anti-logarithm of <nExponent>.

Description

This function returns the value of e raised to the power of <nExponent>. It is the inverse function of Log(). Note that <nExponent> cannot be larger than 46. Otherwise, a numeric overflow is created.

Info

See also:Log(), SET DECIMALS, SET FIXED
Category: Mathematical functions , Numeric functions
Source:rtl\math.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows return values of Exp()

   PROCEDURE Main

      SET DECIMALS TO 15

      ? Exp(1)        // result:           2.718281828459045
      ? Exp(-1)       // result:           0.367879441171442
      ? Exp(46)       // result:  94961194206024470000.000000000000000
      ? Exp(46.1)     // result:  ************************************
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe