projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more tarval cleanup
[libfirm]
/
ir
/
tv
/
fltcalc.c
diff --git
a/ir/tv/fltcalc.c
b/ir/tv/fltcalc.c
index
8938cdc
..
7d20bab
100644
(file)
--- a/
ir/tv/fltcalc.c
+++ b/
ir/tv/fltcalc.c
@@
-52,7
+52,7
@@
#include "xmalloc.h"
#include "xmalloc.h"
-/** The number of extra prec
e
sion rounding bits */
+/** The number of extra prec
i
sion rounding bits */
#define ROUNDING_BITS 2
typedef uint32_t UINT32;
#define ROUNDING_BITS 2
typedef uint32_t UINT32;
@@
-1531,11
+1531,11
@@
void init_fltcalc(int precision) {
/* does nothing if already init */
if (precision == 0) precision = FC_DEFAULT_PRECISION;
/* does nothing if already init */
if (precision == 0) precision = FC_DEFAULT_PRECISION;
- init_strcalc(precision +
4
);
+ init_strcalc(precision +
2 + ROUNDING_BITS
);
- /* needs additionally
two bits to round, a
bit as explicit 1., and one for
+ /* needs additionally
rounding bits, one
bit as explicit 1., and one for
* addition overflow */
* addition overflow */
- max_precision = sc_get_precision() -
4
;
+ max_precision = sc_get_precision() -
(2 + ROUNDING_BITS)
;
if (max_precision < precision)
printf("WARNING: not enough precision available, using %d\n", max_precision);
if (max_precision < precision)
printf("WARNING: not enough precision available, using %d\n", max_precision);