Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Exp() function

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-05-2008, 05:52 PM
Junior Member
 
Join Date: Apr 2008
Location: FRANCE
Posts: 13
Default Exp() function

Hi there,

A simple question :-)

How to compute the exp() function in Basic4ppc ?
exp(1) = 2.718281828459045
exp(-1) = 0.36787944117144233

Many thanks,

Bruno.
Reply With Quote
  #2 (permalink)  
Old 06-05-2008, 06:02 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Like this
Quote:
Originally Posted by Bruno View Post
exp(1) = 2.718281828459045 = cE^1
exp(-1) = 0.36787944117144233 = 1/cE
Reply With Quote
  #3 (permalink)  
Old 06-05-2008, 06:10 PM
Junior Member
 
Join Date: Apr 2008
Location: FRANCE
Posts: 13
Default

Thanks Agraham, but ...

I have a formula with something like


result=exp(tmp)

tmp can be positive or negative.

How calculate result?

Bruno.
Reply With Quote
  #4 (permalink)  
Old 06-05-2008, 06:18 PM
Junior Member
 
Join Date: Apr 2008
Location: FRANCE
Posts: 13
Default

Is this ok
for:
result = exp(tmp)

in Basic4PPC
result = cE^(tmp)

Bruno.
Reply With Quote
  #5 (permalink)  
Old 06-05-2008, 06:21 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Bruno View Post
tmp can be positive or negative
Code:
Sub exp(num)
  
If num < 0 Then
    
Return 1/(cE^Abs(num))
  
Else
    
Return cE^num
  
End If
End Sub
Reply With Quote
  #6 (permalink)  
Old 06-05-2008, 07:03 PM
Junior Member
 
Join Date: Apr 2008
Location: FRANCE
Posts: 13
Default

Thanks a lot Agraham.

Bruno.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Function Key eillezcas Questions (Windows Mobile) 0 08-27-2008 08:28 PM
Help with Math function go4saint Questions (Windows Mobile) 2 03-31-2008 09:15 AM
Combinations function derez Share Your Creations 0 02-04-2008 11:40 AM
Round function klaus Questions (Windows Mobile) 3 11-15-2007 11:42 AM
Filter function in sql. belotrei Questions (Windows Mobile) 0 06-02-2007 01:17 PM


All times are GMT. The time now is 09:47 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0