Back to General discussions forum
This is an exercise in representing a curve by a given number of straight line segments, such that the area between the curve and the straight line segments is minimised.
Dear Clive, thanks a lot for this problem of somewhat new kind! Image you provided is quite helpful.
I'm a bit unsure if there should or should not be minor issues with fractional answer (e.g. rounding / trailing zero trimming) if there'll be may be any inconvenience, please report and we'll make small amend to enable floating point number comparison in this problem.