Commit 6ff80407 authored by Nikodemus Siivola's avatar Nikodemus Siivola

fix contagion in IOTA when step is a complex integer and start is a float

parent 17a5957f
......@@ -58,9 +58,9 @@ Examples:
"
(declare (type (integer 0) n) (number start step))
(loop repeat n
;; KLUDGE: get numeric contagion right for the first element too
for i = (+ start (- step step)) then (+ i step)
collect i))
;; KLUDGE: get numeric contagion right for the first element too
for i = (+ (- (+ start step) step)) then (+ i step)
collect i))
(declaim (inline map-iota))
(defun map-iota (function n &key (start 0) (step 1))
......
......@@ -1880,3 +1880,8 @@
t
t
t)
(deftest iota.fp-start-and-complex-integer-step
(equal '(#C(0.0 0.0) #C(0.0 2.0) #C(0.0 4.0))
(iota 3 :start 0.0 :step #C(0 2)))
t)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment