That does not seem right to me. From how I understand it, -60 seconds or -1 minute is NOT the same as -1degree 59minutes. That's like saying, in time math, that subtracting 60 seconds is the same as subtracting 1 hour 59 minutes: really, in h:m:s, -60s = -0:01:00; or, in a similar procedure in decimal math, that's like saying that subtracting 10/100ths from 0 would convert -10/100 to -1/10, and then to carry the negative sign, add 10/10 and subtract 1 unit, which would be -1.90 -- when it should really be -10/100 reduces to -1/10, and then the negative sign carries out to the unit of 0, so -0.10.

Think of it this way, in the final DMS or HMS notations, the DMS/HMS operators are a higher precedence than the unary minus operator -- so -0° 1' 0" is equivalent to -(0° 1' 0") = -(0 + 1/60 + 0/3600) = -(0 + 0/60 + 60/3600) = -60/3600 = -60 seconds

Checking a few online calculators/converters, they seem to agree with me. (I haven't yet found something more authoritative than a calculator... but it matches my reasoning above): If I go to this online DMS converter, and change -0.0167 (which is slightly more negative than -1/60 of a degree, or -1minute), it reads -0° 1' 0.12". And on another online tool, if you start with 0° 0' 0", and subtract 0° 1' 0", you get -0° 1' 0". Can you show a reference where -60seconds is displayed as -1° 59' 0"?


In reply to Re^5: How to write testable command line script? by pryrt
in thread How to write testable command line script? by thechartist

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.