‎2009 Dec 09 12:20 PM
Hello All!
I need a example for use mathematics function EXP for calcule exponential.
I have 2 variables type F. How can i do that?
‎2009 Dec 09 12:28 PM
Hello
Like this:
DATA: F1 TYPE F, F2 TYPE F.
F2 = 123.
F1 = EXP( F2 ).
WRITE: F1, F2.
‎2009 Dec 09 12:28 PM
Hello
Like this:
DATA: F1 TYPE F, F2 TYPE F.
F2 = 123.
F1 = EXP( F2 ).
WRITE: F1, F2.
‎2009 Dec 09 12:49 PM
Thank's, but i saw that this function not solve my problem.
This is a example:
i have 2 variables:
var1 = 4.
var2 = 3.
So, i need to result about exponential of this data. I need result = 64.
Another example:
var1 = 3.
var2 = 2.
result should be 9.
please, help me!
‎2009 Dec 09 12:54 PM
Hello
A small snippet for this:
DATA: P1 TYPE P, P2 TYPE P, RESULT TYPE P.
P1 = 4.
P2 = 3.
RESULT = 1.
DO P2 TIMES.
RESULT = RESULT * P1.
ENDDO.
WRITE: RESULT.
‎2009 Dec 09 1:01 PM
C'mon Dzed,
Its not that complicated
DATA:
v_num1 TYPE i VALUE '4',
v_num2 TYPE i VALUE '3',
v_res TYPE i.
v_res = v_num1 ** v_num2.
WRITE v_res.Cheers,
Suhas
‎2009 Dec 09 12:33 PM
Hi Rodrigo,
Try this :-
DATA: I1 TYPE I, I2 TYPE I, I3 TYPE I,
F1 TYPE F, F2 TYPE F,
WORD1(10), WORD2(20),
XSTR TYPE XSTRING.
...
F1 = ( I1 + EXP( F2 ) ) * I2 / SIN( 3 - I3 ).
COMPUTE F1 = SQRT( SQRT( ( I1 + I2 ) * I3 ) + F2 ).
I1 = STRLEN( WORD1 ) + STRLEN( WORD2 ).
I2 = STRLEN( XSTR ).
Regards
Abhii
‎2009 Dec 09 1:08 PM
Hi Rodrigo,
Use power expression "x*y" means that x is multiplied by itself y times, where y is a natural numebr. xy = exp(ylog(x)) for any value of y.
Regards
Abhii