FA-68881 / Tide and marine navigation tables / Open access
Harmonic tide prediction: Minute timestamps are multiplied by an hourly speed · case 01
Only the epoch prediction is right; later times drift wildly.
ROOT CAUSE
Speeds are degrees per hour but the minute count is used directly.
VERIFIED REPAIR
Convert minutes to hours before multiplying by the constituent speed.
Unsuccessful approach: Dividing by 3600 treats the minute count as seconds.
Case contract
Input [t_minutes, z0, constituents]; each constituent is [H metres, g phase lag deg, speed deg/hour, nodal factor f, nodal phase u deg, equilibrium argument V0 deg]. Height above chart datum is z0 + sum f*H*cos(V0+u+speed*t_hours-g). Return rounded to 4 decimals.
Why this case matters
Tide tables and passage plans turn published predictions into go/no-go decisions about depth, clearance and timing.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
t,z0,cons=x
hours=t
h=z0
for H,g,spd,f,u,v0 in cons:
arg=(v0+u+spd*hours-g)%360
h+=f*H*math.cos(math.radians(arg))
return round(h,4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 0.9174 | 2.3585 | Failed |
| harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.8751 | 1.8751 | Passed |
| harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.7203 | 3.2364 | Failed |
| harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.1683 | 1.9476 | Failed |
| harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.5395 | 1.9225 | Failed |
| harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.2844 | 3.6113 | Failed |
| harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.2665 | 1.3542 | Failed |
SHA-256 / 220fd1c85005b3fad9abbb3afdcf0886ae89a112b3adf664d99307d93993c830
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
t,z0,cons=x
hours=t/3600
h=z0
for H,g,spd,f,u,v0 in cons:
arg=(v0+u+spd*hours-g)%360
h+=f*H*math.cos(math.radians(arg))
return round(h,4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.8832 | 2.3585 | Failed |
| harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.8751 | 1.8751 | Passed |
| harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9075 | 3.2364 | Failed |
| harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.942 | 1.9476 | Failed |
| harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.0052 | 1.9225 | Failed |
| harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.0558 | 3.6113 | Failed |
| harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.1352 | 1.3542 | Failed |
SHA-256 / ca6f075f6c0c2638ceae0d4a50068aa0aa44c2958a3e5bb5e6f4f514694cc33e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
t,z0,cons=x
hours=t/60
h=z0
for H,g,spd,f,u,v0 in cons:
arg=(v0+u+spd*hours-g)%360
h+=f*H*math.cos(math.radians(arg))
return round(h,4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.3585 | 2.3585 | Passed |
| harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.8751 | 1.8751 | Passed |
| harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.2364 | 3.2364 | Passed |
| harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9476 | 1.9476 | Passed |
| harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9225 | 1.9225 | Passed |
| harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.6113 | 3.6113 | Passed |
| harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.3542 | 1.3542 | Passed |
SHA-256 / 08401da9ae61a7df6650bd49bfefc9d5d74df337ca7b10839bc8e1ec0233acd1
Verification & scope
A deterministic toy model with stipulated rules and constants; not certified hydrographic software or a substitute for official tide tables. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:06.341142+00:00.
Case digest / 413cac6f628fb3fdd2c8ded0fe605b4ef1036243f582cff822250ab72327b515