[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-language cookbook effort

From: Alex Shinn
Subject: Re: Multi-language cookbook effort
Date: 29 Aug 2001 08:31:46 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.0.104

>>>>> "Kalle" == Kalle Olavi Niemitalo <address@hidden> writes:

    Kalle> Alex Shinn <address@hidden> writes:
    >> ;; @@PLEAC@@_2.2
    >> (define (approx-equal? num1 num2 accuracy)
    >>   (< (- num1 num2) (expt 10.0 (- accuracy))))

    guile> (approx-equal? 1 9999999 10)
    Kalle> #t

    Kalle> I think you need "abs".

What, you don't think 1 and 9999999 are close enough?  :P Thanks, I
fixed this.

    >> ;; @@PLEAC@@_2.11
    >> ;; Guile's trigonometric functions use radians.
    >> (define pi 3.14159265358979)
    >> (define (degrees->radians deg) (* PI (/ deg 180.0)))
    >> (define (radians->degrees rad) (* 180.0 (/ rad PI)))

    Kalle> This needs (read-enable 'case-insensitive).

Actually it's a typo that I had fixed at one point - alas, I don't
have CVS access so it's hard to catch merge conflicts like this.  The
(define str = "foo") from your last email also falls into this

Thanks for the input!  The PLEAC mailing list would probably be a
better place for comments on this:

Alex Shinn <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]