Books / Law as Code in Practice: French Family Benefits / Chapter 7

Part III · Chapter 7

When the Text Does Not Specify Rounding

3 min read

Full-page risograph illustration: a red path splitting in two around a red tree, a small marker at the fork.
Contents of Law as Code in Practice: French Family Benefits

By the end you can distinguish rounding written in the law from a named reading added to make a calculation executable.

Lawyer: what the wording specifies.
Analyst: the component whose rounding changes.
Developer: a refusal with a reason rather than an unrecorded choice.

The resident’s question

Keep the residence card, but switch to a fictional single resident with no dependants, in zone II, paying €430 monthly, with annual resources of €9,600, in March 2026. “If the text says divide by twelve, what happens when the answer does not end?” Predict whether the model silently rounds.

Douzième → one twelfth → the division in the E0 construction. Lecture nommée → named reading → ArrondiCentimeHalfUp.

The pinned wording

Article D. 832-26 CCH, edition applicable in March 2026, says:

le total étant ensuite divisé par douze

English gloss: the total is then divided by twelve. The text specifies the division, without specifying the rounding of this intermediate result. That silence is different from the express downward rounding of K in Chapter 6.

The model’s named reading

The canon has a rule that makes the cent rounding explicit:

rule EquivalenceLoyerMinimaleArrondie(m: Menage, type_foyer: TypeLogementFoyer,
                                      situation: SituationFamiliale, pac: Integer,
                                      ressources: Money) strict {
    effective [@2022-07-01, infinity);
    when secteur_logement_foyer(m) and aide_demandee(m, APL)
        and type_logement_foyer(m, type_foyer)
        and situation_familiale(m, situation) and personnes_a_charge(m, pac)
        and ressources_retenues(m, ressources);
    then equivalence_loyer_minimale(m,
        equivalence_minimale_arrondie(type_foyer, situation, pac, ressources));
}

Labels and source anchors are left out. This rule belongs to fr.apl::ArrondiCentimeHalfUp, a disputed named reading. The selected construction rounds to the cent with halves upward. We call it a reading of the model; this chapter does not establish it as the Cnaf’s operational practice.

The answers

File E0 question Monthly aid before CRDS
ResidentSansLecture Refusal: RUNTIME_ERROR, cause INEXACT_DIVISION No established amount; the same refusal applies
ResidentLectureD82 €164.76, established €132.664624, established

Recorded on 11 October 2026 with law 0.1.12. The second amount is the modelled aid after the housing-formula adjustments and before the CRDS deduction. €164.76 is the minimum rent equivalent, not the aid. A refusal is different from a computed “not established” answer.

Change one thing

The two files hold the same household facts; the second adds the named rounding reading. The answer’s grounds identify the selected rule. Removing the reading returns to the recorded refusal; it does not imply the household lacks a right to aid.

What this gives the fund

The file records which rounding reading is selected and which component it affects. These example files do not identify the person or authority responsible for selecting it. A caseworker can separate a calculation awaiting a reading from a decision refusing a benefit, and send the legal question to the appropriate reviewer.

Where Catala stands on this

Catala supports exact rational decimals and gives decimal-to-money conversion a defined rounding to the nearest cent (Catala book, ch. 5.2). That provides a clear computational convention. Arxo builds named readings into the language: here the calculation refuses until the case selects the cent reading used for this operation. Catala 1.3.0 has no dedicated built-in named-reading construct; a programme can expose a choice through an input or scope. For the fund, the choice travels with the answer and can be reviewed separately from the household’s facts.

Explore the recording

The rounding scene preserves the demonstration recorded on 9 October 2026. Today’s local check repeated both files and their declared tests:

These commands require a local repository checkout and an installed law executable. Start at the repository root.

cd corpus/laws/fr/apl/examples/douzieme-sans-arrondi
law ask . --case ResidentSansLecture --query-json queries/equivalence-loyer-minimale.json --out "$(mktemp -d)"
law ask . --case ResidentLectureD82 --query-json queries/equivalence-loyer-minimale.json --out "$(mktemp -d)"

Exercise

  1. Which displayed amount is E0?
  2. Does the refusal deny the housing right?
  3. In ResidentLectureD82, remove interpretation fr.apl::ArrondiCentimeHalfUp; while keeping the other context entries. Predict the E0 and monthly-aid responses.

Contents · PDF · EPUB · Free under CC BY 4.0

Law as Code in Practice: French Family Benefits

Contents

You’re reading · Part III

Where the Text Is Hard

Reading settings

Text size
Appearance

Preferences and your reading place are saved only in this browser.