https://issues.dlang.org/show_bug.cgi?id=16027

          Issue ID: 16027
           Summary: Wrong result of double multiplication
           Product: D
           Version: D2
          Hardware: x86_64
               URL: https://forum.dlang.org/post/tbismdhjzvytyxrihzil@foru
                    m.dlang.org
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: schue...@gmx.net

void main()
{
    double value = 1.0;
    value *= -1.0;
    assert(value == -1.0);    // fails, value is +1.0

    value = 1.0;
    value = value * -1.0;
    assert(value == -1.0);
}

This is a regression introduced by this PR:
https://github.com/dlang/dmd/pull/5534

Reported by a user here:
https://forum.dlang.org/post/tbismdhjzvytyxrih...@forum.dlang.org

--

Reply via email to