Opened 5 years ago

#292 new defect

GeometricSeries of Float is incorrect

Reported by: nicolas.cellier.aka.nice@… Owned by:
Priority: major Milestone:
Component: default Keywords:
Cc: Also affects CVS HEAD (eXept version): no

Description

(GeometricSeries   from: 1 to: 16  byFactor: 2) asArray.

-> #(1 2 4 8 16)

(GeometricSeries   from: 1.0 to: 16  byFactor: 2) asArray.

-> #(1.0 3.0 5.0 9.0)

The first one is correct, the second is unexpected!

Implementation of do: uses

                aValue := start + (factor raisedTo:iter).

instead of

                aValue := start * (factor raisedTo:iter).

Change History (0)

Note: See TracTickets for help on using tickets.