• @homura1650
    link
    English
    92 days ago

    You get this property in algrabraic structures called “wheels”. The simplest to understand wheel is probably the wheel of fractions, which is a slightly different way of defining fractions that allows division by 0.

    The effect of this is to create 2 additional numbers: ∞ = z/0 for z != 0, ⊥, and ⊥ = 0/0.

    Just add infinity gives you the real projective line (or Riemen Sphere if you are working with comples numbers). In this structure, 0 * ∞ is undefined, so is not quite what you want

    ⊥ (bottom) in a wheel can be thought as filling in for all remaining undefined results. In particular, any operation involving ⊥ results in ⊥. This includes the identity: 0 * ⊥ = ⊥.

    As far as useful applications go, there are not many. The only time I’ve ever seen wheels come up when getting my math degree was just a mistake in defining fractions.

    In computer science however, you do see something along these lines. The most common example is floating point numbers. These numbers often include ∞, -∞ and NaN, where NaN is essentially just ⊥. In particular, 0 * NaN = NaN, also 0 * ∞ = ⊥. The main benefit here is that arithmetic operations are always defined.

    I’ve also seen an arbitrary precision fraction library that actually implemented something similar to the wheel of fractions described above (albeit with a distinction between positive and negative infinity). This would also give you 0 * ∞ = ⊥ and 0 * ⊥ = ⊥. Again, by adding ⊥ as a proper value, you could simplify the handling of some computations that might fail.