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.
|
|
|