
Andy Little wrote:
"Matt Calabrese" wrote
This is where I disagree. Radians ARE just ratios. More specifically,
[cut]
The definition of a radian in Appendix A (A.9) of the Guide for the Use of the International System of Units is:
"The radian is the plane angle between two radii of a circle that cut off on the circumference an arc equal to the radius."
You need to accept that definition if you are to have any chance of writing a credible Units library I'm afraid.
I'm afraid I agree with Andy and others who have posted on this. I don't know of a single mathematician who views "radians" as a synonym for "ratios", and although wikipedia is not bad for many mathematical concepts, it is definitely not authoritative. But it's more than that. I don't know how to define a clear set of semantic rules (what operations are allowed or are not allowed) for pure ratios, and I have not been able to follow what Matt has in mind here. You (Matt) might have a case, but you haven't convinced us yet. I would suggest that for the moment you represent ratios of the same quantity by a pure number type (I hope this will be a template parameter, because I want to use something besides float or double), but you should feel free to keep making your case. A short summary of what the allowable operations are, analogous to point + vector = point point - point = vector vector * scalar = vector vector +/- vector = vector would be helpful. To be honest, the "rules" that you've tried to come up with so far seem ad hoc to me and therefore unlikely to work in general. Here's an example: it is useful to feed decibels into the "10^x" function and radians into the sine function, but it is not useful to feed decibels into the sine function or radians into the "10^x" function. How do you propose to handle that kind of situation?