"""Original arithmetic from declared public inputs or explicit worked assumptions."""
import csv
from pathlib import Path
results={}
for name,b,se in [('overall',.0104,.00417),('short',.0115,.005),('long',.0001,.0064)]:
 results[name+'_sales_per1000']=b*1000;results[name+'_lower95_per1000']=(b-1.96*se)*1000;results[name+'_upper95_per1000']=(b+1.96*se)*1000
results['worked_50pct_margin_point_per1000']=.0104*.5*1000;results['worked_1000cost_point_assignments']=1000/(.0104*.5);results['worked_1000cost_lower_bound_assignments']=1000/((.0104-1.96*.00417)*.5)
assert results['long_lower95_per1000']<0<results['long_upper95_per1000']
p=Path(__file__).parent/"data";p.mkdir(exist_ok=True)
with (p/"description-verification-thresholds.csv").open("w",newline="") as f:
 w=csv.writer(f);w.writerow(["metric","value"]);w.writerows(results.items())
print(results)
