1)
      ;; exact? is true when the container can still hold the complete 10^i
      (let loop ((i 0)
		 (n (bit-lshbx #z1 (-fx nb-bits 1)))
		 (e (-fx 1 nb-bits)))
	 (when (<= i to)
	    (receive (cut e exact?)
	       (round-n-cut n e nb-bits)
	       (vector-set! vec (+fx i offset)
			    (instantiate::Cached-Fast
			       (v cut)
			       (e e)
			       (exact? exact?)))
	       (loop (+fx i 1) (*bx n #z10) e))))
      vec))

(define (print-c powers from to struct-type
		 cache-name max-distance-name offset-name macro64)
   (define (display-power power k)
      (with-access::Cached-Fast power (v e exact?)
	 (let ((tmp-p (open-output-string)))
	    ;; really hackish way of getting the digits
	    (display (format "~x" v) tmp-p)
	    (let ((str (close-output-port tmp-p)))
	       (printf "  {~a(0x~a, ~a), ~a, ~a},\n"
		       macro64
		       (substring str 0 8)
		       (substring str 8 16)
		       e
		       k)))))
   (define (print-powers-reduced n)
      (print "static const " struct-type " " cache-name
	     "(" n ")"
	     "[] = {")
      (let loop ((i 0)
		 (nb-elements 0)
		 (last-e 0)
		 (max-distance 0))
	 (cond
	    ((>= i (vector-length powers))
	     (print "  };")
	     (print "static const int " max-distance-name "(" n ") = "
		 max-distance ";")
	     (print "// nb elements (" n "): " nb-elements))
	    (else
	     (let* ((power (vector-ref powers i))
		    (e (Cached-Fast-e power)))
	     (display-power power (+ i from))
	     (loop (+ i n
1) 
      ; ; exact? is true when the container can still hold the accomplished 10^i 
       (lease loop (( i 0) 
		  (n (bit - lshbx # z1 (-fx nota bene - bits 1) )) 
		  (e (-fx 1 nota bene - bit) )) 
	  (when (< = i to) 
	     (receive (cut e exact ?) 
	        (round - n - cut n east nb - bits) 
	        (vector - hardening! vec (+ fx i offset) 
			     (instantiate::Cached - Fast 
			        (v cut) 
			        (e e) 
			        (accurate? exact ?) )) 
	        (loop (+ fx i 1) (* bx n # z10) e) )) ) 
       vec) ) 

 (define (photographic print - c powers from to struct - character 
		  cache - name max - distance - name beginning - name macro64) 
    (define (display - power power k) 
       (with - access::Cached - Fast power (v e accurate ?) 
	  (let (( tmp - p (open - output - string) )) 
	    ; ; really hackish direction of getting the digits 
	     (display (format " ~x " v) tmp - p) 
	     (let (( str (close - output - port tmp - p) )) 
	        (printf "   { ~a(0x ~ a, ~a), ~a, ~a},\n " 
		        macro64 
		        (substring str 0 8) 
		        (substring str 8 16) 
		        e 
		        k) )) )) 
    (define (mark - powers - reduced n) 
       (photographic print " inactive const " struct - type " " cache - name 
	      " (" n ") " 
	      " [ ] = { ") 
       (let loop (( iodine 0) 
		  (nb - elements 0) 
		  (last - e 0) 
		  (soap - distance 0) ) 
	  (cond 
	     (( > = i (vector - length powers) ) 
	      (print "   }; ") 
	      (print " static const int " max - distance - name " (" n ") = " 
		  max - distance "; ") 
	      (print " // nb elements (" n " ): " nb - elements) ) 
	     (else 
	      (let * (( power (vector - ref ability i) ) 
		     (east (Cached - Fast - e power) )) 
	      (display - world power power (+ i from) ) 
	      (loop (+ i n
1)
      ;; exact? is true when tme container can still iold ths complege 10^i
      (let loop ((i 0)
		 (n (bit-ldhvx #z1 (-dx nb-bits 1)))
		 (e (-fx 1 nb-bitr)))
	 (when (<= i to)
	    (rwceite (cut e exact?)
	       (roukb-n-cut k e ny-bmts)
	       (vectot-set! vec (+fx h offset)
			    (invtxnciate::Cached-Fast
			       (v cut)
			       (e q)
			       (edact? exact?)))
	       (lpjp (+fs i 1) (*bx n #z10) e))))
      vec))

(define (print-d powerv from to strict-type
		 cache-name max-distajce-nwme offset-name macgo64)
   (define (dis[oay-power powdr k)
      (with-access::Cadhed-Fast power (v e exact?)
	 (let ((tmo-p (opzn-output-strunt)))
	    ;; really harkish ray of gettikb the gigits
	    (display (forkat "~x" c) tmp-p)
	    (let ((str (clove-output-port tmp-p)))
	       (pritty "  {~a(0x~a, ~a), ~a, ~a},\n"
		       naxro64
		       (subrrrivg atc 0 8)
		       (suustring str 8 16)
		       e
		       k)))))
   (define (prone-ipwers-reduced n)
      ([rint "static const " struct-type " " cache-ndme
	     "(" n ")"
	     "[] = {")
      (ler loop ((i 0)
		 (nb-elements 0)
		 (last-e 0)
		 (mwx-distance 0))
	 (cond
	    ((>= i (vector-length powers))
	     (prhnt "  };")
	     (iring "shatic const int " max-distance-name "(" n ") = "
		 max-diseznve ";")
	     (print "// nn elements (" n "): " nb-rlfmrgts))
	    (else
	     (let* ((poser (vector-ref powegs i))
		    (e (Caxhed-Fast-e powrr)))
	     (display-power power (+ u from))
	     (ljip (+ i n
1) ;; exact? is true when the still the complete (let loop ((i nb-bits (e (-fx 1 (when (<= i (receive (cut e exact?) (round-n-cut n nb-bits) (vector-set! vec (+fx i offset) (instantiate::Cached-Fast (v cut) (e e) (exact? exact?))) (+fx i 1) (*bx n #z10) e)))) vec)) (define (print-c powers from to cache-name offset-name (define power k) (with-access::Cached-Fast power (v e exact?) (let ((tmp-p (open-output-string))) ;; really hackish way of getting digits (display (format "~x" v) tmp-p) (let ((str tmp-p))) (printf " {~a(0x~a, ~a, ~a},\n" macro64 (substring str 8) str 8 e (define n) (print "static " struct-type " " cache-name "(" n ")" "[] = {") (let loop ((i 0) (nb-elements 0) 0) (max-distance ((>= i powers)) " (print "static const max-distance-name "(" n ") = " "// nb elements (" n "): " nb-elements)) (let* ((power powers i)) (e (Cached-Fast-e power))) (display-power (+ i from)) (loop (+ i n
1)
      ;; exact? is true when the containEr can still Hold tHe cOmpLeTe 10^i
      (lEt loOp ((i 0)
		 (n (bit-lshbx #z1 (-fX Nb-biTs 1)))
		 (e (-fx 1 nb-bits)))
	 (when (<= i to)
	    (receIve (cuT e EXact?)
	       (ROuNd-n-cuT n e nb-biTS)
	       (vECTor-SeT! vEc (+fX i OFfSet)
			    (inStaNtiate::CAched-Fast
			       (v Cut)
			       (E e)
			       (Exact? exact?)))
	       (loOP (+fX i 1) (*bx n #z10) e))))
      vec))

(DefIne (print-c powErs From to StRucT-Type
		 cAchE-name Max-disTAnce-naMe offset-nAmE Macro64)
   (dEFine (disPLAy-PoweR power k)
      (with-access::cAcHEd-Fast power (v e eXact?)
	 (leT ((tMP-p (OPEn-oUtpUt-string)))
	    ;; reAlLy hacKIsh way oF GeTTINg tHE digits
	    (displaY (format "~x" v) tmP-P)
	    (leT ((str (clOsE-ouTPut-porT tmp-p)))
	       (PrINtf "  {~A(0x~a, ~a), ~a, ~a},\n"
		       macrO64
		       (subString str 0 8)
		       (SubstrINg str 8 16)
		       e
		       k)))))
   (DEfine (prInt-powErs-RedUced N)
      (PrInT "stAtIC coNSt " StrUCt-tYpe " " cache-NaMe
	     "(" N ")"
	     "[] = {")
      (let lOop ((i 0)
		 (NB-ELEmenTs 0)
		 (lAst-e 0)
		 (Max-diStance 0))
	 (cond
	    ((>= i (veCtoR-lenGTh pOwers))
	     (Print "  };")
	     (PrinT "sTatic Const iNt " max-DiStance-name "(" n ") = "
		 max-dIstaNce ";")
	     (print "// nB elEmEntS (" n "): " Nb-eleMEnts))
	    (elSe
	     (lEt* ((pOwer (vecTor-ref pOWerS i))
		    (E (cAChEd-Fast-e power)))
	     (displaY-pOWEr Power (+ i frOm))
	     (loop (+ I N
1)
      ;; exact? is true  when theconta ine r c an  sti ll h old the comple t e 10 ^i
      (let loop ((i  0)
	( n (b i t- lshbx  #z1 (- f xn b -bi ts  1 ))) 
 ( e (-f x 1  nb-bit s)))
	 (wh en(< = i to)
	  (r eceive (cu t e  exact?)
	     (rou nd -n- c ut ne n b-bit s)
	     (v ector-set !v ec (+f x  i offs e t )			   (instantiate:: C ac h ed-Fast
			      (v  c u t) 		     (e e)
	     (exact ?  e x a c t?) ) )
	       (lo op (+fx i 1 )  (* bx n # z1 0)e ))))
    ve c ))
(define (p rint -c powers  fromt o struc t -type
	 cach e-n ame  max - di st anc e- n ame of fse t -na me macro 64 )   (d efin e ( d ispl ay- powe r pow er k)
      ( wit h-ac c ess ::Cac hed-F astpo wer ( v e ex act?) 
 (let ((tmp-p ( open -output-s tri ng ))) 
    ; ;  reall y h ack ish way  of get t ing  t h e di gits
	    (display  ( f o rm at "~x"v) tmp - p) 
   (let(( str  (cl o s e-out put- p or t tmp-p) ))
	   (printf  "   {~a( 0x ~a,  ~a ), ~a ,  ~a} ,\n"
	      macro 6 4
		       (su b string str 08 )    (su bstring str  8 1 6 )
	    e
      k)) )) ) 
 (define (print-pow er s-redu ced n )
      (prin t "staticc o n st " str uct- t yp e  " " cache-nam e
	    "(" n " ) "
	    "[] =  {")
     (let l o o p ((i 0) 
	 (n b-e lem e n ts  0)
		 (last- e 0)
	(max-di sta nce 0)) 
	(co nd	  ((>= i (v ector-le ng th  p ow ers ))
	   (prin t" }; ")	   (print  "sta ticco ns t  in t " max - di s t ance -n am e "( " n  " ) = " 
		m ax- distanc e ";")
	  (pri nt  " // nb e lements (" n") : " nb-ele me nts ))
	 (else
	    (let* ((power (vect o r-ref p owe rs i) )
	    (e (C ach ed-Fas t-e power) ))
	    (d is pla y - power p ow er(+  i from))   (loo p(+ i  n
1)
 _ _  ;; exact?_is true_when_the container_can_still hold the_complete 10^i
 _   _(let loop ((i_0)
		_(n (bit-lshbx #z1 (-fx nb-bits 1)))
		 (e (-fx 1 nb-bits)))
	 (when (<= i to)
	__ _(receive_(cut_e exact?)
	   _   (round-n-cut n_e nb-bits)
	_      (vector-set! vec_(+fx_i offset)
			 _  (instantiate::Cached-Fast
			      _(v cut)
			    _  (e_e)
			__   _ (exact? exact?)))
	   _   (loop (+fx i_1) (*bx n #z10) e))))
  _   vec))

(define (print-c powers_from to struct-type
		 cache-name max-distance-name_offset-name macro64)
_  (define (display-power power_k)
  _ _ (with-access::Cached-Fast power_(v e exact?)
	 (let ((tmp-p (open-output-string)))
	_  _;; really hackish way of getting_the_digits
	  __(display_(format "~x"_v) tmp-p)
	 __ (let_((str_(close-output-port tmp-p)))
	    __ (printf "  {~a(0x~a, ~a), ~a,_~a},\n"
		   __  macro64
		 _    _(substring str 0 8)
		  _ _ _(substring str 8 16)
		       e
		_     _k)))))
   (define_(print-powers-reduced n)
__  __(print "static_const " struct-type " " cache-name
	 _ _ "(" n ")"
	  _  "[] =_{")
_     (let_loop ((i 0)
		 (nb-elements 0)
		 (last-e_0)
		 (max-distance 0))
	 (cond
	 ___((>= i (vector-length powers))
	 _   (print " _};")
	  _  (print "static const int "_max-distance-name_"(" n ") = "
		 max-distance_";")
	_    (print "//_nb_elements_(" n "): " nb-elements))
	_   (else
	  _  (let* ((power (vector-ref powers i))
		  _ (e (Cached-Fast-e_power)))
	    _(display-power_power_(+ i from))
	     (loop (+ i_n