"Strong typing vs. strong testing"

Tim Bradshaw tfb at tfeb.org
Tue Oct 12 08:23:11 EDT 2010


On 2010-10-12 11:16:09 +0100, Ben said:

> Angles aren't "true" units, as they are ratios of two lengths. They
> are more of a "pseudo" unit.

That's right, in fact angles are pure numbers.  In general any function 
which raises its argument to more than one power (for instance anything 
with a non-trivial power series (Taylor series) expansion) doesn't make 
much sense if its argument has units.  Transcendendal functions are all 
like that, of course.

For instance sin(x) = x + s^3/6 + O(x^5), so sin(1m) would be 1m + 
1m^3/6 + O(m^5), and it doesn't make sense to add metres and cubic 
metres (let alone the infinite number of higher-order terms!). 




More information about the Python-list mailing list