Skip to content

float32 vs float64 precision lost when casting to int #18310

@trajber

Description

@trajber

The float to int conversion behaves different for 32 and 64 precision.
https://play.golang.org/p/-zkCNSTbNa

Is this the correct behavior?

I'm using go version go1.7.4 linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions