User Tools

Site Tools


gams:operations_with_eps_and_inf

Operations with EPS and INF

The GAMS program below demonstrates some characteristics of EPS and INF. For more information see Non-standard analysis.

$Ontext

   All gams operations are defined over the closed interval from
   -infinity (-INF) to +infinity (INF) and the three other
   special values: epsilon (EPS), missing (NA) and undefined (UNDF).
   The model crazy in the GAMS Model Library demonstrates the definition
   of these special values. This example extends the demonstrates
   of EPS and INF. For more information see:
   http://en.wikipedia.org/wiki/Non-standard_analysis

$Offtext

Scalar s1,s2,s3,s4,s5,s6,s7,s8,s9;
* infinitesimal * infinitesimal = infinitesimal
s1=eps*eps;
* infinitesimal * bounded       = infinitesimal
s2=eps*1E100;
* infinitesimal / bounded       = infinitesimal
s3=eps/1E100;
* infinitesimal + infinitesimal = infinitesimal
s4=eps+eps;
* infinitesimal - infinitesimal = infinitesimal
s5=eps-eps;
*      infinity - infinity      = 0
s6=inf-inf;
* infinitesimal * 0             = 0
s7=eps*0;
* infinitesimal / infinity      = 0
s8=eps/inf;
*       bounded - infinitesimal = bounded
s9=1-eps;
display s1,s2,s3,s4,s5,s6,s7,s8,s9;
gams/operations_with_eps_and_inf.txt · Last modified: 2013/04/26 16:16 by support