How Far to Tokyo?
The problem
Two points on Earth’s surface, given in latitude and longitude:
- London: 51.5074° N, 0.1278° W
- Tokyo: 35.6895° N, 139.6917° E
Treating the Earth as a sphere of radius 6371 km, find the great-circle distance between them to the nearest kilometre, using the spherical law of cosines:
d = R · acos( sin(lat1)·sin(lat2)
+ cos(lat1)·cos(lat2)·cos(lon2 − lon1) )
Notes
- This is the kind of problem the HP-41C’s Aviation Pac was built for, but it is only trig — any scientific calculator will do.
- London’s longitude is west, so it is negative: lon2 − lon1 = 139.6917 − (−0.1278) = 139.8195.
- Mind your angle mode. It is the usual way to get a wrong answer here.
Hint
Click for a hint
Everything inside the acos is in degrees, so do that part in DEG. But the acos itself comes
back as an angle, and the arc-length formula d = R · θ needs that angle in radians.
The tidy trick on an RPN machine: leave the calculator in DEG for all the sines and cosines, then
switch it to RAD just before taking the arccos. The arccos then comes out in radians already and
you can multiply by 6371 directly — no × π ÷ 180 step at all.
Solutions by calculator
Answer: 9,559 km
HP-42S
Set DEG (MODES menu → DEG), then:
51.5074 COS
35.6895 COS
× cos(lat1)·cos(lat2)
139.6917 ENTER 0.1278 + the longitude difference, 139.8195
COS
×
51.5074 SIN
35.6895 SIN
×
+ the whole argument of the arccos
Now switch to RAD (MODES menu → RAD) and finish:
ACOS 85.9635775…° becomes 1.50034746… rad
6371 ×
Display: 9558.7137
Elektronika MK-61
The angle mode is the physical Р-ГРД-Г slide switch. Start with it on Г (degrees).
sin is F 7, cos is F 8, arccos is F 5.
51.5074 F 8
35.6895 F 8
×
139.8195 F 8
×
51.5074 F 7
35.6895 F 7
×
+
Now slide the switch to Р (radians), then:
F 5 arccos, in radians
6371 ×
Display: 9558.7132
The MK-61 carries eight significant digits, so its last digit sits a little off the HP-42S’s 9558.7137. Both round to 9559 km.
HP-15C
Identical method. On the 15C, DEG is g 7, RAD is g 8, and COS⁻¹ is g COS.
g 7 DEG
51.5074 COS
35.6895 COS
×
139.6917 ENTER 0.1278 +
COS
×
51.5074 SIN
35.6895 SIN
×
+
g 8 RAD
g COS COS⁻¹, in radians
6371 ×
Result: ≈ 9558.7137 (in f 4, four decimal places) → 9559 km.
HP-41C
ASIN/ACOS/ATAN are built in on every 41C — no module needed. As a program:
01 LBL "GCIRC"
02 DEG
03 51.5074
04 COS
05 35.6895
06 COS
07 *
08 139.8195
09 COS
10 *
11 51.5074
12 SIN
13 35.6895
14 SIN
15 *
16 +
17 RAD
18 ACOS
19 6371
20 *
21 END
XEQ "GCIRC" gives ≈ 9558.7137 (in FIX 4) → 9559 km.
TI-84
The TI is algebraic, so the mode-switching trick doesn’t fit as neatly; stay in Degree mode
(MODE → Degree) and convert at the end. cos⁻¹ is 2nd COS, and π is 2nd ^.
6371cos⁻¹(sin(51.5074)sin(35.6895)+cos(51.5074)cos(35.6895)cos(139.8195))π/180
Result: ≈ 9558.7137 → 9559 km.
Casio fx-991
Same single expression as the TI-84. Set Degree mode first: on a ClassWiz (fx-991EX/CW) that is
SHIFT MENU → Angle Unit → Degree; on an older fx-991ES it is SHIFT MODE → Degree.
6371 × cos⁻¹(sin(51.5074)sin(35.6895)+cos(51.5074)cos(35.6895)cos(139.8195)) × π ÷ 180
Result: ≈ 9558.7137 → 9559 km.
Solvable on: HP-42S, HP-15C, HP-41C, Elektronika MK-61, TI-84, Casio fx-991