{
  "category": "Operators",
  "display_name": "Less than or equal to (<=)",
  "entry_kind": "built_in_operator",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.OP_LESS_EQUAL",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 6 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 6 recorded answers",
    "workbook_corpus": {
      "cells": 6,
      "matched": 6,
      "worst_ulp": 0
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/comparison.rs#L59-L59",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/comparison.rs#L135-L146"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/comparison::compare",
        "catalogue/comparison::Operand::kind",
        "catalogue/comparison::Operand::blank",
        "catalogue/comparison::order",
        "catalogue/comparison::overflow_numbers",
        "catalogue/comparison::numbers",
        "catalogue/comparison::in_band",
        "catalogue/comparison::Rounded::up",
        "catalogue/comparison::Roundings::of",
        "catalogue/comparison::Roundings::disjoint",
        "catalogue/comparison::texts",
        "catalogue/comparison/collation::compare",
        "catalogue/comparison/collation::weighed",
        "catalogue/comparison/collation::measured_iteration_extension",
        "catalogue/comparison/sort_key::table",
        "catalogue/comparison/sort_key::decode64",
        "catalogue/comparison/sort_key::Reader::byte",
        "catalogue/comparison/sort_key::Reader::varint",
        "catalogue/comparison/sort_key::Reader::done",
        "catalogue/comparison/sort_key::in_ranges",
        "catalogue/comparison/sort_key::build",
        "catalogue/comparison/sort_key::han_base",
        "catalogue/comparison/sort_key::derive",
        "catalogue/comparison/sort_key::shared_jamo_tails",
        "catalogue/comparison/sort_key::ordinary_jamo_prefix",
        "catalogue/comparison/sort_key::independent_jamo_suffix",
        "catalogue/comparison/sort_key::jamo_leading_primary",
        "catalogue/comparison/sort_key::leading_order",
        "catalogue/comparison/sort_key::Before::separate_special",
        "catalogue/comparison/sort_key::Gathered::kana",
        "catalogue/comparison/sort_key::Gathered::unit",
        "catalogue/comparison/sort_key::parts",
        "catalogue/comparison/sort_key::diacritic_order",
        "catalogue/comparison/sort_key::diacritics",
        "decimal::low32",
        "decimal::Natural::from_u64",
        "decimal::Natural::pow10",
        "decimal::Natural::normalize",
        "decimal::Natural::is_zero",
        "decimal::Natural::mul_add_small",
        "decimal::Natural::times_pow10",
        "decimal::Natural::times_pow5",
        "decimal::Natural::times_pow2",
        "decimal::ExactDecimal::binary"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/comparison.rs#L59-L59",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 6 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.OP_LESS_EQUAL.json",
  "name": "OP_LESS_EQUAL",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- [`FUNC.OP_LESS_THAN`](FUNC.OP_LESS_THAN.md) — the strict form, and the operator with which\n  `<=` disagrees exactly on the normalized-equality band.\n- [`FUNC.OP_GREATER_EQUAL`](FUNC.OP_GREATER_EQUAL.md) — the mirror.\n- [`FUNC.OP_EQUAL`](FUNC.OP_EQUAL.md) — the equality half.\n- `MEDIAN`, `PERCENTILE`, `QUARTILE`, histogram-style `FREQUENCY` — functions whose bucket\n  boundaries are defined with a closed side. Their internal boundary convention is their own,\n  documented per function; do not assume it matches this operator's normalized equality.\n- `COUNTIFS(range,\"<=5\")` — a criteria string, parsed by the consuming function.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n\n- Derive `<=` from the same three-way comparison core as the other five operators. In\n  particular, the equality it uses must be *the* equality, normalization included; a `<=`\n  implemented as \"exact less-than or normalized-equal\", or the reverse, produces a subtly\n  different relation.\n- `A<=B` must not be implemented as `NOT(A>B)` while errors are in play: the error must\n  propagate as an error, not be negated into a logical.\n- If the comparison core is a tolerance model rather than a normalization model, `<=` will\n  be non-transitive near the boundary. Record which model you implemented.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n- **Equal operands** give `TRUE`, under the family's equality — which includes the\n  case-insensitive text rule, so `\"a\" <= \"A\"` is `TRUE` in both directions.\n- **Different kinds** give the kind ordering; the equality half never fires across kinds,\n  because operands of different kinds are never equal.\n- **Blank operands.** Context-sensitive: blank behaves as `0` against a number, `\"\"` against\n  text, `FALSE` against a logical. A blank cell is therefore `<= 0`, `<= \"\"` and `<= FALSE`,\n  all `TRUE`.\n- **Arrays.** Ordinary broadcast with `#N/A` for unsupplied coordinates.\n\n\n\n### Errors\n\n`data/functions/FUNC.OP_LESS_EQUAL.json` records no Microsoft documentation URL (`docs` is\n`null`).\n\n\n",
    "sources": "- `data/presence/FUNC.OP_LESS_EQUAL.json` — implementing module\n  `earlier-implementation/operator_compare_concat_family.rs`.\n- Handbook `content/model/01-value-universe.md`, `02-coercion-and-lifting.md`,\n  `03-call-pipeline.md`, and [`FUNC.OP_EQUAL`](FUNC.OP_EQUAL.md) for the three rules.\n\n",
    "version-differences": "No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.",
    "what-it-does": "\n`A <= B` returns `TRUE` when `A` precedes `B` in Excel's comparison order **or** is equal to\nit under that order, and `FALSE` otherwise.\n\nThe comparison order and the equality it uses are the family's, stated in full on\n[`FUNC.OP_EQUAL`](FUNC.OP_EQUAL.md): kinds are ordered rather than coerced (number < text <\nlogical), text comparison is case-insensitive, and numeric comparison passes through a\nnormalization lane instead of exact IEEE comparison.\n\nEverything else follows from `<` and `=`.\n\n\n\n### Arguments\n\n\n| Position | Name | Meaning |\n|---|---|---|\n| 0 | `A` | Left operand. Required. |\n| 1 | `B` | Right operand. Required. |\n\nArity is exactly 2; no optional arguments, no defaults. Order is load-bearing.\n\n\n"
  },
  "signature": {
    "display": "value1 <= value2",
    "parameters": [
      {
        "description": null,
        "name": "value1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "value2",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "category": "Operators",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": null,
        "short_source": "no-short-description"
      },
      "docs": null,
      "entry_kind": "built_in_operator",
      "localized_family_names": null,
      "localized_names": [],
      "signature": {
        "display": "value1 <= value2",
        "parameters": [
          {
            "description": null,
            "name": "value1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "value2",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "OP_LESS_EQUAL",
      "version_marker": null,
      "xlcall": null
    },
    "microsoft": null
  },
  "try_it": {
    "formula": "=1<=2"
  },
  "url": "https://handbook.dnacalc.com/functions/OP_LESS_EQUAL.html",
  "variants": [],
  "versions": []
}