fork/numbat

git clone https://git.julia.blue/fork/numbat

David PeterUpdate examples in bookdeda3fe

v1.7.0
822 B33 linesraw
1# Rounding
2#
3# https://xkcd.com/2585/
4
517 mph
6
7ans -> meters/sec    // round
8ans -> knots         // round
9ans -> fathoms/sec   // round
10ans -> furlongs/min  // round
11ans -> fathoms/sec   // round
12ans -> kph           // round
13ans -> knots         // round
14ans -> kph           // round
15ans -> furlongs/hour // round
16ans -> mph           // round
17ans -> m/s           // round
18ans -> furlongs/min  // round
19ans -> yards/sec     // round
20ans -> fathoms/sec   // round
21ans -> m/s           // round
22ans -> mph           // round
23ans -> furlongs/min  // round
24ans -> knots         // round
25ans -> yards/sec     // round
26ans -> fathoms/sec   // round
27ans -> knots         // round
28ans -> furlongs/min  // round
29ans -> mph           // round
30
31print("I can ride my bike at {ans}.")
32print("If you round.")
33assert_eq(ans, 45 mph)