bug-guile
[Top][All Lists]
Advanced

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

Re: secant:find-root correct stop (was Re: secant:root-find stop wrong


From: Larry Evans
Subject: Re: secant:find-root correct stop (was Re: secant:root-find stop wrong number args
Date: Mon, 10 Jul 2006 08:33:06 -0500
User-agent: Debian Thunderbird 1.0.7 (X11/20051017)

On 07/10/2006 06:50 AM, Larry Evans wrote:
On 07/09/2006 07:54 PM, Larry Evans wrote:

address@hidden:~/prog_dev/gnucash/tests$ guile
guile> (define (myfun x)x)
guile> (myfun 2.0)
2.0
guile> (use-modules (ice-9 slib))
guile> (require 'root)
guile> (secant:find-root myfun -100.0 100.0 -3)
ERROR: Wrong number of arguments to #<procedure stop? (x0 x1 fmax count)>
ABORT: (wrong-number-of-args)
guile> (version)
"1.6.7"
guile> address@hidden:~/prog_dev/gnucash/tests$

Is there a fix for this somewhere?

Adding a extra formal arg to stop? works for my test:

  (letrec ((stop?
        (cond ((procedure? prec) prec)
          ((and (integer? prec) (negative? prec))
           (lambda (x0 x1 fmax count ignore)
                                   ;;^^^^^^ extra arg
             (>= count (- prec))))
          (else
           (lambda (x0 f0 x1 f1 count)
             (and (< (abs f0) prec)
              (< (abs f1) prec))))))

I just realized slib is not part of guile; hence,
I've forwarded this to the slib maintainers, address@hidden
(as reported on http://swiss.csail.mit.edu/~jaffer/slib_8 ).

Sorry for noise :(





reply via email to

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