merge from gcc
[deliverable/binutils-gdb.git] / libdecnumber / decSingle.c
CommitLineData
f5bc1778
DJ
1/* decSingle module for the decNumber C Library.
2 Copyright (C) 2007 Free Software Foundation, Inc.
3 Contributed by IBM Corporation. Author Mike Cowlishaw.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 In addition to the permissions in the GNU General Public License,
13 the Free Software Foundation gives you unlimited permission to link
14 the compiled version of this file into combinations with other
15 programs, and to distribute those combinations without any
16 restriction coming from the use of this file. (The General Public
17 License restrictions do apply in other respects; for example, they
18 cover modification of the file, and distribution when not linked
19 into a combine executable.)
20
21 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
22 WARRANTY; without even the implied warranty of MERCHANTABILITY or
23 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with GCC; see the file COPYING. If not, write to the Free
28 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
29 02110-1301, USA. */
30
31/* ------------------------------------------------------------------ */
32/* decSingle.c -- decSingle operations module */
33/* ------------------------------------------------------------------ */
f2be9503
DD
34/* This module comprises decSingle operations (including conversions) */
35/* ------------------------------------------------------------------ */
f5bc1778 36
f2be9503 37#include "decContext.h" /* public includes */
f5bc1778
DJ
38#include "decSingle.h" /* public includes */
39
40/* Constant mappings for shared code */
f2be9503
DD
41#define DECPMAX DECSINGLE_Pmax
42#define DECEMIN DECSINGLE_Emin
43#define DECEMAX DECSINGLE_Emax
f5bc1778
DJ
44#define DECEMAXD DECSINGLE_EmaxD
45#define DECBYTES DECSINGLE_Bytes
46#define DECSTRING DECSINGLE_String
47#define DECECONL DECSINGLE_EconL
f2be9503
DD
48#define DECBIAS DECSINGLE_Bias
49#define DECLETS DECSINGLE_Declets
f5bc1778
DJ
50#define DECQTINY (-DECSINGLE_Bias)
51/* parameters of next-wider format */
52#define DECWBYTES DECDOUBLE_Bytes
53#define DECWPMAX DECDOUBLE_Pmax
54#define DECWECONL DECDOUBLE_EconL
55#define DECWBIAS DECDOUBLE_Bias
56
57/* Type and function mappings for shared code */
f2be9503
DD
58#define decFloat decSingle /* Type name */
59#define decFloatWider decDouble /* Type name */
f5bc1778
DJ
60
61/* Utility (binary results, extractors, etc.) */
f2be9503
DD
62#define decFloatFromBCD decSingleFromBCD
63#define decFloatFromPacked decSingleFromPacked
64#define decFloatFromString decSingleFromString
65#define decFloatFromWider decSingleFromWider
66#define decFloatGetCoefficient decSingleGetCoefficient
67#define decFloatGetExponent decSingleGetExponent
68#define decFloatSetCoefficient decSingleSetCoefficient
69#define decFloatSetExponent decSingleSetExponent
70#define decFloatShow decSingleShow
71#define decFloatToBCD decSingleToBCD
72#define decFloatToEngString decSingleToEngString
73#define decFloatToPacked decSingleToPacked
74#define decFloatToString decSingleToString
75#define decFloatToWider decSingleToWider
76#define decFloatZero decSingleZero
f5bc1778
DJ
77
78/* Non-computational */
f2be9503
DD
79#define decFloatRadix decSingleRadix
80#define decFloatVersion decSingleVersion
f5bc1778
DJ
81
82#include "decNumberLocal.h" /* local includes (need DECPMAX) */
83#include "decCommon.c" /* non-basic decFloat routines */
84/* [Do not include decBasic.c for decimal32] */
85
This page took 0.077668 seconds and 4 git commands to generate.