Feedback Slowness of tristream is probably not due to infinite expansions of rationals 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project step #4, deadline Monday 25 November (Mike O'Donnell)
Re: Question Dependency on rational_power->xreal, precision vs. multiplication (Ivan Beschastnikh)
Date: 2002, Nov 24
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

In the tristream implementation, a simple exact rational like 1/2 is a repeating infinite stream. Therefore multiplication becomes slower than in the precfunc implementation.
It's true that many tristream rationals have infinitely many nonzero trits in their expansions. But I don't think that's a good explanation of the reason that tristream multiplications are sometimes much slower than precfunc multiplications.

Like precfunc, the time cost of tristream operations also depends on several structural qualities of the computation, including the cost of generating trits and the number of trits generated. Since the estimation of the required precision in tristream is implicit (in the number of trits required in one step in order to determine the desired number of trits in the next step) instead of explicit (in the precision arguments passed to precfunc xreals), you need to study this issue carefully to determine how much precision (i.e., how many trits) is really being computed.

A very good question to work on is: in order to generate p trits of a product, how many trits does mult_xreal demand from its arguments. Then consider how that demand propagates backwards through a sequence of multiplications.




Mike O'D.


to: "Slowness of tristream is probably not due to infinite expansions of rationals"