Skip to content

incorrect floating point results #18362

Open
@llvmbot

Description

@llvmbot
Bugzilla Link 17988
Version unspecified
OS MacOS X
Attachments Extract and type ./compile to compile the code ... Creates executable testBug
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@sunfishcode

Extended Description

Attaching a piece of C++ code which gives wrong floating point result with clang++. But gives correct results in the following compilers (tested)

  1. g++ >= 4.2 and 2) icpc > 11.0

Expected output

Flux = 0.57735 0.989578 0.412228 0.412228 1.73147

Actual output from clang

Flux = 0.508632 0.797979 0.383204 0.383204 1.20769

This bug is reproducible in clang shipped with Xcode 5.0 on OSX Maverics and clang 3.1-svn. valgrind shows no errors and using -O0 does not help either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions