Skip to content

(^) can return 0.5 typed as an Int #960

Open
@rtfeldman

Description

@rtfeldman

SSCCE

> (floor 2) ^ -1
0.5 : Int

This happens because (^) currently has the type number -> number -> number, but if it receives a negative second argument, it returns a fraction even if both arguments have the type Int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions