]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/builtins/Unit/truncdfsf2_test.c
1 //===--------------- truncdfsf2_test.c - Test __truncdfsf2 ----------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file tests __truncdfsf2 for the compiler_rt library.
12 //===----------------------------------------------------------------------===//
18 float __truncdfsf2(double a
);
20 int test__truncdfsf2(double a
)
22 float actual
= __truncdfsf2(a
);
25 if (actual
!= expected
) {
26 printf("error in test__truncdfsf2(%lf) = %f, "
27 "expected %f\n", a
, actual
, expected
);
35 if (test__truncdfsf2(340282366920938463463374607431768211456.0))