saving . . . saved regarding e^(i*pi)+1 has been deleted. regarding e^(i*pi)+1 has been hidden .
regarding e^(i*pi)+1
Title
Question
e^(%pi*%i)+1
ans =

2.
i am getting the answer as 2 but correct answer is 0.
Please help and thanks in advance.

Scilab Getting-Started 13-14 min 10-20 sec 07-08-18, 10:19 p.m. RAJDEEP_JAGDALE

Answers:

e^(%pi*%i)+1 will not get evaluated in scilab because for scilab "e" is just another variable. The correct way to define "e" is by using %e expression. Hence %e^(%pi*%i)+1 will work and give the output "1.225D-16i" which says the real part is 0 and the imaginary part is 1.225*10^(-16). Other way to compute exponents is to use the "exp()" expression. Hence the same computation can be done using exp(%pi*%i)+1 and will give same results.
08-08-18, 11:59 a.m. rupakrokade


Log-in to answer to this question.