ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 12.06.2025
Просмотров: 8199
Скачиваний: 1
© MCS Electronics, 1995-2007
Action
Returns e( the base of the natural logarithm) to the power of a single or double variable.
Syntax
Target = EXP(source)
Remarks
Target |
The single or double that is assigned with the Exp() of the target. |
Source |
The source to get the Exp of. |
See also
LOG , LOG10
Example
'----------------------------------------------------------------------------- |
|
-- |
: (c) 1995-2005, MCS Electronics |
'copyright |
|
'micro |
: Mega88 |
'suited for demo |
: no, but without the DOUBLE, it works for DEMO too |
in M48 |
: no |
'commercial addon needed |
|
'purpose |
: demonstrates EXP function |
'----------------------------------------------------------------------------- |
|
-- |
|
$regfile = "m88def.dat" |
' specify the used |
micro |
' used crystal |
$crystal = 8000000 |
|
frequency |
' use baud rate |
$baud = 19200 |
|
$hwstack = 32 |
' default use 32 |
for the hardware stack |
' default use 10 |
$swstack = 40 |
|
for the SW stack |
' default use 40 |
$framesize = 40 |
|
for the frame space |
|
Dim X As Single |
|
X = Exp(1.1) |
|
Print X |
|
'prints 3.004166124 |
|
X = 1.1 |
|
X = Exp(x) |
|
Print X |
|
'prints 3.004164931 |
|
Dim D As Double |
|
D = Exp(1.1) |
|
Print D |
|
'prints 3.00416602394643 |
|
D = 1.1 |
|
D = Exp(d) |
|
Print D |
|
page -484- |