Re:1.5 is the midpoint between 0 and infinity in Ruby
by jacobolus on Friday November 27, 2020 @04:27PM
(#25232726)
> 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|.
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|.