"""Original arithmetic from declared public inputs or explicit worked assumptions."""
import csv
from pathlib import Path
results={'persistent_cumulative_pp':(.2+.2)/2,'fade_cumulative_pp':(.2+0)/2,'reversal_cumulative_pp':(.2-.2)/2,'recovered_week2_fade_pp':2*.1-.2,'unequal_weight_cumulative_pp':.4*.2+.6*(-.2)}
assert results['reversal_cumulative_pp']==0 and abs(results['unequal_weight_cumulative_pp']+.04)<1e-10
p=Path(__file__).parent/"data";p.mkdir(exist_ok=True)
with (p/"weekly-cumulative-model.csv").open("w",newline="") as f:
 w=csv.writer(f);w.writerow(["metric","value"]);w.writerows(results.items())
print(results)
