Skip to content

Int mean/median wrap at 2^63 #216

Description

@skymanbp

median' (VU.fromList [maxBound - 1, maxBound :: Int]) gives -1.5 - the
sum wraps in Int. mean has the same problem.

Widening per element fixes it but adds a conversion in the hot loop
(#214 review), so it needs db-benchmark numbers first. Will send a PR
with benchmarks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions