EXP()

Previous topic - Next topic

AMateus

Hi,

Is there a way to calculate EXP(number) in GLBasic? I don't seem to find it in the manual. Is it implemented?

I have tried inline but give me errors on compile (not surprised here cause I'm not a C fellow =P).

Code (glbasic) Select

// Beginning of the module
INLINE

#include <math.h>
ENDINLINE


// and then the function
FUNCTION Exponential#: value#

INLINE

return exp (value);

ENDINLINE

ENDFUNCTION


When compiling the error is:
Code (glbasic) Select

C:\Users\ANTNIO~1\AppData\Local\Temp\glbasic\gpc_tempg.cpp: In member function `DGInt __GLBASIC__::tMath::Exponential(DGInt)':
C:\Users\ANTNIO~1\AppData\Local\Temp\glbasic\gpc_tempg.cpp:218: error: `exp' was not declared in this scope


Thanks,
António

backslider

Do you mean the Function
Code (glbasic) Select

LOCAL i = POW(10, 5)

?

Kitty Hello

POW(2.71828183, x)

AMateus

oh ok thanks... my math sucks lol xD