Simons, Don <[EMAIL PROTECTED]> wrote:
>90% of programming seems to be dealing with special cases.
Ah... but it is just that ALL the special cases are handled that makes it
truly powerful software!
>
>slope = slope1
>if (abs(slope2) .lt. abs(slope1)) slope=slope2
>
>Because (a) it's floating point arithmetic and (b) I made some changes in
>other parts of the code that affected the numbers representing the
>horizontal positions in the 6th decimal place or so, this test flipped one
>way in PMX 2.00, and flopped the other way in the new version. Now
>obviously I shouldn't have made this depend on the 6th decimal place, but
>I'm not perfect.
I can't say that this is all that enlightening, but would it help (restore
the once manifest behavior) to change the test so as to control the
precision of the result? Such as
if (abs(slope2) - abs(slope1) + precision_limit ) .lt. 0 ) slope=slope2
You might set precision_limit to (say) .0001, or tweak it until you restore
the behavior of the earlier versions?
Just a thought.
Joel Hunsberger
[EMAIL PROTECTED]
>--Don
>