B Bruno Member Licensed User Jun 5, 2008 #1 Hi there, A simple question How to compute the exp() function in Basic4ppc ? exp(1) = 2.718281828459045 exp(-1) = 0.36787944117144233 Many thanks, Bruno.
Hi there, A simple question How to compute the exp() function in Basic4ppc ? exp(1) = 2.718281828459045 exp(-1) = 0.36787944117144233 Many thanks, Bruno.
agraham Expert Licensed User Longtime User Jun 5, 2008 #2 Like this Bruno said: exp(1) = 2.718281828459045 = cE^1 exp(-1) = 0.36787944117144233 = 1/cE Click to expand...
Like this Bruno said: exp(1) = 2.718281828459045 = cE^1 exp(-1) = 0.36787944117144233 = 1/cE Click to expand...
B Bruno Member Licensed User Jun 5, 2008 #3 Thanks Agraham, but ... I have a formula with something like result=exp(tmp) tmp can be positive or negative. How calculate result? Bruno.
Thanks Agraham, but ... I have a formula with something like result=exp(tmp) tmp can be positive or negative. How calculate result? Bruno.
B Bruno Member Licensed User Jun 5, 2008 #4 Is this ok for: result = exp(tmp) in Basic4PPC result = cE^(tmp) Bruno.
agraham Expert Licensed User Longtime User Jun 5, 2008 #5 Bruno said: tmp can be positive or negative Click to expand... B4X: Sub exp(num) If num < 0 Then Return 1/(cE^Abs(num)) Else Return cE^num End If End Sub
Bruno said: tmp can be positive or negative Click to expand... B4X: Sub exp(num) If num < 0 Then Return 1/(cE^Abs(num)) Else Return cE^num End If End Sub