ulong fp_eq (float x, float standard, float epsilon, float fp_delta)
{
  ulong compare (float x, float standard, float e_standard, float epsilon, float fp_delta)
  {
    if (fp_abs (standard - x) < fp_delta ||
        fp_abs (standard - x) < fp_abs (e_standard) * epsilon) 
    { 
      return 1;
    }
    else
    { 
      return 0;
    }
  }

  if (epsilon > fp_delta)
  {
    if (standard != 0.00)
    {
      if (x != 0.00)
      {
        return compare (x, standard, standard, epsilon, fp_delta);
      }
      else
      {
        return compare (x, standard, standard, epsilon, fp_delta);
      }
    }
    else
    {
      if (x != 0.00)
      {
        return compare (standard, x, x, epsilon, fp_delta);
      }
      else
      {
        return 1;
      }
    }
  }
  else
  {
    error (ERR_EPSILON_DELTA);
  }
}
