Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have a question

If this was true:

tan maps (0, π/2) onto (0, ∞), and tan(π/4) = 1

Wouldnt it imply that

tan(π/8) would be halfway between 0 and 1 ie .5?

By my calculations it is 0.414 or √2 - 1

ALso with:

• f(x) = x/(1 - x) maps (0, 1) onto (0, ∞), and f(1/2) = 1.

wouldnt this mean that f(0.25) is supposed to be half way between 0 and 1 or .5. However f(0.25) = 0.25/0.75 = 1/3



> tan(π/8) would be halfway between 0 and 1 ie .5?

It implies that tan(π/8) would be "halfway" between 0 and 1 in this sense of what "halfway" means. In this sense, 0.5 is not halfway between 0 and 1, 0.414 is.

It's easier to visualize it. You're standing on the roof of a 1-meter-tall building on a flat earth with a perfectly clear atmosphere. If you look straight out (90°) you can see to infinity (tan 90°). If you look down (0°) you can see where you are (tan 0°). If you look halfway between those (45°), you can see 1 (tan 45°) meter straight in front of you. But if you look halfway down again, you won't see exactly 0.5 meters, will you?


This does not imply that tan(pi/8) is 0.5. There’s some overloaded language here that I’d like to unpack:

The original issue at hand is to talk sensibly about “half way” between 0 and infinity. But in the standard way we think about distance between numbers, there’s obviously no way to do that — you can’t add and subtract real numbers to infinity!

So, implicitly what’s happening here is that by talking about a map between a finite interval and (0,inf), we are equipping (0,inf) with a new, special definition of distance between numbers. This is called a metric.

Usually, when we talk about the distance between x and y, we mean `d(x,y) = |x-y|` — this is called the Euclidean metric (in 1 dimension).

Here, we’ve introduced a new metric on (0,inf): `d2(x,y) = |tan^-1(x) - tan^-1(y)|/(pi/8)`

The half way point between 0 and 1 under the Euclidean metric is 0.5. The half way point between 0 and 1 under our fancy new metric d2 is ~0.414.

TL;DR: You can generalize the notion of “distance between two numbers”, using distance functions called metrics. Under the typical metric, the half way point between 0 and 1 is 0.5. Under our cool new infinite-tan metric, the half way point between 0 and 1 is ~0.414.


> tan(π/8) would be halfway between 0 and 1 ie .5?

tan(π/8) = √2 - 1, not 1/2, but the value is indeed halfway between 0 and 1 if you take the distance function to be

d(a, b) = |b - a| / (√(1 + a²)√(1 + b²)) or

d(a, b) = |b - a| / |1 + ab|

(These are chordal distance or stereographic distance, respectively, when the real number line is used to represent points on a circle under stereographic projection.)

The halfway point is 0.5 when you use the distance function d(a, b) = |b - a|.


It would only imply that if the tangent was a linear function of the angle, but it is not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: