For the complete documentation index, see llms.txt. This page is also available as Markdown.

74. म्यूटेशन: Equation सत्यापित करें

Equation कोड को सत्यापित करने के लिए म्यूटेशन। Equation इंजन के ऊपर बनाया गया है python भाषा सामान्य गणितीय क्रियाओं के समर्थन के साथ।

समर्थित क्रियाओं की सूची:

  1. Python बेसिक मॉड्यूल: abs, all, any, bin, bool, bytearray, bytes, chr, complex, dict, dir, divmod, enumerate, filter, float, format, frozenset, hash, hex, id, int, isinstance, len, list, map, max, min, oct, ord, pow, range, repr, reversed, round, set, slice, sorted, str, sum, tuple, type, zip.

  2. Python math मॉड्यूल: acos, acosh, asin, asinh, atan, atan2, atanh, ceil, copysign, cos, cosh, degrees, e, exp, fabs, factorial, floor, fmod, frexp, fsum, hypot, isinf, isnan, ldexp, log, log10, log1p, modf, pi, pow, radians, sin, sinh, sqrt, tan, tanh, trunc.

  3. Python शर्तें: if, elif, else.

  4. Python लूप: for, while.

mutation VerifyEquation {
  verifyEquation(input: {
    dataVariables: [{
      variable: "yield_vol"
      sampleValue: 1.1 
    }, {
      variable: "prod"
      sampleValue: 2.2
    }]
    equationAsText: """calculated = yield_vol/prod + 3.5 
if calculated >= 30:
    result = 35
elif calculated >= 20 and calculated < 30:
    result = 25
else:
    result = 15
    """
    equationResultVariable: "result"
  }) {
    executed
    result
    errorMessage
  }
}

अंतिम अपडेट

क्या यह उपयोगी था?