Skip to content

Automatic type conversion in expressions with different kinds of floating-point is not performed #1626

@blackmius

Description

@blackmius

documentation says

The compiler always uses the maximum precision available to evaluate
floating-point values during semantic analysis; this means expressions like
0.09'f32 + 0.01'f32 == 0.09'f64 + 0.01'f64 are true.

running

import std/syncio
echo 0.09'f32 + 0.01'f32 == 0.09'f64 + 0.01'f64
blackmius@MacBook nimony % ./bin/nimony c -r test3.nim         
false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions