File: redefinitions-2.2.1.mzn

package info (click to toggle)
gecode-snapshot 6.2.0%2Bgit20240207-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 35,308 kB
  • sloc: cpp: 475,516; perl: 2,077; makefile: 1,816; sh: 198
file content (14 lines) | stat: -rw-r--r-- 284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
predicate gecode_int_pow(var int: x, int: y, var int: z);

predicate int_pow_fixed(var int: x, int: y, var int: z) =
  if y = 0 then
    z = 1
  elseif y = 1 then
    z = x
  else
    if y >= 0 then
      gecode_int_pow(x, y, z)
    else
      z = 1 div pow(x, -y)
    endif
  endif;