Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3318 > unrolled thread
| Started by | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| First post | 2016-05-01 22:40 +0200 |
| Last post | 2016-05-05 13:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
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
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-05-01 22:40 +0200 |
| Subject | latest change on fit.c |
| Message-ID | <ng5pjn$ran$1@solani.org> |
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? Best, Karl
[toc] | [next] | [standalone]
| From | Ethan A Merritt <EAMerritt@gmail.com> |
|---|---|
| Date | 2016-05-01 20:36 -0700 |
| Message-ID | <ng6hpe$t8r$1@dont-email.me> |
| In reply to | #3318 |
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
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-05-05 13:40 +0200 |
| Message-ID | <ngfbep$tg6$1@solani.org> |
| In reply to | #3319 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web