Feedback Think about the sizes of integer, fractional parts of a number 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project Step #3, deadline Monday 18 November (Mike O'Donnell)
Re: Question Multiplication step and discretize... (Benedict Singer)
Date: 2002, Nov 18
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

2) In discretize, I'm confused about the whole multiply fractional by 3 and carry - just in general!
Well, I can only take a stab at an answer until you can generate a specific question.

The first element of a tristream representation is the integer part. In general, it can be huge. But, by dividing by a sufficiently large power of 3, you can make it as small as you like. In particular, you can make it 0 (shifting all of the information down into the fractional part). All but the first element of a tristream representation constitute the fractional part. By its nature, the value of the fractional part (interpreted through the base 3 summation formula, assuming trits in the range -2 to 2) must be between -1 and 1. If you use the integer part of an xreal in a stream of xreals to form a trit in a tristream representation, then you need to pass the fractional part along down the stream (the stream of xreals that we are converting to a discrete tristream, not the stream of trits in one of those xreals) in order to keep representing the same total real value of the sum. Since the next position in the stream corresponds to one lower power of 3 (a larger magnitude negative power), the contribution of the fractional part is multiplied by 3 in compensation. But something between -1 and 1, when multiplied by 3, ends up between -3 and 3. If there's a contribution between -1 and 1 from the next integer part, we're still in the -4 to 4 range on which compress can succeed.




Mike O'D.


Messages

1. Ok Implicit *3... by Benedict Singer, 2002, Nov 18

to: "Think about the sizes of integer, fractional parts of a number"