This is not a degree to decimal converter. This takes angles in deg,min,sec format (all integers) and adds or subtracts them.
The degree min sec format is a polynomial of the form (10^x)a + (1/60)a + (1/3600)a, if we were going to express this as decimal, where a and x are integers. This is no different from any decimal, which is in powers of 10: (10^2)a + 10b + c + (10^-1)d + (10^-2)e ...; we always simplify decimal numbers by borrowing from the next highest term if subtraction is negative, and carrying excess if addition results in a number greater than equal to the base we are working in.
The book I cited in my previous post (Trigonometry Refresher by Albert Klaf) describes the procedure on page 12. I would post the link, but I don't believe links make it through correctly. Google books has that page available.
As for online calculators -- I have found issues with them that are not consistent with what I understand to be the algebraic properties of angle addition and subtraction. Any calculator that does not reduce 60 min to 1 degree by carrying over to the next higher term, is not correct. I will consider your argument and see if I can come up with a proof of my method, or counter-example to yours, later, if the above does not persuade you.
In reply to Re^6: How to write testable command line script?
by thechartist
in thread How to write testable command line script?
by thechartist
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |