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


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

Re: latest change on fit.c

From Ethan A Merritt <EAMerritt@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: latest change on fit.c
Date 2016-05-01 20:36 -0700
Organization A noiseless patient Spider
Message-ID <ng6hpe$t8r$1@dont-email.me> (permalink)
References <ng5pjn$ran$1@solani.org>

Show all headers | View raw


Karl Ratzsch wrote:

> I'm intrigued what this change
> 
> http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/gnuplot/src/fit.c?r1=1.163&r2=1.164
> 
> does to my fit. Is there a test case to show the difference?

I do have a test case, but it's real data in the process of real analysis and
not really in a form I can share.  The long and short of it is that for 
whatever reason the fit goes bad during iterative refinement and triggers
an attempt to calculate the log of a negative number. The old code attempted
to trap such a case and print out diagnotic information by doing this:

 data[i] = real(&v);	         
 if (undefined || isnan(real(&v))) {
      ... print stuff ...

The problem I ran into was that the call to real(&v) failed immediately
with error "unknown type in real()" so it never got as far as the
diagnostic printout.  After the change the test for "undefined" is done
first, so the diagnostic printout is triggered before any attempt to
call real(&v).

Anyhow, the only change is that now you get the intended diagnostic
printout rather than an "unknown type" error.

	Ethan



> Best,
>    Karl

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


Thread

latest change on fit.c Karl Ratzsch <mail.kfr@gmx.net> - 2016-05-01 22:40 +0200
  Re: latest change on fit.c Ethan A Merritt <EAMerritt@gmail.com> - 2016-05-01 20:36 -0700
    Re: latest change on fit.c Karl Ratzsch <mail.kfr@gmx.net> - 2016-05-05 13:40 +0200

csiph-web