get_epsilon

Returns the epsilon that is used to determine whether a floating-point number is in fact an integer.

REAL get_epsilon(lprec *lp);

Return Value

get_epsilon returns the value of epsilon.

Parameters

lp

Pointer to previously created lp model. See return value of make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS

Remarks

The get_epsilon function returns the epsilon that is used to determine whether a floating-point number is in fact an integer.
The default value for epsilon is 1e-6

Example

#include <stdio.h>
#include <stdlib.h>
#include "lpkit.h"

int main(void)
{
  lprec *lp;
  REAL epsilon;

  /* Create a new LP model */
  lp = make_lp(0, 0);
  if(lp == NULL) {
    fprintf(stderr, "Unable to create new LP model\n");
    return(1);
  }

  epsilon = get_epsilon(lp); /* will return 1.0e-6 */

  delete_lp(lp);
  return(0);
}

lp_solve API reference

See Also make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS, set_epsilon, set_infinite, get_infinite, set_epsb, get_epsb, set_epsd, get_epsd, set_epsel, get_epsel, get_epspivot, set_epspivot, set_epsperturb, get_epsperturb