unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* secant:root-find stop wrong number args
@ 2006-07-10  0:54 Larry Evans
  2006-07-10 11:50 ` secant:find-root correct stop (was " Larry Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Evans @ 2006-07-10  0:54 UTC (permalink / raw)


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 #<procedure stop? (x0 x1 fmax count)>
ABORT: (wrong-number-of-args)
guile> (version)
"1.6.7"
guile> evansl@null:~/prog_dev/gnucash/tests$

Is there a fix for this somewhere?



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 3+ messages in thread

* secant:find-root correct stop (was Re: secant:root-find stop wrong number args
  2006-07-10  0:54 secant:root-find stop wrong number args Larry Evans
@ 2006-07-10 11:50 ` Larry Evans
  2006-07-10 13:33   ` Larry Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Evans @ 2006-07-10 11:50 UTC (permalink / raw)


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 #<procedure stop? (x0 x1 fmax count)>
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: secant:find-root correct stop (was Re: secant:root-find stop wrong   number args
  2006-07-10 11:50 ` secant:find-root correct stop (was " Larry Evans
@ 2006-07-10 13:33   ` Larry Evans
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Evans @ 2006-07-10 13:33 UTC (permalink / raw)
  Cc: agj

On 07/10/2006 06:50 AM, Larry Evans wrote:
> 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 #<procedure stop? (x0 x1 fmax count)>
>> 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))))))

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

Sorry for noise :(



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-10 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10  0:54 secant:root-find stop wrong number args Larry Evans
2006-07-10 11:50 ` secant:find-root correct stop (was " Larry Evans
2006-07-10 13:33   ` Larry Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).