Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8138
| From | danl@wolfram.com |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: compile a numerical integral |
| Date | 2012-01-25 12:03 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jfor1v$5ps$1@smc.vnet.net> (permalink) |
| References | <jflvvs$jr4$1@smc.vnet.net> |
This variant seems to work in version 8.
f2 = Compile[{u}, Table[NIntegrate[x*u, {x, 0., j}], {j,{1,2,3}}]]
Your version appears to run without a hitch in version 7 (see below).
In[5]:= f = Compile[{u}, NIntegrate[x*u, {x,0.,#}]& /@ {1,2,3}]
Out[5]= CompiledFunction[{u}, (NIntegrate[x u, {x, 0., #1}] & ) /@ {1, 2, 3},
> -CompiledCode-]
In[6]:= f[1.1]
Out[6]= {0.55, 2.2, 4.95}
So this may indicate a bug in version 8.
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
compile a numerical integral Ruth Lazkoz Sáez <ruth.lazkoz@ehu.es> - 2012-01-24 10:09 +0000 Re: compile a numerical integral psycho_dad <s.nesseris@gmail.com> - 2012-01-25 12:01 +0000 Re: compile a numerical integral danl@wolfram.com - 2012-01-25 12:03 +0000 Re: compile a numerical integral "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2012-01-25 12:09 +0000 Re: compile a numerical integral Gabriel Landi <gtlandi@gmail.com> - 2012-01-26 08:25 +0000
csiph-web