Re: [racket-users] Interpolating Polynomial in Newton Form

2015-11-07 Thread Dave Yrueta
Yes, I can see at least two significant errors in my description. The first is in the sequence definitions. They should be list of constants (a0, a1… an) and a list of x-values (x0, x1,….x(n-1)) Similarly, the def of p(x) should read p(x) = a0 + a1(x - x0) + a2(x - x0)(x - x1) + a3(x -

Re: [racket-users] Interpolating Polynomial in Newton Form

2015-11-07 Thread Matthias Felleisen
#lang racket ;; - ;; the macro approach (module macro-server racket (provide ;; syntax: (make-p number? (number? ...) (number? ...)) ;; in (make-p a0 (a ...) (x ...)) must be of equal length ;; the result

[racket-users] Time-limited evaluation

2015-11-07 Thread jukka . tuominen
Hi all, I'm probably doing something wrong here, but for some reason "custodian-shutdown-all" doesn't always interrupt the execution as the last test case below shows. It continues execution until finished. Any ideas how to get this working? br, jukka --- #lang racket/load (require

Re: [racket-users] Time-limited evaluation

2015-11-07 Thread Matthew Flatt
Did you mean to create a bigger computation than `(factorial 2)`? It takes only about 5 msec on my machine, but adding a couple of extra zeros makes it time out. Converting the result of `(factorial 2)` to a string takes a bit longer than the arithmetic, and printing out the result in

Re: [racket-users] Time-limited evaluation

2015-11-07 Thread jukka . tuominen
Hehe, I think I need a faster computer, because that was the intention. Anyhow, I'm glad it's working. I think what happened was that initially I didn't have it right and lowered the number to make debugging faster. Then tested with another function and got confused. Thank you Matthew for