brintos

brintos / llvm-project-archived public Read only

0
0
Text · 928 B · a7824c6 Raw
27 lines · cpp
1//===-- Extended-precision atan2 function ---------------------------------===//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#include "src/math/atan2l.h"10#include "src/__support/common.h"11#include "src/__support/macros/properties/types.h"12#include "src/__support/math/atan2.h"13 14namespace LIBC_NAMESPACE_DECL {15 16// TODO: Implement this for extended precision.17LLVM_LIBC_FUNCTION(long double, atan2l, (long double y, long double x)) {18#if defined(LIBC_TYPES_LONG_DOUBLE_IS_FLOAT64)19  return static_cast<long double>(20      math::atan2(static_cast<double>(y), static_cast<double>(x)));21#else22#error "Extended precision is not yet supported"23#endif24}25 26} // namespace LIBC_NAMESPACE_DECL27