|
I just posted some definitions for I inspected and tested these definitions very rudimentarily. In particular, I'm not completely sure that I reduced the factors in a multiplication far enough before applying The last error that I found was somewhat interesting. Look at the Because of the redundancy of the base-3 notation with trits from -2 to 2, there are several variations that are all mathematically correct. I initially used the variation with integer-floor and modulo, instead of quotient and remainder. These pairs differ only in their treatments of negative numbers (see the MIT Scheme Reference Manual). They are both mathematically correct for the purpose. But, with an integer part of -1, the (integer-floor, modulo) pair never reduces the integer part to 0, no matter how large a negative power of 3 is given. The (quotient, remainder) pair always reduces the integer part to 0 for a sufficiently large negative power of 3. So, my first version led to an infinite computation when used in reduce_by_power_3_xreal, while the second version at least misses that particular error. This is the first example that I've encountered where the (quotient, remainder) pair has useful mathematical properties for the solution of a problem. In the past, I have always seen it used for mere compatibility with quirky qualities of C, Pascal, and other old programming languages.
Mike O'D. |
problem in tristream by Katie Edmonds, 2002, Nov 21
Compressing a prefix is the right approach by Mike O'Donnell, 2002, Nov 21
to: