After reading the responses and dealing with a little downtime at work, I went through the code and finally pinpointed the problematic assignment at:

#The assignments are condensed test values for the following formula. my ($sx1, $sy1, $sm, $rx1, $ry1, $rm) = (1000, 1000, 1.5574077246549, +1000, 1000, 0.871447982724319); my $rsx = ($sy1 - $ry1 + $rm * $rx1 - $sm * $sx1) / ($rm - $sm);

Even though the values plugged into the formula come out to 1000, I guess that isn't the case with the floating numbers. Since I didn't want to bang my head on this forever I figured I can somewhat predict what numbers will be dumped out by the formula. My kludge is to compare the four known values with each other then jump the entire block of problematic code if they equal each other.

I can't believe this never occurred to me. I rarely mix whole integers with floats and this is the first time I've done any comparisons. In retrospect, this is something I should have remembered from my first year in course work. Such as never using a float value to control a loop. Should have puzzled this out on my own with the realization I was comparing a float to an integer.

Oh well, I'm not happy about the kludge, but I can live with it.


In reply to Re: When 1000 is less than 1000 by SavannahLion
in thread When 1000 is less than 1000 by SavannahLion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.