Radian in not-a-unit shocker

One of the nice things about scmutils is that it tracks units, so you can’t accidentally add 10 seconds to 5 metres.

(+ 
 (& 10 &second)
 (& 5 &meter))
=> Units do not match: + (*with-units* 10 (*unit* SI ... 1)) (*with-units* 5 (*unit* SI ... 1))

When dealing with angles, it initially seems to do the right thing too:

(+
 (& pi/2 &radian)
 (& 90 °ree))
=> 3.141... (ie. its converting everything to radians)

But this is less cool:

(/ (& pi &radian) (& 1 &second))
=> (& 3.141592653589793 &hertz)

Err, pi radians should be 0.5Hz. The trouble is, scmutils treats radians as a unit-less number.

To check whether this was a reasonable thing to do, I checked my old favourite Frink. In frink’s units.txt files, we have the following:


// Alan’s editorializing:
// Despite what other units programs might have you believe,
// radians ARE dimensionless units and making them their own
// unit leads to all sorts of arbitrary convolutions in
// calculations (at the possible expense of some inclarity if
// you don’t know what you’re doing.)
// If you really want radians to be a fundamental unit,
// replace the above with “angle =!= radian”
// (This will give you a bit of artificiality in calculations.)
//
// The radian was actually a fundamental base unit in the SI
// up until 1974, when they changed it, making it no longer
// be a special unit, but just a dimensionless number (which
// it is.) See the definition of the “Hz” below for a
// discussion of how this broke the SI’s definitions of
// basic circular / sinusoidal measures, though.

And down a bit, on the section about hertz, we have:

//
// Alan’s Editorializing: Here is YET ANOTHER place where the SI made a
// really stupid definition. Let’s follow their chain of definitions, shall
// we, and see how it leads to absolutely ridiculous results.

// The Hz is currently defined simply as inverse seconds. (1/s).
// See: http://physics.nist.gov/cuu/Units/units.html
//
// The base unit of frequency in the SI *used* to be “cycles per second”.
// This was fine and good. However, in 1960, the BIPM made the
// change to make the fundamental unit of frequency to
// be “Hz” which they defined as inverse seconds (without qualification.)
//
// Then, in 1974, they changed the radian from its own base unit in the SI
// to be a dimensionless number, which it indeed is (it’s a length divided by
// a length.) That change was correct and good in itself.
//
// However, the definition of the Hz was *not* corrected at the same
// time that the radian was changed. Thus, we have the conflicting SI
// definition of the radian as the dimensionless number 1 (without
// qualification) and Hz as 1/s. (Without qualification.)
//
// This means that, if you follow the rules of the SI,
// 1 Hz = 1/s = 1 radian/s which is simply inconsistent and violates basic
// ideas of sinusoidal motion, and is simply a stupid definition.
// The entire rest of the world, up until that point, knew that 1 Hz needs to
// be equal to *2 pi* radians/s or be changed to mean *cycles/second* for
// these to be reconcilable. If you use “Hz” to mean cycles/second, say,
// in sinusoidal motion, as the world has done for a century, know that the SI
// made all your calculations wrong. A couple of times, in different ways.
//
// This gives the wonderful situation that the SI’s Hz-vs-radian/s definitions
// have meant completely different things in the timeperiods:
//
// * pre-1960
// * 1960 to 1974
// * post-1974
//
//
// Thus, anyone trying to mix the SI definitions for Hz and angular
// frequencies (e.g. radians/s) will get utterly wrong answers that don’t
// match basic mathematical reality, nor match any way that Hz was ever used
// for describing, say, sinusoidal motion.
//
// Beware the SI’s broken definition
// of Hz. You should treat the radian as being correct, as a fundamental
// dimensionless property of the universe that falls out of pure math like
// the Taylor series for sin[x], and you should treat the Hz as being a
// fundamental property of incompetence by committee.
//
// One could consider the CGPM in 1960 to have made the original mistake,
// re-defining Hz in a way that did not reflect its meaning up to that point,
// or the CGPM in 1974 to have made the absolutely huge mistake that made
// the whole system inconsistent and wrong, and clearly broke the definition
// of Hz-vs-radian/s used everywhere in the world, turning it into a broken,
// self-contradictory mess that it is now.
//
// Either way, if I ever develop a time machine, I’m going to go back and
// knock both groups’ heads together. At a frequency of about 1 Hz. Or
// better yet, strap them to a wheel and tell them I’m going to spin one group
// at a frequency of 1 Hz, and the other at 1 radian/s and let them try to
// figure out which one of those stupid inconsistent definitions means what.
// Hint: It’ll depend on which time period I do it in, I guess, thanks to
// their useless inconsistent definition changes.
//
// It’s as if this bunch of geniuses took a well-understood term like “day”
// and redefined it to mean “60 minutes”. It simply breaks every historical
// use, and present use, and just causes confusion and a blatant source of
// error.
//
// In summary: Frink grudgingly follows the SI’s ridiculous, broken definition
// of “Hz”. You should not use “Hz”. The SI’s definition of Hz should be
// considered harmful and broken. Instead, if you’re talking about circular
// or sinusoidal motion, use terms like “cycles/sec” “revolutions/s”,
// “rpm”, “circle/min”, etc. and Frink will do the right thing because it
// doesn’t involve the stupid SI definition that doesn’t match what any
// human knows about sinusoidal motion. Use of “Hz” will cause communication
// problems, errors, and make one party or another look insane in the eyes
// of the other.