Skip to content

typeof(2*pi*1f0) #24238

@goszlanyi

Description

@goszlanyi

I was recently bitten by this behaviour:

julia> typeof(2*1f0)
Float32

julia> typeof(pi*1f0)
Float32

julia> typeof(2*pi*1f0)
Float64

julia> typeof(2*1f0*pi)
Float32

I wonder if Float64 is according to design or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    mathsMathematical functionsspeculativeWhether the change will be implemented is speculative

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions