• 3 Posts
  • 20 Comments
Joined 3 years ago
cake
Cake day: September 1st, 2023

help-circle

  • Not mentioning fixed point in an article about floating point alternatives is a sin. Unlike any of the alternatives listed here (yes, even floating point), if your computer can do integers, fixed-point comes practically builtin! it’s literally the same machine instruction plus one or two bitwise shifts.

    Decimal floating point is probably the worst of every world. Without specialized hardware, implementing floating point is pretty hard in software, and comparatively slow. Since internally the decimals are stored in binary, a shift in the exponent means you have to recompute the mantissa as if you did multiplication or division, so you also lose the advantages of binary :)

    Fractions are probably the most practical implementation for arbitrary precision as they are base-agnostic, and thus, free of repeating fractionals. The problem is that you need to do lots of gcd and lcm for addition. I have never done a full implementation, but I’d say libraries represent them internally as mixed numbers, integer part and less-than-one fractional part.

    Symbolic computation is really hard. I hope you know your data structures and graph traversals!

    Interval arithmetic is niche and I didn’t pay attention to the lecture on measure errors so I’m not very familiar, but wikipedia says binary operations between intervals is literally matching and min/maxxing so this one may have the second simplest software implementation.

    For binary-coded decimal my guess is that decimal digits are stored as 4 bits each. Probably wasteful for any kind of arithmetic, so their use would mainly be conversions–after all, no matter how good binary is, people are used to decimal (which is not even that good of a base), and it’s the computer’s task to output that.











  • A vibe programmer that built a palm-sized fusion reactor in a cave over the course of 3 months with a single companion? Perfectly respectable to me. And he probably made his own AI too :)

    I’ve always imagined peak programming as building up from low level languages, putting on some layers of abstraction and automatization written by yourself, and end up writing some trivial commands to produce very interesting outputs… Who knows? Maybe throwing around some holograms and voice-commands asking for nonsense. It doesn’t get much more vibey than that.

    Programming in vim and emacs does look like that lol.




  • Multiplication order in current mathematics standards should happen the other way around when it’s in a non-commutative algebra.

    The good thing about multiplication being commutative and associative is that you can think about it either way (e.g. 3x2 can be thought of as "add two three times). The “benefit” of carrying this idea to higher-order operations is that they become left-associative (meaning they can be evaluated from left to right), which is slightly more intuitive. For instance in lambda calculus, a sequence of church numerals n1 n2 … nK mean nK ^ nK-1 ^ … ^ n1 in traditional notation.

    For example, we can’t write 2ω for the next transfinite ordinal because 2ω is just ω again on account of transfinite and backwards multiplication weirdness, and we have to write ω·2 or ω×2 instead like we’re back at primary school.

    I’d say the deeper issue with ordinal arithmetic is that Knuth’s up-arrow notation with its recursive definition becomes useless to define ordinals bigger than ε0, because something like ω^(ω^^ω) = ωε0 = ε0. I don’t understand the exact notion deeply yet, but I suspect there’s some guilt in the fact that hyperoperations are fundamentally right-associative.