Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3323
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: latest change on fit.c |
| Date | 2016-05-05 13:40 +0200 |
| Organization | solani.org |
| Message-ID | <ngfbep$tg6$1@solani.org> (permalink) |
| References | <ng5pjn$ran$1@solani.org> <ng6hpe$t8r$1@dont-email.me> |
Am 02.05.2016 um 05:36 schrieb Ethan A Merritt:
> 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.
Ah. I think i've never run into that one, don't remember ever
fitting a function with a log in it. Thanks for the explanation!
Karl
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
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