Hacker News new | ask | show | jobs
by eli_gottlieb 3836 days ago
Ok! This should be easy.

"Linear function": f(x) = mx+b, or y=mx+b. You know, from 8th-grade algebra.

"Baseline and per-unit cost". So your "baseline" cost is how much you have to pay before you get the first unit of your item. Like, if your buying, say, chocolates, the "baseline" is the cost of the box, with no chocolates in it, or of shipping-and-handling. Then the per-unit costs is just how much you pay for each chocolate.

We then map those onto the math:

"Baseline" -- that's the y-intercept, or "b".

"Per-unit cost" -- that's the multiplier for the number of units, or "m".

And voila, we've got y=mx+b: a simple formula for how much your Christmas chocolates are going to cost you.

1 comments

Yup, way easier than expected. Except now they are New Years chocolates. ;-) Thanks for the reply!