exponential function with large argument in matlab -



exponential function with large argument in matlab -

this question has reply here:

how compute exponent in matlab without getting inf? 3 answers

i've got 1 problem longer time , i'd grateful if help me somehow...

i have code in matlab (version r2012a) compute exponential functions using matlab's fuction exp. means have this:

y = exp(x);

however, when "x" larger number, result ("y") infinity; when "x" smaller number, result 0. said on mathworks' website:

numerical exceptions may happen, when absolute value of real part of floating-point argument x large. if ℜ(x) < -7.4*10^8, exp(x) may homecoming truncated result 0.0 (protection against underflow). if ℜ(x) > 7.4*10^8, exp(x) may homecoming floating-point equivalent rd_inf of infinity.

my problem quite obvious - "x" pretty big receive infinities , zeros instead of results need. question - how real results? in advance help!

use vpa string input:

>> exp(1000) ans = inf >> vpa('exp(1000)') ans = 1.9700711140170469938888793522433*10^434

note result of vpa of class sym.

matlab exponential largenumber

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -