Significant digits in a float?

C

Chris Angelico

Yeah, but he'd have had to bring his own bear...

Bears and Penguins don't mix. Seals, OTOH, are food to the bears, and
eat the penquins.

Maybe the bear was an antarctic researcher who ate Merida's cake?
That'd change anyone's fate...

ChrisA
 
E

Ethan Furman

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).
 
S

Steven D'Aprano

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

:)
 
S

Steven D'Aprano

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).

Possibly with a rocket aimed straight up.
 
C

Chris Angelico

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
 
R

Roy Smith

Steven D'Aprano said:
Possibly with a rocket aimed straight up.

No, with a rocket aimed straight up, you go north. To go south, you
need a rocket aimed straight down.
 
C

Chris Angelico

No, with a rocket aimed straight up, you go north. To go south, you
need a rocket aimed straight down.

If I ever go travelling with you guys, I am NOT letting you navigate.

ChrisA
 
G

Gregory Ewing

Chris said:
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.

True, but there are no bears in Antarctica, so that
rules out all the south-pole solutions.

I think there are still multiple solutions, though.
The bear may have been spray-painted by activists
trying to protect it from polar trophy hunters.
 
R

Roy Smith

Chris Angelico said:
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.
 
M

Mark Lawrence

True, but there are no bears in Antarctica, so that
rules out all the south-pole solutions.

I think there are still multiple solutions, though.
The bear may have been spray-painted by activists
trying to protect it from polar trophy hunters.

Couldn't this kill the bear? My source is the book and film Goldfinger.
 
E

Ethan Furman

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.
 
E

Ethan Furman

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).
 
C

Chris Angelico

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 practicallyat
the south pole: 89.9977° south (89°59'52").

Are my calculations correct?

ChrisA
 
R

Ryan Hiebert

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.
 
G

Grant Edwards

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.
 
G

Grant Edwards

You're looking at it the wrong way. It's not that the glass is 10%
empty, it's that it's 90% full, and 90% is a lot of good data :)

If you know _which_ is the good data and which is the bad...
 
G

Grant Edwards

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?

I'm pretty sure there are places in London like that. At least that's
what it seemed like to somebody from the midwestern US where the
streets are layed out on a grid.
 
C

Chris Angelico

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,075
Messages
2,570,563
Members
47,200
Latest member
Vanessa98N

Latest Threads

Top