forked from hercules-390/decNumber-icu-368
-
Notifications
You must be signed in to change notification settings - Fork 6
/
decnumber.readme.txt
81 lines (52 loc) · 2.74 KB
/
decnumber.readme.txt
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
This is the readme.txt for the decNumber package. It includes
instructions for compiling and testing the package; please read them.
---------------------------------------------------------------------
decNumber is distributed in two forms; as a complete package from
the International Components for Unicode (ICU) site (under an as-is
license), or as a collection of Open Source files from the GCC source
repository (under the GPL license).
If you are using the GCC files, you can obtain the documentation, the
example files mentioned below, and this readme from the General
Decimal Arithmetic web page -- http://speleotrove.com/decimal/ (the
URL for the open source files is also linked from there).
The ICU package
---------------
The ICU package includes the files:
* readme.txt (this file)
* ICU-license.html
* decNumber.pdf (documentation)
* The .c and .h file for each module in the package (see the
decNumber documentation), together with other included files.
* The .c files for each of the examples (example1.c through
example8.c).
The ICU package is made available under the terms of the ICU License
(ICU 1.8.1 and later) included in the package as ICU-license.html.
Your use of that package indicates your acceptance of the terms and
conditions of that Agreement.
To use and check decNumber
--------------------------
Please read the appropriate license and documentation before using
this package. If you are upgrading an existing use of decNumber
(with version <= 3.37) please read the Changes Appendix for later
versions -- you may need to change the DECLITEND flag.
1. Compile and link example1.c, decNumber.c, and decContext.c
For instance, use:
gcc -o example1 example1.c decNumber.c decContext.c
Note: If your compiler does not provide stdint.h or if your C
compiler does not handle line comments (// ...), then see the
User's Guide section in the documentation for further information
(including a sample minimal stdint.h).
The use of compiler optimization is strongly recommended (e.g.,
-O3 for GCC or /O2 for Visual Studio).
2. Run example1 with two numeric arguments, for example:
example1 1.23 1.27
this should display:
1.23 + 1.27 => 2.50
3. Similarly, try the other examples, at will.
Examples 2->4 require three files to be compiled, like Example 1.
Example 5 requires decimal64.c in addition to the core modules.
Example 6 requires decPacked.c in addition to the core modules.
Example 7 requires only example7.c decContext.c and decQuad.c
Example 8 requires example8.c, decContext.c, and decQuad.c, plus
decNumber.c, decimal128.c, and decimal64.c (the latter
for shared tables and code)