Compares float fields with these explicitly specified top-level field numbers using the
provided absolute tolerance.

@param tolerance A finite, non-negative tolerance.
761846
public MapWithProtoValuesFluentAssertion<M> usingFloatToleranceForFieldsForValues(
      float tolerance, Iterable<Integer> fieldNumbers) {
    return usingConfig(config.usingFloatToleranceForFields(tolerance, fieldNumbers));
  }
217466
public static Mapping<Float> floatv(Constraint... constraints) {
        return new FieldMapping(
                InputMode.SINGLE,
                mkSimpleConverter(s ->
                    isEmptyStr(s) ? 0.0f : Float.parseFloat(s)
                ), new MappingMeta(MAPPING_FLOAT, Float.class)
            ).constraint(checking(Float::parseFloat, "error.float", true))
                .constraint(constraints);
        }
10597
public MapWithProtoValuesFluentAssertion<M> usingDoubleToleranceForFieldDescriptorsForValues(
      double tolerance, Iterable<FieldDescriptor> fieldDescriptors) {
    return usingConfig(config.usingDoubleToleranceForFieldDescriptors(tolerance, fieldDescriptors));
  }
1185375
@SuppressWarnings("fallthrough")
    protected int handleGetLimit(int field, int limitType) {
        switch (field) {
        case ERA:
            if (limitType == MINIMUM || limitType == GREATEST_MINIMUM) {
                return 0;
            }
            return CURRENT_ERA;
        case YEAR:
        {
            switch (limitType) {
            case MINIMUM:
            case GREATEST_MINIMUM:
                return 1;
            case LEAST_MAXIMUM:
                return 1;
            case MAXIMUM:
                return super.handleGetLimit(field, MAXIMUM) - ERAS[CURRENT_ERA*3];
            }
            //Fall through to the default if not handled above
        }
        default:
            return super.handleGetLimit(field, limitType);
        }
    }
67806
public IterableOfProtosFluentAssertion<M> usingDoubleToleranceForFields(
      double tolerance, Iterable<Integer> fieldNumbers) {
    return usingConfig(config.usingDoubleToleranceForFields(tolerance, fieldNumbers));
  }
957894
public void writeFloat(final int fieldNumber, final float value)
                         throws IOException {
    writeTag(fieldNumber, WireFormat.WIRETYPE_FIXED32);
    writeFloatNoTag(value);
  }
591960
public boolean validateSF(SF sf, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(sf, diagnostics, context);
	}
381171
public function setTolerance($tolerance = 0.20)
        {
            if ($tolerance < 0 || $tolerance > 1) {
                return false;
            }

            $this->_tolerance = round($tolerance, 2);

            return $this;
        }
86835
public static Geometry densify(Geometry geometry, double tolerance) {
        if(geometry == null){
            return null;
        }
        return Densifier.densify(geometry, tolerance);
    }
65081
private String[] getValueToleranceRange(ColumnValue value) {
		double doubleValue = ((Number) value.getValue()).doubleValue();
		double tolerance = value.getTolerance();
		return new String[] { Double.toString(doubleValue - tolerance),
				Double.toString(doubleValue + tolerance) };
	}
365410
public static void validateFractionDigits(int fractionDigits, double value){
        if (value != ((int) value)){
            String doubleValue = String.valueOf(value);

            int numberOfFractionDigits = doubleValue.substring(doubleValue.indexOf(',')).length();

            if (numberOfFractionDigits > fractionDigits){
                throw new RestrictionViolationException("Violation of fractionDigits restriction, value should have a maximum of " + fractionDigits + " decimal places.");
            }
        }
    }
1075621
protected boolean isFloatingPointNumber(Object val) {
    if (val instanceof Float || val instanceof Double) {
      return true;
    }
    if (val instanceof String) {
      String string = (String) val;
      return string.indexOf('.') != -1 || string.indexOf('e') != -1 || string.indexOf('E') != -1;
    }
    return false;
  }
575750
def _find_integer_tolerance(epsilon, v_max, min_tol):
    """"""
    int_tol = min(epsilon / (10 * v_max), 0.1)
    min_tol = max(1e-10, min_tol)
    if int_tol < min_tol:
        eps_lower = min_tol * 10 * v_max
        logger.warning(
            'When the maximum flux is {}, it is recommended that'
            ' epsilon > {} to avoid numerical issues with this'
            ' solver. Results may be incorrect with'
            ' the current settings!'.format(v_max, eps_lower))
        return min_tol

    return int_tol
1279909
protected void validateEqualField(String field_1, String field_2, String errorKey, String errorMessage) {
		String value_1 = controller.getPara(field_1);
		String value_2 = controller.getPara(field_2);
		if (value_1 == null || value_2 == null || (! value_1.equals(value_2))) {
			addError(errorKey, errorMessage);
		}
	}
1353878
@ArgumentsChecked
	@Throws(IllegalNullArgumentException.class)
	public static float checkFloat(@Nonnull final Number number) {
		Check.notNull(number, "number");
		if (!isInFloatRange(number)) {
			throw new IllegalNumberRangeException(number.toString(), FLOAT_MIN, FLOAT_MAX);
		}

		return number.floatValue();
	}
469435
public Float getFloat(String fieldName) {
		try {
			return hasValue(fieldName) ? Float.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
		} catch (NumberFormatException e) {
			throw new FqlException("Field '" + fieldName +"' is not a number.", e);
		}
	}
870761
public void fconst(float value) throws IOException
    {
        if (value == 0 || value == 1 || value == 2)
        {
            super.fconst((int) value);
        }
        else
        {
            ldc(value);
        }
    }