"Strong typing vs. strong testing"

Keith Thompson kst-u at mib.org
Tue Oct 12 21:36:42 EDT 2010


"BartC" <bc at freeuk.com> writes:
> "RG" <rNOSPAMon at flownet.com> wrote in message 
> news:rNOSPAMon-20651E.17410012102010 at news.albasani.net...
[...]
>> Likewise, all of the following are the same number written in different
>> notations:
>>
>> pi/2
>> pi/2 radians
>> 90 degrees
>> 100 gradians
>> 1/4 circle
>> 0.25 circle
>> 25% of a circle
>> 25% of 2pi
>>
>> See?
>
> But what exactly *is* this number? Is it 0.25, 1.57 or 90?

It's approximately 1.57.

> I can also write 12 inches, 1 foot, 1/3 yards, 1/5280 miles, 304.8 mm and so 
> on. They are all the same number, roughly 1/131000000 of the polar 
> circumference of the Earth.

They aren't bare numbers, they're lengths (actually the same length).

> This does depend on the actual size of an arbitrary circle, but that seems 
> little different from the choice of 0.25, 1.57 or 90 for your quarter 
> circle.

The radian is defined as a ratio of lengths.  That ratio is the same
regardless of the size of the circle.  The choice of 1/(2*pi) of the
circumference isn't arbitrary at all; there are sound mathematical
reasons for it.  Mathematicians could have chosen to set the full
circumference to 1, for example, but then a lot of computations
would contain additional multiplications and/or divisions by 2*pi.

-- 
Keith Thompson (The_Other_Keith) kst-u at mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"



More information about the Python-list mailing list