Re: Underscores in numbers for legibility
Lassi Kortela 12 Apr 2019 21:07 UTC
> Kawa does have complex and quaternions
> (https://www.gnu.org/software/kawa/Quaternions.html)
> and numbers with units (https://www.gnu.org/software/kawa/Quantities.html).
Cool, I didn't know that. So that -3.7+2.6i-6.17j+19.6k example I pasted
at random from Common Lisp is actually a quaternion where each of the
four dimensions is written with an integer and fractional part :) And
that works because even in that complex case (no pun intened) you force
the number to start with +/- or a digit. And same thing for numbers with
units of measure (those would be a further extension even from the
Common Lisp potential number syntax, right?)
At face value, it sounds like underscores would be overkill for
quaternions, but would make sense with units of measure - e.g.
expressing the length of a year as 31_536_000s