Open dinsmoro opened 4 days ago
Thank you for this important bug report. I am sad that such an important bug was not detected before :( And no test in the testsuite. Sorry.
Let me know if I can help - I'll take a stab at poly_2d
if y'all need the help and you let me know where it is, but I can't guarantee anything since I don't know C++! But I can try!
((I don't understand why we never realized that this code, which is big a complex, never gave problem before !))
OK, I found one problem in the math_fun_jmpg.cpp
code, adding round() goes in the good direction.
I have another trouble within permutation of i & j index, TBC
DLong px = (DLong) round(P[0] + P[1] * (DDouble) i + P[2] * (DDouble) i);
DLong py = (DLong) round(Q[0] + Q[1] * (DDouble) j + Q[2] * (DDouble) j);
I also realized that we have no systematic tests related to that part of code (TBD)
I noticed that
ROT
doesn't give the right outputs:I tried some other older
ROT
functions from NASA personnel, but they performed the same which I suspect points to thepoly_2d
call (perwe use the c++ internal POLY_2D code to do the job
comment). I can't find that call in the repo, though.This issue has popped up before, maybe system-dependent?: https://cow.physics.wisc.edu/~craigm/idl/archive/msg03150.html
And IDL on a separate computer does give the expected values: