"same" values appear in the leaf in an ADD

32 views Asked by At

In my ADD computation, I often have repeated values in the leaves. Should they be automatically compressed?

For example:

-0-0-- 191.452

-0-1-- 191.452

-1-0-- 191.452

-1-1-- 191.452

One guess is that they have different mantissa which is not shown. But I also have values with more mantissa:

---0-0 8.14148

---0-1 9.65706

---1-0 8.14148

---1-1 9.65706

I can only suppose the hidden digits are different so they appear in different leaves...

It seems like it only shows 6 digits. Can I change this setting? Can anyone confirm my doubts? Thanks a lot.

1

There are 1 answers

0
PaulR On BEST ANSWER

You can change the "epsilon" determining whether two values are considered equal.

This should set the epsilon value to a millionth:

Cudd_SetEpsilon(manager, 1.0e-6);

The default is defined in cuddInt.h as 1.0e-12:

#define DD_EPSILON  (1.0e-12)

If I am not mistaken, the printing happens in the internal function ddPrintMintermAux in cuddUtil.c using fprintf with the %g conversion specifier. You could change that code in CUDD and rebuild it to print the numbers with higher precision.