PIPS
ppcm.c File Reference
#include <stdio.h>
#include "arithmetique.h"
#include "linear_assert.h"
+ Include dependency graph for ppcm.c:

Go to the source code of this file.

Functions

Value ppcm (Value i, Value j)
 package arithmetique More...
 

Function Documentation

◆ ppcm()

Value ppcm ( Value  i,
Value  j 
)

package arithmetique

ppcm.c

INTLIBRARY int ppcm(int i, int j): plus petit entier positif divisible par i et j

Ancien nom et ancien type: void lcm(int i, int j, int *pk)

Definition at line 42 of file ppcm.c.

43 {
44  if (value_neg_p(i)) i = value_uminus(i);
45  if (value_neg_p(j)) j = value_uminus(j);
46 
47  if (value_zero_p(i) || value_zero_p(j))
48  return VALUE_ZERO;
49  else {
50  Value d = pgcd(i,j);
51  d = value_div(i,d);
52  return value_mult(d,j);
53  }
54 }
#define VALUE_ZERO
#define pgcd(a, b)
Pour la recherche de performance, selection d'une implementation particuliere des fonctions.
#define value_uminus(val)
unary operators on values
#define value_zero_p(val)
int Value
#define value_mult(v, w)
whether the default is protected or not this define makes no sense any more...
#define value_neg_p(val)
#define value_div(v1, v2)

References pgcd, value_div, value_mult, value_neg_p, value_uminus, VALUE_ZERO, and value_zero_p.

Referenced by bounds_equal_p(), build_contraction_matrices(), compose_vvs(), include_trans_on_LC_in_ref(), matrice_diagonale_inversion(), matrice_substract(), matrix_add(), matrix_diagonal_inversion(), matrix_substract(), my_matrices_to_constraints_with_sym_cst(), my_matrices_to_constraints_with_sym_cst_2(), simplify_dimension(), simplify_predicate(), and vvs_on_vvs().

+ Here is the caller graph for this function: