FA-70909 / Weather index computation / Member archive
Humidex with discomfort band: integer rounding · case 04
Published humidex is one point low about half the time and can land in a milder band.
Case contract
Input air temperature and dew point in degC. If dew point exceeds air temperature return None. e = 6.11*exp(5417.7530*(1/273.16 - 1/(273.15+Td))); H = T + 0.5555*(e - 10); report the humidex rounded half up to an integer and a band on that integer: <30 comfortable, 30-39 some discomfort, 40-45 great discomfort, 46-53 dangerous, >=54 heat stroke imminent.
Why this case matters
Summer heat bulletins publish humidex with a discomfort band.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| air 28 C dew point 20 C | [35, "some discomfort"] | [36, "some discomfort"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗