"Strong typing vs. strong testing"
BartC
bc at freeuk.com
Wed Oct 13 14:21:29 CEST 2010
"RG" <rNOSPAMon at flownet.com> wrote in message
news:rNOSPAMon-EE76E8.18291912102010 at news.albasani.net...
> In article <i930ek$uvp$1 at news.eternal-september.org>,
> "BartC" <bc at freeuk.com> wrote:
>> "RG" <rNOSPAMon at flownet.com> wrote in message
>> > 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 an irrational number, so it cannot be written out exactly. But
> it's approximately 1.57.
My money would have been on 0.25, based on using 1.0 for a 360° circular
angle. It seems far more attractive than using the arbitrary-looking 6.28...
(I understand that when 2 pi is used, this works more naturally in certain
mathematical formulae.)
>> 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.
>
> These aren't numbers, these are lengths. They correspond to a physical
> thing out there in the real world. Numbers don't.
>
>> 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.
>
> Why does it seem "little different"? That is exactly the difference.
> What you're doing in your "1/131000000 of the polar circumference of the
> Earth" is taking the number 1/131000000 and using it to describe a
> length.
My example was based on the fact that a metre was once defined as 1/10000000
of the equator-pole distance. They were taking the number 1/10000000 and
using it to describe a length (of a unit called a metre).
Above, you're using 1/(two pi), and using it to describe an angle (of a unit
called a radian).
The only difference is that on a different planet, they would almost
certainly use a different unit for length, but would quite possibly still
use radians for angles, amongst others units.
--
Bartc
More information about the Python-list
mailing list