Siebel VB Language Reference > Methods Reference for Siebel VB > Mathematical Methods >

Exponential Method


The Exponential method returns the value e raised to the power of the value that you specify in the number argument. The value e is the base of natural logarithms. The constant e is approximately 2.718282. For information about how this method handles the data type, see How Some Math Methods Handle the Data Type.

Format

Exp(number)

The following table describes the arguments that you can use with this method.

Argument
Description

number

The exponent value of e.

Example

The following example estimates the value of a factorial of a number that the user enters:

Sub Button_Click
   Dim x as Single
   Dim msgtext, PI
   Dim factorial as Double
   PI = 3.14159
i: x = 55
   If x< = 0 then
      Exit Sub
   ElseIf x>88 then
      Goto i
   End If
   factorial = Sqr(2 * PI * x) * (x^x/Exp(x))
   msgtext = "The estimated factorial is: " & Format _
      (factorial, "Scientific")
End Sub

About the Factorial

A factorial is the product of a number and each integer between it and the number 1. For example, 5 factorial, or 5!, is the product of 5*4*3*2*1, or the value 120. An exclamation point (!) can specify a factorial.

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.