Help me understand this interpol bug in GDL [message #88531] |
Thu, 08 May 2014 13:04  |
rjp23
Messages: 97 Registered: June 2010
|
Member |
|
|
I realise this is a GDL specific problem but also that there are quite a few experts on here.
GDL> test=interpol([96395,96406], [74.25, 73.50], 74.25)
1 2 0
% FINDEX: binary search failed
% Error occurred at: FINDEX 89 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/findex.p ro
% INTERPOL 102 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/interpol .pro
% BI_INTERPOL 33 bi_interpol.pro
% $MAIN$
% Execution halted at: BI_INTERPOL 33 bi_interpol.pro
If I reverse the order it doesn't give the error:
GDL> test=interpol([96406, 96395], [73.50, 74.25], 74.25)
I've tried to simplify it to this and can still reproduce it:
GDL> test=interpol([1,2], [2, 1], 2)
1 2 0
% FINDEX: binary search failed
% Error occurred at: FINDEX 89 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/findex.p ro
% INTERPOL 102 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/interpol .pro
% BI_INTERPOL 33 bi_interpol.pro
It seems if my x is decreasing and xout is the higher x value then it gives this error.
Any ideas if I'm doing something wrong or if this is a bug?
IDL seems to handle either way fine.
|
|
|
Re: Help me understand this interpol bug in GDL [message #88573 is a reply to message #88531] |
Tue, 13 May 2014 15:51  |
munka
Messages: 36 Registered: December 2009
|
Member |
|
|
On Thursday, May 8, 2014 1:04:04 PM UTC-7, rj...@le.ac.uk wrote:
> I realise this is a GDL specific problem but also that there are quite a few experts on here.
>
>
>
> GDL> test=interpol([96395,96406], [74.25, 73.50], 74.25)
>
> 1 2 0
>
> % FINDEX: binary search failed
>
> % Error occurred at: FINDEX 89 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/findex.p ro
>
> % INTERPOL 102 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/interpol .pro
>
> % BI_INTERPOL 33 bi_interpol.pro
>
> % $MAIN$
>
> % Execution halted at: BI_INTERPOL 33 bi_interpol.pro
>
>
>
> If I reverse the order it doesn't give the error:
>
>
>
> GDL> test=interpol([96406, 96395], [73.50, 74.25], 74.25)
>
>
>
>
>
> I've tried to simplify it to this and can still reproduce it:
>
>
>
> GDL> test=interpol([1,2], [2, 1], 2)
>
> 1 2 0
>
> % FINDEX: binary search failed
>
> % Error occurred at: FINDEX 89 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/findex.p ro
>
> % INTERPOL 102 /cm/shared/apps/gdl/0.9.4/share/gnudatalanguage/lib/interpol .pro
>
> % BI_INTERPOL 33 bi_interpol.pro
>
>
>
>
>
> It seems if my x is decreasing and xout is the higher x value then it gives this error.
>
>
>
> Any ideas if I'm doing something wrong or if this is a bug?
>
>
>
> IDL seems to handle either way fine.
It works fine in IDL...
IDL> test=interpol([1,2], [2, 1], 2)
% Compiled module: INTERPOL.
IDL> print,test
1
|
|
|