Michael Jones aa1902f917 [libc] add basic strtold implementation
Due to the differences between the types of long double, this function
is effectively three functions in one. This patch adds basic support for
the types of long double, although it's just using the fast path and the
fallback for the moment. I still need to implement a version of
Eisel-Lemire for performance, but the existing algorithms should be
correct.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D113710
2021-12-13 10:40:44 -08:00

19 lines
620 B
C++

//===-- Implementation header for strtold -----------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SRC_STDLIB_STRTOLD_H
#define LLVM_LIBC_SRC_STDLIB_STRTOLD_H
namespace __llvm_libc {
long double strtold(const char *__restrict str, char **__restrict str_end);
} // namespace __llvm_libc
#endif // LLVM_LIBC_SRC_STDLIB_STRTOLD_H