tiffany352 / rink-rs

Unit conversion tool and library written in rust
https://rinkcalc.app/about
GNU General Public License v3.0
442 stars 28 forks source link

Add definitions for cycles per second #61

Open tiffany352 opened 4 years ago

tiffany352 commented 4 years ago

New base unit: cycle. New unit: cps -> cycles_per_second -> 1 cycle / s.

Guillawme commented 2 months ago

About this, the unit file from Frink has interesting notes:

hertz := s^-1 // frequency Hz := hertz // // 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: https://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. // // Frink tries to follow the most authoritative international standards bodies // for all of its definitions. However, when authoritative international // standards bodies change definitions silently to make them inconsistent // with their previous definitions and with centuries of fundamental // mathematical definitions, then Frink would be negligent to not try to // warn you of the huge incompatibilities in the strongest possible way. // // One of Frink's design goals is: "When in doubt, be pedantic. Explain to // people how their calculation might be problematic and help them to write // it in a more standardized, unambiguous way." The re-definition of the Hz // is an actively damaging change that has to be warned about in the strongest // possible terms. // // 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", "rps", "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. // // WARNING: Use of "Hz" will cause communication problems, errors, and make // one party or another look insane in the eyes of the other. // // In other words, if you use the Hz in the way it's currently defined by the // SI, as equivalent to 1 radian/s, you can point to the SI definitions and // prove that you follow their definitions precisely. And your physics // teacher will still* fail you and your clients will think you're completely // incompetent because 1 Hz = 2 pi radians/s. And it has for centuries. // You are both simultaneously both right and both wrong.
// You cannot win. // You are perfectly right. You are perfectly wrong. You look dumb and // unreasonable. The person arguing the opposite looks dumb and unreasonable. // // Hz == YOU CANNOT WIN // // (Insert "IT'S A TRAP" image here.)