2024-09-23

[EN] SI to fur/ftn (units & values)

(defconstant fur (* 220 3 12 254/100 1/100)
  "A furlong, 220 yards (m).")

(defconstant ftn (* 14 24 3600)
  "A fortnight (s).")

(defun fur/ftn (v)
  "Convert m/s to furlong/fortnight.
Exactly for an exact argument."
  (/ v (/ fur ftn)))

(fur/ftn 1) ;unit
6.012885e+3
(let ((u (/ fur ftn)))
  `(,(float u) ,(fur/ftn u))) ;unit
(1.6630952e-4 1)
(fur/ftn (/ 5e3 3600)) ;typical human walking
8.351229e+3
(fur/ftn (* 7.6 1852 1/3600)) ;typical WW2 U-boot (submerged)
2.3509045e+4
(fur/ftn (* 17.7 1852 1/3600)) ;typical WW2 U-boot (surface)
5.475133e+4
(fur/ftn (/ 120e3 3600)) ;typical speed limit (divided highway)
2.0042948e+5
(fur/ftn 335) ;typical Mach 1: standard day, sea level (NASA; 1100 ft/s)
2.0143164e+6
(fur/ftn 11.186e3) ;Earth escape velocity
6.726013e+7
(fur/ftn 299792458) ;light
1.8026175e+12

See also:

_________
The above was produced with the help of the following (something of a rarity where casual use of EVAL is more or less warranted):

(with-open-file (out "/storage/emulated/0/Documents/fur-ftn.txt" :direction :output :if-exists :supersede)
  (loop with *print-case* = ':downcase
    for x in '(
((fur/ftn 1)
 "unit")
((let ((u (/ fur ftn)))
  `(,(float u) ,(fur/ftn u)))
 "unit")
((fur/ftn (/ 5e3 3600))
 "typical human walking")
((fur/ftn (* 7.6 1852 1/3600))
 "typical WW2 U-boot (submerged)")
((fur/ftn (* 17.7 1852 1/3600))
 "typical WW2 U-boot (surface)")
((fur/ftn (/ 120e3 3600))
 "typical speed limit (divided highway)")
((fur/ftn 335)
 "typical Mach 1: standard day, sea level (NASA; 1100 ft/s)")
((fur/ftn 11.186e3)
 "Earth escape velocity")
((fur/ftn 299792458)
 "light")
)
  do
  (format out "~S ;~A~%~E~%"
                       (first x)
                       (second x)
                       (eval (first x)))))


No comments:

Post a Comment

[EN] A Curio about the Digits of Pi

;;;; pi-digits.cl -*- mode: lisp; -*- ;;; Illustrate a curio about the first 40 (decimal) digits of π. ;;; Time-stamp: <2025-07-22 16:52...