comparison libdecnumber/decSingle.c @ 0:a06113de4d67

first commit
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 14:47:48 +0900
parents
children 77e2b8dfacca
comparison
equal deleted inserted replaced
-1:000000000000 0:a06113de4d67
1 /* decSingle module for the decNumber C Library.
2 Copyright (C) 2007, 2009 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 3, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
20
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
25
26 /* ------------------------------------------------------------------ */
27 /* decSingle.c -- decSingle operations module */
28 /* ------------------------------------------------------------------ */
29 /* This module comprises decSingle operations (including conversions) */
30 /* ------------------------------------------------------------------ */
31
32 #include "decContext.h" /* public includes */
33 #include "decSingle.h" /* public includes */
34
35 /* Constant mappings for shared code */
36 #define DECPMAX DECSINGLE_Pmax
37 #define DECEMIN DECSINGLE_Emin
38 #define DECEMAX DECSINGLE_Emax
39 #define DECEMAXD DECSINGLE_EmaxD
40 #define DECBYTES DECSINGLE_Bytes
41 #define DECSTRING DECSINGLE_String
42 #define DECECONL DECSINGLE_EconL
43 #define DECBIAS DECSINGLE_Bias
44 #define DECLETS DECSINGLE_Declets
45 #define DECQTINY (-DECSINGLE_Bias)
46 /* parameters of next-wider format */
47 #define DECWBYTES DECDOUBLE_Bytes
48 #define DECWPMAX DECDOUBLE_Pmax
49 #define DECWECONL DECDOUBLE_EconL
50 #define DECWBIAS DECDOUBLE_Bias
51
52 /* Type and function mappings for shared code */
53 #define decFloat decSingle /* Type name */
54 #define decFloatWider decDouble /* Type name */
55
56 /* Utility (binary results, extractors, etc.) */
57 #define decFloatFromBCD decSingleFromBCD
58 #define decFloatFromPacked decSingleFromPacked
59 #define decFloatFromString decSingleFromString
60 #define decFloatFromWider decSingleFromWider
61 #define decFloatGetCoefficient decSingleGetCoefficient
62 #define decFloatGetExponent decSingleGetExponent
63 #define decFloatSetCoefficient decSingleSetCoefficient
64 #define decFloatSetExponent decSingleSetExponent
65 #define decFloatShow decSingleShow
66 #define decFloatToBCD decSingleToBCD
67 #define decFloatToEngString decSingleToEngString
68 #define decFloatToPacked decSingleToPacked
69 #define decFloatToString decSingleToString
70 #define decFloatToWider decSingleToWider
71 #define decFloatZero decSingleZero
72
73 /* Non-computational */
74 #define decFloatRadix decSingleRadix
75 #define decFloatVersion decSingleVersion
76
77 #include "decNumberLocal.h" /* local includes (need DECPMAX) */
78 #include "decCommon.c" /* non-basic decFloat routines */
79 /* [Do not include decBasic.c for decimal32] */
80