Make 'lttng/bitmap.h' a private header
[lttng-ust.git] / snprintf / floatio.h
... / ...
CommitLineData
1/* $OpenBSD: floatio.h,v 1.4 2008/09/07 20:36:08 martynas Exp $ */
2
3/*
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 * Copyright (C) 1990, 1993
7 * The Regents of the University of California. All rights reserved.
8 *
9 * This code is derived from software contributed to Berkeley by
10 * Chris Torek.
11 */
12
13#include "ust-helper.h"
14
15/*
16 * Floating point scanf/printf (input/output) definitions.
17 */
18
19/* 11-bit exponent (VAX G floating point) is 308 decimal digits */
20#define MAXEXP 308
21/* 128 bit fraction takes up 39 decimal digits; max reasonable precision */
22#define MAXFRACT 39
23
24/*
25 * MAXEXPDIG is the maximum number of decimal digits needed to store a
26 * floating point exponent in the largest supported format. It should
27 * be ceil(log10(LDBL_MAX_10_EXP)) or, if hexadecimal floating point
28 * conversions are supported, ceil(log10(LDBL_MAX_EXP)). But since it
29 * is presently never greater than 5 in practice, we fudge it.
30 */
31#define MAXEXPDIG 6
32#if LDBL_MAX_EXP > 999999
33#error "floating point buffers too small"
34#endif
35
36LTTNG_HIDDEN
37char *__hdtoa(double, const char *, int, int *, int *, char **);
38LTTNG_HIDDEN
39char *__hldtoa(long double, const char *, int, int *, int *, char **);
40LTTNG_HIDDEN
41char *__ldtoa(long double *, int, int, int *, int *, char **);
This page took 0.022308 seconds and 4 git commands to generate.