::SHE+ILA:: Rationals and "/" Overloads [$71]

Elegant Woman in Purple Gown Beside Large Pie
48
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    DaVinci2
  • Access
    Public
  • Created
    8h ago
  • Try

More about ::SHE+ILA:: Rationals and "/" Overloads [$71]

As previously stated, ::SHE+ILA:: uses BCD arithmetic, hence has potentially unlimited precision. BCD digits are packed two to a byte, using the ASCII range $80 ... $E3 (00 ... 99). However, sometimes we need to handle rational numbers, for example one third or one seventh, neither of which have a precise BCD or binary representation. Therefore ::SHE+ILA:: lets you say things like
x <:: 1/3;
Here, the slash "/" represents a fraction bar. There is no conflict with the other two uses of "/", i.e. "+/VEC" (add reduce, i.e. sigma) or "X $/ Y" (X divided by Y), since in a rational number both sides of the slash are digits, and the parser thus emits an embedded slash ($2F) into the BCD data. The arithmetic engine holds the two parts separately during ALU ops, and if the result exceeds too many digits it again produces a rational number (i.e. a ratio of two integers delimited by a slash). By the way, the picture contains a pie which the woman was intended to cut into three equal pieces :)

Comments


Loading Dream Comments...

Discover more dreams from this artist