Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #366

Re: trying to get a fit to work.

From Hans-Bernhard Bröker <HBBroeker@t-online.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: trying to get a fit to work.
Date 2011-06-09 22:26 +0200
Message-ID <95coieFepcU1@mid.dfncis.de> (permalink)
References <62b76acf-a50c-49f2-a02a-908398651e5b@q12g2000prb.googlegroups.com> <ispja4$fmf$1@dont-email.me>

Show all headers | View raw


On 09.06.2011 06:48, sfeam wrote:

> Neither OS underflows with exp(-x) - both go to zero.

Actually the OS would overflow.  We just don't let it.  See gp_exp() and 
its treatment of E_MINEXP.

> I think this means there's something wrong with the way erfc works in
> windows, other than basic underflow handling. So an even simpler fix uses
> the definition of erfc:
>
> myerfc(x) = 1 - erf(x)

Unfortunately that's really to simple to be a valid fix.  This loses 
accuracy _way_ earlier than the actual erfc() does:

gnuplot> print erfc(27)
5.23704643935263e-319 

gnuplot> print 1-erf(7)
0.0

[Using our Windows binary of 4.4 pl2]

> I am guessing that you are using a machine that has configured in the
> internal version, and there is an overflow bug in it somewhere.

That's no bug, it's a deliberate, reasonably error reaction.  It's a 
bona fide floating point exception being raised by the implementation, 
which under the usual roles of standard C library routines is apparently 
_supposed_ to send out a floating point exception.  That's the same 
reason implementations started to return "undefined" for 
exp(-largenumber), one after the other, a while ago.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

trying to get a fit to work. aviphysics <aviphysics@gmail.com> - 2011-06-07 16:32 -0700
  Re: trying to get a fit to work. Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-06-08 23:02 +0200
  Re: trying to get a fit to work. sfeam <sfeam@users.sourceforge.net> - 2011-06-08 21:48 -0700
    Re: trying to get a fit to work. Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2011-06-09 22:26 +0200
      Re: trying to get a fit to work. sfeam <sfeam@users.sourceforge.net> - 2011-06-09 18:29 -0700

csiph-web