error: too large number in context

6 vues (au cours des 30 derniers jours)
omnia
omnia le 2 Fév 2012
Hi there When I run my m file program, I have the following error. My program has a symbol called 'n' which I evaluate numerically. My program has functions I wrote before like 'gain_call'
??? Error using ==> sym.sym>char2sym Error, integer too large in context
Error in ==> sym.sym at 92 S = char2sym(x);
Error in ==> sym.maple at 92 result = sym(result);
Error in ==> sym.exp at 7 Y = maple('map','exp',X);
Error in ==> gain_call at 18 fc=(exp((Ea-Efc)/(K*T))+1)^-1;
Error in ==> gain_input at 45 g3=gain_call(Efc,Efv,freq_j,Eg);
Can anybody help me with this problem. I thought my laptop is not powerful enough to run this program as the error says 'too large number in context'. Is this true??
  1 commentaire
omnia
omnia le 2 Fév 2012
this error only appear after 6 or 7 iteration steps (so I am sure the program is right and can give results)

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 2 Fév 2012
exp((Ea-Efc)/(K*T)) would produce such a large result that Maple is not able to represent it.
I do not recall what the limit is for Maple; above 10^(10^8) and below 10^(10^9)
  12 commentaires
omnia
omnia le 6 Fév 2012
I will check for it but the error is no longer in this line:
{n}
??? Error using ==> maple
Error, integer too large in context
Error in ==> sym.findsym at 33
v = maple('indets', sc ,'symbol');
Error in ==> sym.subs at 96
OLDexpr = findsym(OLDf,1);
Error in ==> secant at 8
fo=subs(f,xo);
Error in ==> gain_input at 50
n_new(k)=secant(initial_guess,final_guess,f);
omnia
omnia le 6 Fév 2012
it has a value of:
.85934304937292961902495530021078+.31682419659735343866312859991915e-8*n^(1/3)-.99999999999999999148192499404140*log(.41742797673750005902568898595211e-23*n)-.41742797673750005547000617051654e-23*n/(64.+.23058721434979503260579059583995e-24*n*(64.+.20431054224819140717900382251866e-11*n^(1/2)))^(1/4)

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by