Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: boruun@gmail.com Newsgroups: comp.graphics.apps.gnuplot Subject: Special functions in gnuplot Date: Fri, 10 Aug 2012 20:34:54 -0700 (PDT) Organization: http://groups.google.com Lines: 82 Message-ID: <1694fa1b-c5e4-4561-8594-40d67337d065@googlegroups.com> NNTP-Posting-Host: 128.101.221.168 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1344656094 27385 127.0.0.1 (11 Aug 2012 03:34:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 11 Aug 2012 03:34:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=128.101.221.168; posting-account=GvZkAQkAAAAolYpA2729ei7GxSNWZjCy User-Agent: G2/1.0 X-Received-Bytes: 4186 Xref: csiph.com comp.graphics.apps.gnuplot:1314 Can someone give me some pointers on how can I figure out: a) what ALGORITHMS (files/codes either gnuplot specific or system specific)= gnuplot is ACCESSING to calculate special functions like gamma, or lgamma,= igamma, ibeta etc..... and WHERE are these algorithms/files located and, b) (if possible) tell me (or guide me on how to find) how accurate are thes= e estimates and over what range of values for their arguments. I am using these functions in the "fit" command and not merely for plotting= . Hence it is extremely important for me to know the error bounds of these = estimates and the range of values over which they are valid.=20 Any help will be much appreciated. [Please read the background below before= responding]. I am using: Scientific Linux 6.2 (Kernel Linux 2.6.32-220.23.1.el6.x86_64) BACKGROUND: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I hunted for this information a bit and have come across a file called spec= fun.c in the gnuplot /src directory. The file contains lines of code with: ifdef ..., ifndef... and ifdef HAVE_function I think that something like HAVE_LGAMMA indicates that if a function called= LGAMMA exists then that one is preferred.=20 BUT, WHERE is GNUPLOT looking for such pre-existing LGAMMA (and other funct= ion definitions)?=20 [I dont understand what "HAVE_function" type references really mean. I sear= ched a lot but could not really understand what it is doing and WHERE exact= ly is it looking so that I can go to that file and take a look at the algor= ithm used to define that function]. Also is LGAMMA the same as "log gamma" or is it "gamma in long format/type = (i.e. double precision)". If it is "log gamma" then why is a call to gamma(= x) referred to lgamma(x) without any 'exponentiation'?=20 This link indicates that lgamma is log(gamma) and not just gamma in double-= precision. http://www.kernel.org/doc/man-pages/online/pages/man3/lgamma.3.html But I am not sure if gnuplot is accessing this one or not. I also do not kn= ow WHERE to find this lgamma in my system files. I also checked the GNU scientific library, but here gamma is referred to di= fferently and not as lgamma: http://www.gnu.org/software/gsl/manual/html_node/Gamma-Functions.html Further, the GNU scientific library also has igamma defined: http://www.gnu.org/software/gsl/manual/html_node/Incomplete-Gamma-Functions= .html BUT, the GNUPLOT specfun.c file does not seem to use this function even if = it exists in the GNU scientific library. Anyone knows why? Is the gnuplot v= ersion of igamma more accurate than that in the GNU scientific library? Please give me as specific info as possible (given my operating system..see= above). Like if you say system file, then let me know whether you are refe= rring to: usr/lib/x86_64-redhat.....=20 OR usr/include/ etc.. And once again, I dont just want to know what it is doing, I want to know (= and see for myself) what ALGORITHM it is accessing and if possible get some= idea of what are the errors in estimation of these special functions and o= ver what range of values for its arguments. Thank you very much for your help in advance! Kind regards, Barun.