Skip to content

Commit 5819e9e

Browse files
committed
Fix typos
1 parent 549e42c commit 5819e9e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/core/taylor.rkt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@
425425
(make-series n
426426
0
427427
cache
428+
n*
428429
(if (zero? n)
429430
`(exp ,(coeffs 0))
430431
(let* ([coeffs* (list->vector (map coeffs (range 1 (+ n 1))))]
@@ -444,14 +445,15 @@
444445
(make-series n
445446
0
446447
cache
447-
(if (zero? n)
448+
n*
449+
(if (zero? n*)
448450
0
449-
(let* ([coeffs* (list->vector (map coeffs (range 1 (+ n 1))))]
450-
[nums (for/list ([i (in-range 1 (+ n 1))]
451+
(let* ([coeffs* (list->vector (map coeffs (range 1 (+ n* 1))))]
452+
[nums (for/list ([i (in-range 1 (+ n* 1))]
451453
[coeff (in-vector coeffs*)]
452454
#:unless (equal? (deref coeff) 0))
453455
i)])
454-
`(+ ,@(for/list ([p (all-partitions n (sort nums >))])
456+
`(+ ,@(for/list ([p (all-partitions n* (sort nums >))])
455457
(if (= (modulo (apply + (map car p)) 2) 1)
456458
`(* ,(if (= (modulo (apply + (map car p)) 4) 1) 1 -1)
457459
,@(for/list ([(count num) (in-dict p)])
@@ -465,14 +467,15 @@
465467
(make-series n
466468
0
467469
cache
468-
(if (zero? n)
470+
n*
471+
(if (zero? n*)
469472
1
470-
(let* ([coeffs* (list->vector (map coeffs (range 1 (+ n 1))))]
471-
[nums (for/list ([i (in-range 1 (+ n 1))]
473+
(let* ([coeffs* (list->vector (map coeffs (range 1 (+ n* 1))))]
474+
[nums (for/list ([i (in-range 1 (+ n* 1))]
472475
[coeff (in-vector coeffs*)]
473476
#:unless (equal? (deref coeff) 0))
474477
i)])
475-
`(+ ,@(for/list ([p (all-partitions n (sort nums >))])
478+
`(+ ,@(for/list ([p (all-partitions n* (sort nums >))])
476479
(if (= (modulo (apply + (map car p)) 2) 0)
477480
`(* ,(if (= (modulo (apply + (map car p)) 4) 0) 1 -1)
478481
,@(for/list ([(count num) (in-dict p)])

0 commit comments

Comments
 (0)