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

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -