Skip to content

transcendental functions return Float32 on small integer inputs #7390

Closed
@simonster

Description

@simonster

On line 124 of math.jl, we set up transcendental functions of arbitrary reals so that they call f(float(x)). Because float(::Int8) and float(::Int16) return a Float32, this means e.g. log(uint8(2)) returns a Float32. This is consistent, but I'm not sure it's desirable. The input is exact, so precision of the result seems just as important as if the input were an Int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions