Files
swift-mirror/test/Interpreter/builtin.swift
Dmitri Hrybenko ea48185358 stdlib: don't silently truncate Float80 literals
We used to first truncate them to Float64, and then construct a Float80.

Swift SVN r21433
2014-08-25 13:21:54 +00:00

10 lines
407 B
Swift

// RUN: mkdir -p %t
// RUN: %target-build-swift %s -parse-stdlib -Xfrontend -disable-access-control -o %t/a.out
// RUN: %target-run %t/a.out | FileCheck %s
import Swift
println(String(Int32(Builtin.bitcast_FPIEEE32_Int32(Float32(1).value)), radix: 16)) // CHECK: {{^}}3f800000{{$}}
println(String(UInt64(Builtin.bitcast_FPIEEE64_Int64(Float64(1).value)), radix: 16)) // CHECK: {{^}}3ff0000000000000{{$}}