Mathematica [Mathematica] Newbie with Compile[]

  • Thread starter guerom00
  • Start date
Hello all :)

I'm just beginning trying to use compiled version of several simple functions. And right at the beginning, I stumble onto a “Numerical error” error message which puzzle me…

Here is my simple code :

Code:
11/18/11 12:51:07 In[18]:= \[Epsilon]IntrinsicSiliciumC = 
  Compile[{{\[Omega], _Real}, {L, _Real}},
   Module[{\[Omega]0, \[Epsilon]0, \[Epsilon]Inf, c = 299792458},
    \[Omega]0 = (66 10^14)/(c (10^9) ) L;
    \[Epsilon]0 = 11.87;
    \[Epsilon]Inf = 1.035;
    \[Epsilon]Inf + ((\[Epsilon]0 - \[Epsilon]Inf) \[Omega]0^2)/(\
\[Omega]^2 + \[Omega]0^2)
    ]
   , CompilationTarget -> "C"];

11/18/11 13:05:18 In[23]:= \[Epsilon]IntrinsicSiliciumC[1., 1.]

11/18/11 13:05:19 During evaluation of In[23]:= CompiledFunction::cfne: Numerical error encountered; proceeding with uncompiled evaluation. >>

11/18/11 13:05:19 Out[23]= 1.0402
Basically, how to debug such error message (which is quite vague…)

Thanks in advance :)
 

Want to reply to this thread?

"[Mathematica] Newbie with Compile[]" You must log in or register to reply here.

Related Threads for: [Mathematica] Newbie with Compile[]

Replies
0
Views
2K
Replies
0
Views
2K
  • Posted
Replies
0
Views
1K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top