Merge from vendor branch LIBSTDC++:
[dragonfly.git] / contrib / bc / FAQ
1 Because of frequent questions ....... here is the BC FAQ
2
3
4 1) Why does BC have its own arbitrary precision number routines 
5    (found in lib/number.c) rather than using GMP?
6
7 GMP has "integers" (no digits after a decimal), "rational numbers"
8 (stored as 2 integers) and "floats".  None of these will correctly
9 represent a POSIX BC number.  Floats are the closest, but will not
10 behave correctly for many computations.  For example, BC numbers have
11 a "scale" that represent the number of digits to represent after the
12 decimal point.  The multiplying two of these numbers requires one to
13 calculate an exact number of digits after the decimal point regardless
14 of the number of digits in the integer part.  GMP floats have a
15 "fixed, but arbitrary" mantissa and so multiplying two floats will end
16 up dropping digits BC must calculate.
17