23 lines · plain
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// 180/pi = ~57.29577951308232087685 or 0x1.ca5dc1a63c1f8p+5 or 0x1.ca5dc2p+5F10#if __CLC_FPSIZE == 3211#define DEGREE_LITERAL 0x1.ca5dc2p+5F12#elif __CLC_FPSIZE == 6413#define DEGREE_LITERAL 0x1.ca5dc1a63c1f8p+514#elif __CLC_FPSIZE == 1615#define DEGREE_LITERAL (half)0x1.ca5dc1a63c1f8p+516#endif17 18_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __clc_degrees(__CLC_GENTYPE radians) {19 return DEGREE_LITERAL * radians;20}21 22#undef DEGREE_LITERAL23