unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Stack Size?
@ 2002-08-05  9:27 Robert Uhl <ruhl@4dv.net>
  2002-08-05 15:08 ` Joshua Judson Rosen
  2002-08-05 18:55 ` Neil Jerram
  0 siblings, 2 replies; 13+ messages in thread
From: Robert Uhl <ruhl@4dv.net> @ 2002-08-05  9:27 UTC (permalink / raw)


I have the following empirical-integral function defined:

(define (integral func from to)
  (define step (/ (- to from) 2048))
  (define (my-int func from to)
    (if (>= from to)
	(func to)
	(+ (func from) (my-int func (+ from step) to))))
  (my-int func from to))

I recognise that this may not be the most attractive of ways to do it,
but it should do the job.  Unfortunately, the following sequence of
actions causes a stack overflow:

(define (q x) (- 10 (* 8 x)))
(integral q 0 1.25)

How deep can guile's stack be?  This example does _not_ crash on
umb-scheme, which is interesting.  Can anyone suggest a workaround?

-- 
Robert Uhl <ruhl@4dv.net>
Fight to your last cartridge, then fight with your bayonets.
No surrender.  Fight to the death.
                  --Gen. Henri Guisan, Switzerland, July '40

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


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

end of thread, other threads:[~2002-09-03 16:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-05  9:27 Stack Size? Robert Uhl <ruhl@4dv.net>
2002-08-05 15:08 ` Joshua Judson Rosen
2002-08-05 18:55 ` Neil Jerram
2002-08-05 19:09   ` Robert Uhl <ruhl@4dv.net>
2002-08-08 21:28     ` Neil Jerram
2002-08-08 21:49       ` Robert Uhl <ruhl@4dv.net>
2002-08-09 13:48         ` Mikael Djurfeldt
2002-08-11 22:07           ` Robert Uhl <ruhl@4dv.net>
2002-09-01 17:13           ` Rob Browning
2002-09-01 19:08             ` Lynn Winebarger
2002-09-03 16:00             ` Paul Jarc
2002-08-09 13:48         ` Mikael Djurfeldt
2002-08-09 13:48         ` Mikael Djurfeldt

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).