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 -
#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
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
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
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
5 matches
Mail list logo