Path: blob/main/contrib/llvm-project/libcxx/src/include/ryu/d2fixed.h
35265 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78// Copyright (c) Microsoft Corporation.9// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception1011// Copyright 2018 Ulf Adams12// Copyright (c) Microsoft Corporation. All rights reserved.1314// Boost Software License - Version 1.0 - August 17th, 20031516// Permission is hereby granted, free of charge, to any person or organization17// obtaining a copy of the software and accompanying documentation covered by18// this license (the "Software") to use, reproduce, display, distribute,19// execute, and transmit the Software, and to prepare derivative works of the20// Software, and to permit third-parties to whom the Software is furnished to21// do so, all subject to the following:2223// The copyright notices in the Software and this entire statement, including24// the above license grant, this restriction and the following disclaimer,25// must be included in all copies of the Software, in whole or in part, and26// all derivative works of the Software, unless such copies or derivative27// works are solely in the form of machine-executable object code generated by28// a source language processor.2930// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR31// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,32// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT33// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE34// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,35// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER36// DEALINGS IN THE SOFTWARE.3738#ifndef _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_H39#define _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_H4041// Avoid formatting to keep the changes with the original code minimal.42// clang-format off4344#include <__config>45#include <cstdint>4647_LIBCPP_BEGIN_NAMESPACE_STD4849void __append_n_digits(const uint32_t __olength, uint32_t __digits, char* const __result);50void __append_nine_digits(uint32_t __digits, char* const __result);5152[[nodiscard]] to_chars_result __d2fixed_buffered_n(char* _First, char* const _Last, const double __d, const uint32_t __precision);53[[nodiscard]] to_chars_result __d2exp_buffered_n(char* _First, char* const _Last, const double __d, uint32_t __precision);5455_LIBCPP_END_NAMESPACE_STD5657// clang-format on5859#endif // _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_H606162