Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70682 > unrolled thread

Significant digits in a float?

Started byRoy Smith <roy@panix.com>
First post2014-04-28 12:00 -0400
Last post2014-04-30 18:18 +0000
Articles 18 on this page of 78 — 23 participants

Back to article view | Back to comp.lang.python


Contents

  Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-28 12:00 -0400
    Re: Significant digits in a float? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-29 02:34 +0000
      Re: Significant digits in a float? Ben Finney <ben@benfinney.id.au> - 2014-04-29 13:23 +1000
        Re: Significant digits in a float? Steven D'Aprano <steve@pearwood.info> - 2014-04-29 05:43 +0000
          Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-29 20:33 -0400
            Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 20:42 -0400
              Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-30 20:02 -0400
                Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-04-30 22:54 -0500
                  Re: Significant digits in a float? Paul Rubin <no.email@nospam.invalid> - 2014-04-30 20:56 -0700
                    Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-04-30 23:16 -0500
                      Re: Significant digits in a float? William Ray Wing <wrw@mac.com> - 2014-05-01 11:53 -0400
                        Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-05-06 11:29 -0500
                      Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-01 22:06 -0400
                        Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-05-06 09:51 -0500
                          Re: Significant digits in a float? alister <alister.nospam.ware@ntlworld.com> - 2014-05-06 15:18 +0000
                            Re: Significant digits in a float? Joel Goldstick <joel.goldstick@gmail.com> - 2014-05-06 12:14 -0400
                          Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-06 19:48 -0400
                  Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-05-01 08:56 -0400
                    Re: Significant digits in a float? Larry Hudson <orgnut@yahoo.com> - 2014-05-01 12:51 -0700
                      Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-05-01 22:05 +0100
                  Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-01 21:47 -0400
                    Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-05-06 09:59 -0500
                      [OT] Silde rules [was Re: Significant digits in a float?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-06 16:10 +0000
                        Re: [OT] Silde rules Ben Finney <ben@benfinney.id.au> - 2014-05-07 10:01 +1000
                Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-05-01 21:55 +0100
                  Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-05-01 22:26 -0400
                    Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-05-08 20:58 +0100
      Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 09:38 -0400
        Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 02:30 +1000
          Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 19:53 -0400
            Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 10:13 +1000
            Re: Significant digits in a float? Ben Finney <ben@benfinney.id.au> - 2014-04-30 10:13 +1000
            Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 10:17 +1000
            Re: Significant digits in a float? Ben Finney <ben@benfinney.id.au> - 2014-04-30 10:20 +1000
            Re: Significant digits in a float? Grant Edwards <invalid@invalid.invalid> - 2014-04-30 18:19 +0000
        Re: Significant digits in a float? Ned Batchelder <ned@nedbatchelder.com> - 2014-04-29 12:47 -0400
          Re: Significant digits in a float? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-30 09:45 +1200
        Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 02:59 +1000
        Re: Significant digits in a float? Adam Funk <a24061@ducksburg.com> - 2014-04-29 21:16 +0100
          Re: Significant digits in a float? Mark H Harris <harrismh777@gmail.com> - 2014-04-29 15:39 -0500
            Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 07:15 +1000
          Re: Significant digits in a float? Ryan Hiebert <ryan@ryanhiebert.com> - 2014-04-29 15:42 -0500
          Re: Significant digits in a float? emile <emile@fenx.com> - 2014-04-29 15:42 -0700
            Re: Significant digits in a float? alister <alister.nospam.ware@ntlworld.com> - 2014-04-30 09:03 +0000
            Re: Significant digits in a float? Grant Edwards <invalid@invalid.invalid> - 2014-04-30 18:21 +0000
              Re: Significant digits in a float? emile <emile@fenx.com> - 2014-05-01 09:34 -0700
                Re: Significant digits in a float? alister <alister.nospam.ware@ntlworld.com> - 2014-05-01 17:13 +0000
          Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 08:51 +1000
            Re: Significant digits in a float? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-30 20:14 +1200
              Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 18:27 +1000
              Re: Significant digits in a float? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-30 14:05 +0100
          Re: Significant digits in a float? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-30 00:34 +0100
          Re: Significant digits in a float? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-29 20:37 -0400
          Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 20:45 -0400
          Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 10:45 +1000
            Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 20:48 -0400
          Re: Significant digits in a float? Ethan Furman <ethan@stoneleaf.us> - 2014-04-29 19:31 -0700
            Re: Significant digits in a float? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-30 02:59 +0000
              Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-29 23:30 -0400
                Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 13:40 +1000
          Re: Significant digits in a float? Chris Angelico <rosuav@gmail.com> - 2014-04-30 13:03 +1000
            Re: Significant digits in a float? Roy Smith <roy@panix.com> - 2014-04-30 08:01 -0400
          Off-topic  circumnavigating the earth in a mile or less  [was Re: Significant digits in a float?] Ethan Furman <ethan@stoneleaf.us> - 2014-04-30 06:14 -0700
          Re: Off-topic  circumnavigating the earth in a mile or less  [was Re: Significant digits in a float?] Ethan Furman <ethan@stoneleaf.us> - 2014-04-30 07:02 -0700
            Re: Off-topic  circumnavigating the earth in a mile or less Adam Funk <a24061@ducksburg.com> - 2014-05-01 21:52 +0100
          Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Chris Angelico <rosuav@gmail.com> - 2014-05-01 00:27 +1000
          Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Chris Angelico <rosuav@gmail.com> - 2014-05-01 05:10 +1000
          Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Ryan Hiebert <ryan@ryanhiebert.com> - 2014-04-30 10:24 -0500
          Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-30 17:46 -0600
          Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Terry Reedy <tjreedy@udel.edu> - 2014-04-30 22:20 -0400
            Re: Off-topic circumnavigating the earth in a mile or less [was Re:   Significant digits in a float?] Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-05-01 18:16 +1200
            Re: Off-topic circumnavigating the earth in a mile or less Adam Funk <a24061@ducksburg.com> - 2014-05-01 21:57 +0100
              Re: Off-topic circumnavigating the earth in a mile or less Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-05-01 22:49 +0100
              Re: Off-topic circumnavigating the earth in a mile or less alister <alister.nospam.ware@ntlworld.com> - 2014-05-02 08:49 +0000
          Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Chris Angelico <rosuav@gmail.com> - 2014-05-01 11:57 +1000
          Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?] Vlastimil Brom <vlastimil.brom@gmail.com> - 2014-05-01 09:49 +0200
        Re: Significant digits in a float? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-30 02:50 +0000
        Re: Significant digits in a float? Grant Edwards <invalid@invalid.invalid> - 2014-04-30 18:18 +0000

Page 4 of 4 — ← Prev page 1 2 3 [4]


#70762

FromChris Angelico <rosuav@gmail.com>
Date2014-04-30 13:03 +1000
Message-ID<mailman.9603.1398833574.18130.python-list@python.org>
In reply to#70729
On Wed, Apr 30, 2014 at 12:31 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
> On 04/29/2014 03:51 PM, Chris Angelico wrote:
>> Any point where the mile east takes you an exact number of times
>> around the globe. So, anywhere exactly one mile north of that, which
>> is a number of circles not far from the south pole.
>
> Perhaps my geography is rusty, but I was under the impression that one
> cannot travel south if one is at the South Pole (axial, not magnetic).

Correct, but there's a place not far from the South Pole where the
circumference of the earth (travelling east) will be exactly one mile.
I could calculate where that would be on a perfect sphere, but earth
isn't, so I'll just say "near the South Pole". If you start exactly
one mile north of that circle, then you can accomplish the original
challenge. Also, if your mile east takes you exactly twice around the
circumference, you still achieve the same thing, so there's another
circle (one mile north of *that* circle), and another at the
three-times-around circle, etc.

But I think a better answer is New York City. You start out lost, you
go a mile south, a mile east, a mile north, and you are again lost.

ChrisA

[toc] | [prev] | [next] | [standalone]


#70772

FromRoy Smith <roy@panix.com>
Date2014-04-30 08:01 -0400
Message-ID<roy-6105DA.08013930042014@news.panix.com>
In reply to#70762
In article <mailman.9603.1398833574.18130.python-list@python.org>,
 Chris Angelico <rosuav@gmail.com> wrote:

> But I think a better answer is New York City. You start out lost, you
> go a mile south, a mile east, a mile north, and you are again lost.

Only in Queens.

[toc] | [prev] | [next] | [standalone]


#70778 — Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromEthan Furman <ethan@stoneleaf.us>
Date2014-04-30 06:14 -0700
SubjectOff-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9609.1398865011.18130.python-list@python.org>
In reply to#70729
On 04/29/2014 03:51 PM, Chris Angelico wrote:
> On Wed, Apr 30, 2014 at 8:42 AM, emile <emile@fenx.com> wrote:
>> On 04/29/2014 01:16 PM, Adam Funk wrote:
>>
>>> "A man pitches his tent, walks 1 km south, walks 1 km east, kills a
>>> bear, & walks 1 km north, where he's back at his tent.  What color is
>>> the bear?"  ;-)
>>
>>
>>  From how many locations on Earth can someone walk one mile south, one mile
>> east, and one mile north and end up at their starting point?
>
> Any point where the mile east takes you an exact number of times
> around the globe. So, anywhere exactly one mile north of that, which
> is a number of circles not far from the south pole.

It is my contention, completely unbacked by actual research, that if you find such a spot (heading a mile east takes you 
an integral number of times around the pole), that there is not enough Earth left to walk a mile north so that you could 
then turn-around a walk a mile south to get back to such a location.

--
~Ethan~

[toc] | [prev] | [next] | [standalone]


#70779 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromEthan Furman <ethan@stoneleaf.us>
Date2014-04-30 07:02 -0700
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9610.1398869293.18130.python-list@python.org>
In reply to#70729
On 04/30/2014 06:14 AM, Ethan Furman wrote:
> On 04/29/2014 03:51 PM, Chris Angelico wrote:
>> On Wed, Apr 30, 2014 at 8:42 AM, emile <emile@fenx.com> wrote:
>>> On 04/29/2014 01:16 PM, Adam Funk wrote:
>>>
>>>> "A man pitches his tent, walks 1 km south, walks 1 km east, kills a
>>>> bear, & walks 1 km north, where he's back at his tent.  What color is
>>>> the bear?"  ;-)
>>>
>>>
>>>  From how many locations on Earth can someone walk one mile south, one mile
>>> east, and one mile north and end up at their starting point?
>>
>> Any point where the mile east takes you an exact number of times
>> around the globe. So, anywhere exactly one mile north of that, which
>> is a number of circles not far from the south pole.
>
> It is my contention, completely unbacked by actual research, that if you find such a spot (heading a mile east takes you
> an integral number of times around the pole), that there is not enough Earth left to walk a mile north so that you could
> then turn-around a walk a mile south to get back to such a location.

Wow.  It's amazing how writing something down, wrongly (I originally had north and south reversed), correcting it, 
letting some time pass (enough to post the message so one can be properly embarrassed ;), and then rereading it later 
can make something so much clearer!

Or maybe it was the morning caffeine.  Hmmm.

At any rate, I withdraw my contention, it is clear to me now (at least until the caffeine wears off).

--
~Ethan~

[toc] | [prev] | [next] | [standalone]


#70825 — Re: Off-topic circumnavigating the earth in a mile or less

FromAdam Funk <a24061@ducksburg.com>
Date2014-05-01 21:52 +0100
SubjectRe: Off-topic circumnavigating the earth in a mile or less
Message-ID<sooa3bxuk7.ln2@news.ducksburg.com>
In reply to#70779
On 2014-04-30, Ethan Furman wrote:

> Wow.  It's amazing how writing something down, wrongly (I originally had north and south reversed), correcting it, 
> letting some time pass (enough to post the message so one can be properly embarrassed ;), and then rereading it later 
> can make something so much clearer!

It's amazing how big a subthread appeared in response to a gag that I
think I got from a Car Talk puzzler.


-- 
A recent study conducted by Harvard University found that the average
American walks about 900 miles a year. Another study by the AMA found
that Americans drink, on average, 22 gallons of alcohol a year. This
means, on average, Americans get about 41 miles to the gallon.
                 http://www.cartalk.com/content/average-americans-mpg

[toc] | [prev] | [next] | [standalone]


#70784 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromChris Angelico <rosuav@gmail.com>
Date2014-05-01 00:27 +1000
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9612.1398875917.18130.python-list@python.org>
In reply to#70729
On Wed, Apr 30, 2014 at 11:14 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
>> Any point where the mile east takes you an exact number of times
>> around the globe. So, anywhere exactly one mile north of that, which
>> is a number of circles not far from the south pole.
>
>
> It is my contention, completely unbacked by actual research, that if you
> find such a spot (heading a mile east takes you an integral number of times
> around the pole), that there is not enough Earth left to walk a mile north
> so that you could then turn-around a walk a mile south to get back to such a
> location.

The circle where the distance is exactly one mile will be fairly near
the south pole. There should be plenty of planet a mile to the north
of that.

If the earth were a perfect sphere, the place we're looking for is the
place where cutting across the sphere is 1/π miles. The radius of the
earth is approximately 4000 miles (give or take). So we're looking for
the place where the chord across a radius 4000 circle is 1/π; that
means the triangle formed by a radius of the earth and half of 1/π and
an unknown side (the distance from the centre of the earth to the
point where the chord meets it - a smidge less than 4000, but the
exact distance is immaterial) is a right triangle. Trig functions to
the rescue! We want latitude 90°-(asin 1/8000π). It's practically at
the south pole: 89.9977° south (89°59'52").

Are my calculations correct?

ChrisA

[toc] | [prev] | [next] | [standalone]


#70790 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromChris Angelico <rosuav@gmail.com>
Date2014-05-01 05:10 +1000
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9615.1398885014.18130.python-list@python.org>
In reply to#70729
On Thu, May 1, 2014 at 12:02 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
> Wow.  It's amazing how writing something down, wrongly (I originally had
> north and south reversed), correcting it, letting some time pass (enough to
> post the message so one can be properly embarrassed ;), and then rereading
> it later can make something so much clearer!
>
> Or maybe it was the morning caffeine.  Hmmm.
>
> At any rate, I withdraw my contention, it is clear to me now (at least until
> the caffeine wears off).

It's also amazing how much fun it can be to dig into the actual
mathematics, as a means of dispelling a perceived error :)

So, thank you for posting that, because it forced me to actually map
things out (in my head - didn't feel like using pen-and-paper
geometry, even though this is the most literal form of geo-metry
possible) and figure out exactly how many degrees of latitude it
takes. Good fun!

ChrisA

[toc] | [prev] | [next] | [standalone]


#70795 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromRyan Hiebert <ryan@ryanhiebert.com>
Date2014-04-30 10:24 -0500
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9620.1398905907.18130.python-list@python.org>
In reply to#70729

[Multipart message — attachments visible in raw view] — view raw

On Wed, Apr 30, 2014 at 9:02 AM, Ethan Furman <ethan@stoneleaf.us> wrote:

> On 04/30/2014 06:14 AM, Ethan Furman wrote:
>
>> On 04/29/2014 03:51 PM, Chris Angelico wrote:
>>
>>> On Wed, Apr 30, 2014 at 8:42 AM, emile <emile@fenx.com> wrote:
>>>
>>>> On 04/29/2014 01:16 PM, Adam Funk wrote:
>>>>
>>>>  "A man pitches his tent, walks 1 km south, walks 1 km east, kills a
>>>>> bear, & walks 1 km north, where he's back at his tent.  What color is
>>>>> the bear?"  ;-)
>>>>>
>>>>
>>>>
>>>>  From how many locations on Earth can someone walk one mile south, one
>>>> mile
>>>> east, and one mile north and end up at their starting point?
>>>>
>>>
>>> Any point where the mile east takes you an exact number of times
>>> around the globe. So, anywhere exactly one mile north of that, which
>>> is a number of circles not far from the south pole.
>>>
>>
>> It is my contention, completely unbacked by actual research, that if you
>> find such a spot (heading a mile east takes you
>> an integral number of times around the pole), that there is not enough
>> Earth left to walk a mile north so that you could
>> then turn-around a walk a mile south to get back to such a location.
>>
>
> Wow.  It's amazing how writing something down, wrongly (I originally had
> north and south reversed), correcting it, letting some time pass (enough to
> post the message so one can be properly embarrassed ;), and then rereading
> it later can make something so much clearer!
>
> Or maybe it was the morning caffeine.  Hmmm.
>
> At any rate, I withdraw my contention, it is clear to me now (at least
> until the caffeine wears off).
>
> Sure, but that still leaves the nagging problem that there aren't any
Polar Bears in Antarctica (as someone else pointed out). This man must have
brought a bear with him.


Perhaps the story is something like this:

A man near the south pole takes his dear friend and pet bear for a walk.
He'd gone to great lengths to bring his pet bear with him to his Antarctic
expedition, and his bear is his best friend, and sole companion, save for
the constant, biting cold. They walk toward the pole, then begin their
excursion eastward, encircling the pole.

As the man grows weary, and decides to head back, a legion of penguins
collaborate with a host of Weddell seals to be rid of their uninvited
guests. It isn't clear what the man did to cause those seals to rise
against him, but it must have been some dire feat, for Weddell seals are
not easily frightened.

After a fierce battle, the man and his bear (well, mostly the bear) manage
to defend themselves against the attacking throng. However, the new peace
realizes a terrible fate: his bear is mortally wounded, and is suffering
immensely. The man, loving his friend dearly, shoots his solitary
compatriot, and weeps as he watches the blood turn his dear bear's fur an
ominous red.

Overcome with grief, he heads back north to his tent to mourn his loss, and
to arrange his trip north to the populated tropics, where he hopes to
forget his troubles, and the place where he lost his closet pal, a bear.

[toc] | [prev] | [next] | [standalone]


#70796 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromIan Kelly <ian.g.kelly@gmail.com>
Date2014-04-30 17:46 -0600
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9621.1398905909.18130.python-list@python.org>
In reply to#70729
On Wed, Apr 30, 2014 at 7:14 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
> On 04/29/2014 03:51 PM, Chris Angelico wrote:
>>
>> On Wed, Apr 30, 2014 at 8:42 AM, emile <emile@fenx.com> wrote:
>>>
>>> On 04/29/2014 01:16 PM, Adam Funk wrote:
>>>
>>>> "A man pitches his tent, walks 1 km south, walks 1 km east, kills a
>>>> bear, & walks 1 km north, where he's back at his tent.  What color is
>>>> the bear?"  ;-)
>>>
>>>
>>>
>>>  From how many locations on Earth can someone walk one mile south, one
>>> mile
>>> east, and one mile north and end up at their starting point?
>>
>>
>> Any point where the mile east takes you an exact number of times
>> around the globe. So, anywhere exactly one mile north of that, which
>> is a number of circles not far from the south pole.

It also works if your starting point is (precisely) the north pole.  I
believe that's the canonical answer to the riddle, since there are no
bears in Antarctica.

[toc] | [prev] | [next] | [standalone]


#70799 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromTerry Reedy <tjreedy@udel.edu>
Date2014-04-30 22:20 -0400
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9623.1398910910.18130.python-list@python.org>
In reply to#70729
On 4/30/2014 7:46 PM, Ian Kelly wrote:

> It also works if your starting point is (precisely) the north pole.  I
> believe that's the canonical answer to the riddle, since there are no
> bears in Antarctica.

For the most part, there are no bears within a mile of the North Pole 
either. "they are rare north of 88°" (ie, 140 miles from pole).
https://en.wikipedia.org/wiki/Polar_bears
They mostly hunt in or near open water, near the coastlines.

I find it amusing that someone noticed and posted an alternate, 
non-canonical  solution. How might a bear be near the south pole? As 
long as we are being creative, suppose some jokester mounts a near 
life-size stuffed black bear, made of cold-tolerant artificial 
materials, near but not at the South Pole. The intent is to give fright 
to naive newcomers. Someone walking in a radius 1/2pi circle about the 
pole might easily see it.

-- 
Terry Jan Reedy


[toc] | [prev] | [next] | [standalone]


#70809 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2014-05-01 18:16 +1200
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<bse75qFtiivU1@mid.individual.net>
In reply to#70799
Terry Reedy wrote:
> For the most part, there are no bears within a mile of the North Pole 
> either. "they are rare north of 88°" (ie, 140 miles from pole).
> https://en.wikipedia.org/wiki/Polar_bears
> They mostly hunt in or near open water, near the coastlines.

The way things are going, the coastline might be
within a mile of the north pole quite soon.

-- 
Greg

[toc] | [prev] | [next] | [standalone]


#70826 — Re: Off-topic circumnavigating the earth in a mile or less

FromAdam Funk <a24061@ducksburg.com>
Date2014-05-01 21:57 +0100
SubjectRe: Off-topic circumnavigating the earth in a mile or less
Message-ID<l3pa3bxuk7.ln2@news.ducksburg.com>
In reply to#70799
On 2014-05-01, Terry Reedy wrote:

> On 4/30/2014 7:46 PM, Ian Kelly wrote:
>
>> It also works if your starting point is (precisely) the north pole.  I
>> believe that's the canonical answer to the riddle, since there are no
>> bears in Antarctica.
>
> For the most part, there are no bears within a mile of the North Pole 
> either. "they are rare north of 88°" (ie, 140 miles from pole).
> https://en.wikipedia.org/wiki/Polar_bears
> They mostly hunt in or near open water, near the coastlines.
>
> I find it amusing that someone noticed and posted an alternate, 
> non-canonical  solution. How might a bear be near the south pole? As 
> long as we are being creative, suppose some jokester mounts a near 
> life-size stuffed black bear, made of cold-tolerant artificial 
> materials, near but not at the South Pole. The intent is to give fright 
> to naive newcomers. Someone walking in a radius 1/2pi circle about the 
> pole might easily see it.

OK, change bear to bird & the question to "What kind of bird is it?"


-- 
There's no money in poetry, but there's no poetry in
money either.                      --- Robert Graves

[toc] | [prev] | [next] | [standalone]


#70828 — Re: Off-topic circumnavigating the earth in a mile or less

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-05-01 22:49 +0100
SubjectRe: Off-topic circumnavigating the earth in a mile or less
Message-ID<mailman.9636.1398980959.18130.python-list@python.org>
In reply to#70826
On 01/05/2014 21:57, Adam Funk wrote:
> On 2014-05-01, Terry Reedy wrote:
>
>> On 4/30/2014 7:46 PM, Ian Kelly wrote:
>>
>>> It also works if your starting point is (precisely) the north pole.  I
>>> believe that's the canonical answer to the riddle, since there are no
>>> bears in Antarctica.
>>
>> For the most part, there are no bears within a mile of the North Pole
>> either. "they are rare north of 88°" (ie, 140 miles from pole).
>> https://en.wikipedia.org/wiki/Polar_bears
>> They mostly hunt in or near open water, near the coastlines.
>>
>> I find it amusing that someone noticed and posted an alternate,
>> non-canonical  solution. How might a bear be near the south pole? As
>> long as we are being creative, suppose some jokester mounts a near
>> life-size stuffed black bear, made of cold-tolerant artificial
>> materials, near but not at the South Pole. The intent is to give fright
>> to naive newcomers. Someone walking in a radius 1/2pi circle about the
>> pole might easily see it.
>
> OK, change bear to bird & the question to "What kind of bird is it?"
>

A buffalo with an aqualung possibly?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

[toc] | [prev] | [next] | [standalone]


#70854 — Re: Off-topic circumnavigating the earth in a mile or less

Fromalister <alister.nospam.ware@ntlworld.com>
Date2014-05-02 08:49 +0000
SubjectRe: Off-topic circumnavigating the earth in a mile or less
Message-ID<7_I8v.213288$Ey6.51141@fx24.am4>
In reply to#70826
On Thu, 01 May 2014 21:57:57 +0100, Adam Funk wrote:

> On 2014-05-01, Terry Reedy wrote:
> 
>> On 4/30/2014 7:46 PM, Ian Kelly wrote:
>>
>>> It also works if your starting point is (precisely) the north pole.  I
>>> believe that's the canonical answer to the riddle, since there are no
>>> bears in Antarctica.
>>
>> For the most part, there are no bears within a mile of the North Pole
>> either. "they are rare north of 88°" (ie, 140 miles from pole).
>> https://en.wikipedia.org/wiki/Polar_bears They mostly hunt in or near
>> open water, near the coastlines.
>>
>> I find it amusing that someone noticed and posted an alternate,
>> non-canonical  solution. How might a bear be near the south pole? As
>> long as we are being creative, suppose some jokester mounts a near
>> life-size stuffed black bear, made of cold-tolerant artificial
>> materials, near but not at the South Pole. The intent is to give fright
>> to naive newcomers. Someone walking in a radius 1/2pi circle about the
>> pole might easily see it.
> 
> OK, change bear to bird & the question to "What kind of bird is it?"


Arctic Turn is a valid answer for all locations :-)


-- 
Pardon me, but do you know what it means to be TRULY ONE with your BOOTH!

[toc] | [prev] | [next] | [standalone]


#70800 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromChris Angelico <rosuav@gmail.com>
Date2014-05-01 11:57 +1000
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9624.1398910951.18130.python-list@python.org>
In reply to#70729
On Thu, May 1, 2014 at 9:46 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> It also works if your starting point is (precisely) the north pole.  I
> believe that's the canonical answer to the riddle, since there are no
> bears in Antarctica.

Yeah but that's way too obvious! Anyway, it's rather hard to navigate
due south from the north pole. Which way do you go? How do you know
you're still going due south? Will the rocket even light in that
climate?

Important questions must be answered!

ChrisA

[toc] | [prev] | [next] | [standalone]


#70810 — Re: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]

FromVlastimil Brom <vlastimil.brom@gmail.com>
Date2014-05-01 09:49 +0200
SubjectRe: Off-topic circumnavigating the earth in a mile or less [was Re: Significant digits in a float?]
Message-ID<mailman.9627.1398932751.18130.python-list@python.org>
In reply to#70729
2014-05-01 3:57 GMT+02:00 Chris Angelico <rosuav@gmail.com>:
> On Thu, May 1, 2014 at 9:46 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>> It also works if your starting point is (precisely) the north pole.  I
>> believe that's the canonical answer to the riddle, since there are no
>> bears in Antarctica.
>
> Yeah but that's way too obvious! Anyway, it's rather hard to navigate
> due south from the north pole. Which way do you go? How do you know
> you're still going due south? Will the rocket even light in that
> climate?
>
> Important questions must be answered!
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list

Well, after having been following the discussion, I couldn't resist
but post the relevant sketch from the famous Czech play  "The Conquest
of the North Pole by the Czech Karel Němec on 5th April 1909" by Jara
Cimrman [as "dicovered" and presented by Z. Sverak and L. Smoljak]
(translated by Craig Cravens)

http://jaracimrman.files.wordpress.com/2010/04/north_pole.pdf  (pp. 38-39)

============

Teacher: And now, friends, I’d like to draw your attention to a
certain geographical
peculiarity. If I stand next to the chief and step off in any
direction, I always go south.
Pharmacist: No!
Teacher: Yes, yes! Watch! (stands next to the chief and steps off.)
I’m going south.
(He returns and sets off in another direction.) And now I’m going
south again. And now
—once again south.
Pharmacist: That’s unbelievable!
Teacher: Hold on, you haven’t seen anything yet. Richard, stand here
with your back to
the chief. And now both of you, step forward.
(Schwarzenegger and the chief, with their backs to each other, step forward.)
Did you see that? They’re both going south!
Pharmacist: That’s really something else!
Teacher: And I’ve saved the best for last. Now, you’ll really see
something. Vojtěch,
mark the Pole with an X and step aside.
(Vojtěch obeys. The teacher sets off toward the mark.)
Watch this. I’m going north (he crosses the mark and continues
walking) and now I’m
going south! And now back: north … and now south.
Pharmacist: That’s impossible!
Teacher: Try it yourself.
Pharmacist: This I’ve got to see. (He walks towards the pole and
the<m> moment he
crosses it his face lights up with joy.) Wow! Friends, this was worth
it! On the verge of
death from hypothermia, from hunger, and from exhaustion, but it was worth it!


=============

regards,
   vbr

[toc] | [prev] | [next] | [standalone]


#70756

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2014-04-30 02:50 +0000
Message-ID<53606512$0$29965$c3e8da3$5496439d@news.astraweb.com>
In reply to#70713
On Tue, 29 Apr 2014 09:38:33 -0400, Roy Smith wrote:

> > What reason do you have to think that something recorded to 14 decimal
> > places was only intended to have been recorded to 4?
> 
> Because I understand the physical measurement these numbers represent.
> Sometimes, Steve, you have to assume that when somebody asks a question,
> they actually have asked the question then intended to ask.

Heh, having been in *exactly* your situation of having people questioning 
my constraints, I can sympathise with your frustration. I was pretty 
frustrated too.

But I've also been in situations where I've been so close to a question 
that I couldn't see the big picture, and a few dumb questions made me 
realise that in fact I was missing something obvious which changed the 
situation completely. To paraphrase:

Me:   How do I square the circle with only a compass and straightedge?
Them: You can't. It's impossible. Are you sure you need only use
      compass and straightedge? Can you use a rolling circle and a 
      marked ruler?
Me:   Come come, I've told you my requirements, compass and straightedge
      only. Now solve my problem!
Them: Does it have to be in Euclidean space? Why don't you perform 
      the construction in Gauss-Bolyai-Lobachevsky space?
Me:   Perhaps a rolling circle and ruler isn't such a bad idea...


http://www.cut-the-knot.org/impossible/sq_circle.shtml
http://mathworld.wolfram.com/CircleSquaring.html

:-)




-- 
Steven D'Aprano
http://import-that.dreamwidth.org/

[toc] | [prev] | [next] | [standalone]


#70785

FromGrant Edwards <invalid@invalid.invalid>
Date2014-04-30 18:18 +0000
Message-ID<ljrep7$hte$1@reader1.panix.com>
In reply to#70713
On 2014-04-29, Roy Smith <roy@panix.com> wrote:

>> What reason do you have to think that something recorded to 14 
>> decimal places was only intended to have been recorded to 4?
>
> Because I understand the physical measurement these numbers represent.  
> Sometimes, Steve, you have to assume that when somebody asks a question, 
> they actually have asked the question then intended to ask.

Sometimes.  But the smart money bets against it -- especially when
people are asking about floating point. :)

It doesn't sound to me like you have enough information to reliably do
what you want to do, but parsing the string representation is probably
the best way to go.

-- 
Grant Edwards               grant.b.edwards        Yow! HELLO KITTY gang
                                  at               terrorizes town, family
                              gmail.com            STICKERED to death!

[toc] | [prev] | [standalone]


Page 4 of 4 — ← Prev page 1 2 3 [4]

Back to top | Article view | comp.lang.python


csiph-web