1b43965adSMichael Flanders //===-- Implementation of nanf128 function --------------------------------===// 2b43965adSMichael Flanders // 3b43965adSMichael Flanders // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4b43965adSMichael Flanders // See https://llvm.org/LICENSE.txt for license information. 5b43965adSMichael Flanders // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6b43965adSMichael Flanders // 7b43965adSMichael Flanders //===----------------------------------------------------------------------===// 8b43965adSMichael Flanders 9b43965adSMichael Flanders #include "src/math/nanf128.h" 10b43965adSMichael Flanders #include "src/__support/common.h" 11*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 12b43965adSMichael Flanders #include "src/__support/str_to_float.h" 13b43965adSMichael Flanders #include "src/errno/libc_errno.h" 14b43965adSMichael Flanders 15*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 16b43965adSMichael Flanders 17b43965adSMichael Flanders LLVM_LIBC_FUNCTION(float128, nanf128, (const char *arg)) { 18b43965adSMichael Flanders auto result = internal::strtonan<float128>(arg); 19b43965adSMichael Flanders if (result.has_error()) 20b43965adSMichael Flanders libc_errno = result.error; 21b43965adSMichael Flanders return result.value; 22b43965adSMichael Flanders } 23b43965adSMichael Flanders 24*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 25