Proposed document change Bradley Lucier (28 Nov 2022 16:38 UTC)
Fwd: Proposed document change Arthur A. Gleckler (28 Nov 2022 20:00 UTC)
Re: Fwd: Proposed document change Taylor R Campbell (29 Nov 2022 04:27 UTC)
Re: Fwd: Proposed document change Bradley Lucier (29 Nov 2022 16:45 UTC)
Re: Fwd: Proposed document change Taylor R Campbell (29 Nov 2022 18:05 UTC)
Re: Fwd: Proposed document change Bradley Lucier (29 Nov 2022 18:26 UTC)
Re: Fwd: Proposed document change Bradley Lucier (29 Nov 2022 18:39 UTC)
Re: Fwd: Proposed document change Taylor R Campbell (29 Nov 2022 18:39 UTC)
Re: Fwd: Proposed document change Arthur A. Gleckler (29 Nov 2022 22:45 UTC)
Re: Fwd: Proposed document change Bradley Lucier (01 Dec 2022 14:49 UTC)
Re: Fwd: Proposed document change Bradley Lucier (01 Dec 2022 21:30 UTC)
Re: Fwd: Proposed document change Arthur A. Gleckler (01 Dec 2022 21:33 UTC)
Re: Fwd: Proposed document change John Cowan (05 Dec 2022 05:50 UTC)
Re: Fwd: Proposed document change Arthur A. Gleckler (05 Dec 2022 22:52 UTC)
Re: Fwd: Proposed document change Bradley Lucier (06 Dec 2022 18:52 UTC)
Re: Fwd: Proposed document change John Cowan (07 Dec 2022 02:11 UTC)
Re: Fwd: Proposed document change Bradley Lucier (07 Dec 2022 16:04 UTC)
Re: Fwd: Proposed document change Arthur A. Gleckler (07 Dec 2022 17:14 UTC)
Re: Fwd: Proposed document change Taylor R Campbell (01 Dec 2022 22:09 UTC)
Re: Fwd: Proposed document change Bradley Lucier (03 Dec 2022 17:26 UTC)
Re: Fwd: Proposed document change Taylor R Campbell (04 Dec 2022 17:27 UTC)

Re: Fwd: Proposed document change Bradley Lucier 29 Nov 2022 18:26 UTC

On 11/29/22 1:02 PM, Taylor R Campbell wrote:
> I forgot about that one.  MIT Scheme doesn't have it yet.  I guess
> making test cases for it is left as an exercise for the reader!
>
> (If you do, I can add it to MIT Scheme and verify it passes the
> test cases.)

I don't know whether "If you do" means adding code for euclidean/ or
adding tests for euclidean/, but I'm using this temporarily in Gambit to
test code for fixnum-specific fast paths for euclidean/:

(let* ((positive-arguments
         (list ##max-fixnum 1 2 3 4 5 6 7 8))
        (nonzero-arguments
         (append positive-arguments
                 (cons ##min-fixnum (map - positive-arguments))))
        (all-arguments
         (cons 0 nonzero-arguments)))
   (for-each (lambda (n)
               (for-each (lambda (d)
                           (call-with-values
                               (lambda ()
                                 (balanced/ n d))
                             (lambda (div rem)
                               (if (not (= n (+ (* d div) rem)))
                                   (pp 'not-a-division-operator))
                               (if (not (and (= n (+ (* d div) rem))
                                             (<= (- (/ (abs d) 2) rem))
                                             (< rem (/ (abs d) 2))))
                                   (pp `((balanced/ ,n ,d) => ,div
,rem))))))
                         nonzero-arguments))
             all-arguments))