From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Larry Evans Newsgroups: gmane.lisp.guile.bugs Subject: secant:find-root correct stop (was Re: secant:root-find stop wrong number args Date: Mon, 10 Jul 2006 06:50:54 -0500 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152532482 6808 80.91.229.2 (10 Jul 2006 11:54:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2006 11:54:42 +0000 (UTC) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jul 10 13:54:41 2006 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FzuLP-00049L-U1 for guile-bugs@m.gmane.org; Mon, 10 Jul 2006 13:54:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FzuLP-0003oY-J8 for guile-bugs@m.gmane.org; Mon, 10 Jul 2006 07:54:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FzuLM-0003nK-G6 for bug-guile@gnu.org; Mon, 10 Jul 2006 07:54:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FzuLK-0003lG-OS for bug-guile@gnu.org; Mon, 10 Jul 2006 07:54:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FzuLK-0003l4-GA for bug-guile@gnu.org; Mon, 10 Jul 2006 07:54:26 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FzuMP-0005M6-Bg for bug-guile@gnu.org; Mon, 10 Jul 2006 07:55:33 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FzuL9-00046T-Hb for bug-guile@gnu.org; Mon, 10 Jul 2006 13:54:15 +0200 Original-Received: from ip24-250-144-198.bc.dl.cox.net ([24.250.144.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Jul 2006 13:54:15 +0200 Original-Received: from cppljevans by ip24-250-144-198.bc.dl.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Jul 2006 13:54:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-guile@gnu.org Original-Lines: 27 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip24-250-144-198.bc.dl.cox.net User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en In-Reply-To: X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3279 Archived-At: On 07/09/2006 07:54 PM, Larry Evans wrote: > evansl@null:~/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 # > ABORT: (wrong-number-of-args) > guile> (version) > "1.6.7" > guile> evansl@null:~/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)))))) _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile