1 // Copyright 2018 Ulf Adams 2 // 3 // The contents of this file may be used under the terms of the Apache License, 4 // Version 2.0. 5 // 6 // (See accompanying file LICENSE-Apache or copy at 7 // http://www.apache.org/licenses/LICENSE-2.0) 8 // 9 // Alternatively, the contents of this file may be used under the terms of 10 // the Boost Software License, Version 1.0. 11 // (See accompanying file LICENSE-Boost or copy at 12 // https://www.boost.org/LICENSE_1_0.txt) 13 // 14 // Unless required by applicable law or agreed to in writing, this software 15 // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 // KIND, either express or implied. 17 #ifndef RYU_H 18 #define RYU_H 19 20 #define RYU_OPTIMIZE_SIZE 21 22 #include <inttypes.h> 23 24 int d2s_buffered_n(double f, char* result); 25 void d2s_buffered(double f, char* result); 26 char* d2s(double f); 27 28 int f2s_buffered_n(float f, char* result); 29 void f2s_buffered(float f, char* result); 30 char* f2s(float f); 31 32 int d2fixed_buffered_n(double d, uint32_t precision, char* result); 33 void d2fixed_buffered(double d, uint32_t precision, char* result); 34 char* d2fixed(double d, uint32_t precision); 35 36 int d2exp_buffered_n(double d, uint32_t precision, char* result); 37 void d2exp_buffered(double d, uint32_t precision, char* result); 38 char* d2exp(double d, uint32_t precision); 39 40 #endif // RYU_H 41