Overflows when using exponentials

Issue #817 new
Bart Bogaerts created an issue

see http://seldon.cs.kuleuven.be/idp/?src=55d607f6725aa0680050

I don't know yet if this is solver or grounder related.

Comments (7)

  1. Bart Bogaerts reporter

    This issue occurs because of overflow problems..

    Printgrounding reveals

    tseitin_504 <=> var_81 = 640942080.
    tseitin_504.
    tseitin_505 <=> var_82 = 937459712.
    tseitin_505.
    tseitin_506 <=> var_83 = -2049400832.
    tseitin_506.
    tseitin_507 <=> var_84 = 1733216256.
    tseitin_507.
    tseitin_508 <=> var_85 = 1620131072.
    tseitin_508.
    tseitin_509 <=> var_86 = 2025163840.
    
  2. Bart Bogaerts reporter

    This issue can be resolved as follows:

    • In src/structure/NumericOperations.cpp take overlows into account. Carefully program this.

    • Make sure that other parts of the code all use these numericoperations. For example in src/Structure/StructureComponents, there still are manual calls to pow, manual sums, ....

  3. Joachim Jansen

    Idea: re-use ArithmeticUtils? These use the "safeint" library that does these overflow checks for us

    Or is there a reason not to reuse these?

    Edit: is this only related to ints? Also: safeint3 does not support exponentials, but we could loop around this with multiplication.

  4. Log in to comment