File: ryu.h

package info (click to toggle)
picolibc 1.8.11-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 50,064 kB
  • sloc: ansic: 404,031; asm: 24,984; sh: 2,585; python: 2,289; perl: 680; pascal: 329; exp: 287; makefile: 222; cpp: 71; xml: 40
file content (40 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2018 Ulf Adams
//
// The contents of this file may be used under the terms of the Apache License,
// Version 2.0.
//
//    (See accompanying file LICENSE-Apache or copy at
//     http://www.apache.org/licenses/LICENSE-2.0)
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE-Boost or copy at
//     https://www.boost.org/LICENSE_1_0.txt)
//
// Unless required by applicable law or agreed to in writing, this software
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.
#ifndef RYU_H
#define RYU_H

#define RYU_OPTIMIZE_SIZE

#include <inttypes.h>

int   d2s_buffered_n(double f, char *result);
void  d2s_buffered(double f, char *result);
char *d2s(double f);

int   f2s_buffered_n(float f, char *result);
void  f2s_buffered(float f, char *result);
char *f2s(float f);

int   d2fixed_buffered_n(double d, uint32_t precision, char *result);
void  d2fixed_buffered(double d, uint32_t precision, char *result);
char *d2fixed(double d, uint32_t precision);

int   d2exp_buffered_n(double d, uint32_t precision, char *result);
void  d2exp_buffered(double d, uint32_t precision, char *result);
char *d2exp(double d, uint32_t precision);

#endif // RYU_H