http://qs321.pair.com?node_id=1226367


in reply to Re^7: How to write testable command line script? (updated)
in thread How to write testable command line script?

So far, the reduce sub is consistent with all of the examples in his text. User input would accept negative in the minute and second fields (unlike some other calculators), it just won't provide output with negatives in those fields, which are appropriately carried to the next highest term, as is done in this calculator http://www.mathopenref.com/dmscalculator.html

  • Comment on Re^8: How to write testable command line script?

Replies are listed 'Best First'.
Re^9: How to write testable command line script?
by AnomalousMonk (Archbishop) on Nov 26, 2018 at 17:54 UTC

    But with the http://www.mathopenref.com/dmscalculator.html calculator, if I enter 0° 0' 59" and then add -0° 1' 0", I get -0° 0' 1". Surely the only way that can happen is if -0° 1' 0" represents a negative angle of 0° 1' 0", i.e., an angle of -1'. (Understandably, the calculator won't let you enter angles like 0° -1' 0" or 0° 0' 60".)


    Give a man a fish:  <%-{-{-{-<