{"id":947,"date":"2015-10-06T21:12:55","date_gmt":"2015-10-06T20:12:55","guid":{"rendered":"http:\/\/www.nobugs.org\/blog\/?p=947"},"modified":"2015-10-06T21:12:55","modified_gmt":"2015-10-06T20:12:55","slug":"radian-in-not-a-unit-shocker","status":"publish","type":"post","link":"https:\/\/www.nobugs.org\/blog\/archives\/2015\/10\/06\/radian-in-not-a-unit-shocker\/","title":{"rendered":"Radian in not-a-unit shocker"},"content":{"rendered":"<p>One of the nice things about scmutils is that it tracks units, so you can&#8217;t accidentally add 10 seconds to 5 metres.<\/p>\n<pre>\r\n(+ \r\n (& 10 &second)\r\n (& 5 &meter))\r\n=> Units do not match: + (*with-units* 10 (*unit* SI ... 1)) (*with-units* 5 (*unit* SI ... 1))\r\n<\/pre>\n<p>When dealing with angles, it initially seems to do the right thing too:<\/p>\n<pre>\r\n(+\r\n (& pi\/2 &radian)\r\n (& 90 &degree))\r\n=> 3.141... (ie. its converting everything to radians)\r\n<\/pre>\n<p>But this is less cool:<\/p>\n<pre>\r\n(\/ (& pi &radian) (& 1 &second))\r\n=> (& 3.141592653589793 &hertz)\r\n<\/pre>\n<p>Err, pi radians should be 0.5Hz.  The trouble is, scmutils treats radians as a unit-less number.<\/p>\n<p>To check whether this was a reasonable thing to do, I checked my old favourite <a href=\"https:\/\/futureboy.us\/frinkdocs\/\">Frink<\/a>.  In frink&#8217;s units.txt files, we have the following:<\/p>\n<p><quote><br \/>\n\/\/ Alan&#8217;s editorializing:<br \/>\n                \/\/ Despite what other units programs might have you believe,<br \/>\n                \/\/ radians ARE dimensionless units and making them their own<br \/>\n                \/\/ unit leads to all sorts of arbitrary convolutions in<br \/>\n                \/\/ calculations (at the possible expense of some inclarity if<br \/>\n                \/\/ you don&#8217;t know what you&#8217;re doing.)<br \/>\n                \/\/ If you really want radians to be a fundamental unit,<br \/>\n                \/\/ replace the above with &#8220;angle =!= radian&#8221;<br \/>\n                \/\/ (This will give you a bit of artificiality in calculations.)<br \/>\n                \/\/<br \/>\n                \/\/ The radian was actually a fundamental base unit in the SI<br \/>\n                \/\/ up until 1974, when they changed it, making it no longer<br \/>\n                \/\/ be a special unit, but just a dimensionless number (which<br \/>\n                \/\/ it is.)  See the definition of the &#8220;Hz&#8221; below for a<br \/>\n                \/\/ discussion of how this broke the SI&#8217;s definitions of<br \/>\n                \/\/ basic circular \/ sinusoidal measures, though.<br \/>\n<\/quote><\/p>\n<p>And down a bit, on the section about hertz, we have:<\/p>\n<p><quote><\/p>\n<p>\/\/<br \/>\n\/\/ Alan&#8217;s Editorializing:  Here is YET ANOTHER place where the SI made a<br \/>\n\/\/ really stupid definition.  Let&#8217;s follow their chain of definitions, shall<br \/>\n\/\/ we, and see how it leads to absolutely ridiculous results.<\/p>\n<p>\/\/ The Hz is currently defined simply as inverse seconds. (1\/s).<br \/>\n\/\/  See: http:\/\/physics.nist.gov\/cuu\/Units\/units.html<br \/>\n\/\/<br \/>\n\/\/ The base unit of frequency in the SI *used* to be &#8220;cycles per second&#8221;.<br \/>\n\/\/ This was fine and good.  However, in 1960, the BIPM made the<br \/>\n\/\/ change to make the fundamental unit of frequency to<br \/>\n\/\/ be &#8220;Hz&#8221; which they defined as inverse seconds (without qualification.)<br \/>\n\/\/<br \/>\n\/\/ Then, in 1974, they changed the radian from its own base unit in the SI<br \/>\n\/\/ to be a dimensionless number, which it indeed is (it&#8217;s a length divided by<br \/>\n\/\/ a length.)  That change was correct and good in itself.<br \/>\n\/\/<br \/>\n\/\/ However, the definition of the Hz was *not* corrected at the same<br \/>\n\/\/ time that the radian was changed.  Thus, we have the conflicting SI<br \/>\n\/\/ definition of the radian as the dimensionless number 1 (without<br \/>\n\/\/ qualification) and Hz as 1\/s.  (Without qualification.)<br \/>\n\/\/<br \/>\n\/\/ This means that, if you follow the rules of the SI,<br \/>\n\/\/ 1 Hz = 1\/s = 1 radian\/s which is simply inconsistent and violates basic<br \/>\n\/\/ ideas of sinusoidal motion, and is simply a stupid definition.<br \/>\n\/\/ The entire rest of the world, up until that point, knew that 1 Hz needs to<br \/>\n\/\/ be equal to *2 pi* radians\/s or be changed to mean *cycles\/second* for<br \/>\n\/\/ these to be reconcilable.  If you use &#8220;Hz&#8221; to mean cycles\/second, say,<br \/>\n\/\/ in sinusoidal motion, as the world has done for a century, know that the SI<br \/>\n\/\/ made all your calculations wrong.  A couple of times, in different ways.<br \/>\n\/\/<br \/>\n\/\/ This gives the wonderful situation that the SI&#8217;s Hz-vs-radian\/s definitions<br \/>\n\/\/ have meant completely different things in the timeperiods:<br \/>\n\/\/<br \/>\n\/\/ * pre-1960<br \/>\n\/\/ * 1960 to 1974<br \/>\n\/\/ * post-1974<br \/>\n\/\/<br \/>\n\/\/<br \/>\n\/\/ Thus, anyone trying to mix the SI definitions for Hz and angular<br \/>\n\/\/ frequencies (e.g. radians\/s) will get utterly wrong answers that don&#8217;t<br \/>\n\/\/ match basic mathematical reality, nor match any way that Hz was ever used<br \/>\n\/\/ for describing, say, sinusoidal motion.<br \/>\n\/\/<br \/>\n\/\/ Beware the SI&#8217;s broken definition<br \/>\n\/\/ of Hz.  You should treat the radian as being correct, as a fundamental<br \/>\n\/\/ dimensionless property of the universe that falls out of pure math like<br \/>\n\/\/ the Taylor series for sin[x], and you should treat the Hz as being a<br \/>\n\/\/ fundamental property of incompetence by committee.<br \/>\n\/\/<br \/>\n\/\/ One could consider the CGPM in 1960 to have made the original mistake,<br \/>\n\/\/ re-defining Hz in a way that did not reflect its meaning up to that point,<br \/>\n\/\/ or the CGPM in 1974 to have made the absolutely huge mistake that made<br \/>\n\/\/ the whole system inconsistent and wrong, and clearly broke the definition<br \/>\n\/\/ of Hz-vs-radian\/s used everywhere in the world, turning it into a broken,<br \/>\n\/\/ self-contradictory mess that it is now.<br \/>\n\/\/<br \/>\n\/\/ Either way, if I ever develop a time machine, I&#8217;m going to go back and<br \/>\n\/\/ knock both groups&#8217; heads together.  At a frequency of about 1 Hz.  Or<br \/>\n\/\/ better yet, strap them to a wheel and tell them I&#8217;m going to spin one group<br \/>\n\/\/ at a frequency of 1 Hz, and the other at 1 radian\/s and let them try to<br \/>\n\/\/ figure out which one of those stupid inconsistent definitions means what.<br \/>\n\/\/ Hint:  It&#8217;ll depend on which time period I do it in, I guess, thanks to<br \/>\n\/\/ their useless inconsistent definition changes.<br \/>\n\/\/<br \/>\n\/\/ It&#8217;s as if this bunch of geniuses took a well-understood term like &#8220;day&#8221;<br \/>\n\/\/ and redefined it to mean &#8220;60 minutes&#8221;.  It simply breaks every historical<br \/>\n\/\/ use, and present use, and just causes confusion and a blatant source of<br \/>\n\/\/ error.<br \/>\n\/\/<br \/>\n\/\/ In summary:  Frink grudgingly follows the SI&#8217;s ridiculous, broken definition<br \/>\n\/\/ of &#8220;Hz&#8221;.  You should not use &#8220;Hz&#8221;.  The SI&#8217;s definition of Hz should be<br \/>\n\/\/ considered harmful and broken.  Instead, if you&#8217;re talking about circular<br \/>\n\/\/ or sinusoidal motion, use terms like &#8220;cycles\/sec&#8221; &#8220;revolutions\/s&#8221;,<br \/>\n\/\/ &#8220;rpm&#8221;, &#8220;circle\/min&#8221;, etc. and Frink will do the right thing because it<br \/>\n\/\/ doesn&#8217;t involve the stupid SI definition that doesn&#8217;t match what any<br \/>\n\/\/ human knows about sinusoidal motion.  Use of &#8220;Hz&#8221; will cause communication<br \/>\n\/\/ problems, errors, and make one party or another look insane in the eyes<br \/>\n\/\/ of the other.<br \/>\n<\/quote><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the nice things about scmutils is that it tracks units, so you can&#8217;t accidentally add 10 seconds to 5 metres. (+ (&#038; 10 &#038;second) (&#038; 5 &#038;meter)) => Units do not match: + (*with-units* 10 (*unit* SI &#8230; 1)) (*with-units* 5 (*unit* SI &#8230; 1)) When dealing with angles, it initially seems to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-947","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/comments?post=947"}],"version-history":[{"count":4,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/947\/revisions"}],"predecessor-version":[{"id":951,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/947\/revisions\/951"}],"wp:attachment":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/media?parent=947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/categories?post=947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/tags?post=947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}