Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: question for compiling a function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113158] Re: question for compiling a function
  • From: Ramiro <ramiro.barrantes at gmail.com>
  • Date: Fri, 15 Oct 2010 13:53:41 -0400 (EDT)
  • References: <i95tjc$65h$1@smc.vnet.net>

I got feedback from two people and it worked great:

My new function based on the suggestions is the following:

example2 =
 Compile[{{n, _Real, 1}, {a, _Real}, {b, _Real}, {t, _Real, 1}},
  Gamma[Total[n] + a]/(Times @@ (Gamma[n + 1])* Gamma[a])*b^a*
   Times @@ (t^n)/(Total[t] + b)^(Total[n] + a)]


However, over certain inputs I get the following:

example2[{97.6203, 8.4788, 21.4204,  46.1755}, 1, 1, {39.9342, 7.5820,
5.8656, 10.0553}]

During evaluation of In[277]:= CompiledFunction::cfse: Compiled
expression 1.33128164105707197950410345`12.920368310128088*^315 should
be a machine-size real number. >>

During evaluation of In[277]:= CompiledFunction::cfex: Could not
complete external evaluation at instruction 4; proceeding with
uncompiled evaluation. >>

What can I do?

Thank you,
Ramiro


  • Prev by Date: Re: A Bug in symbolic summation?
  • Next by Date: Re: question for compiling a function
  • Previous by thread: Re: question for compiling a function
  • Next by thread: Re: question for compiling a function