evaluate skcms_PolyTF carefully

Evaluating the non-linear segment at x=1.0f can
result in x = 0.99999994f, 1.0f minus one ulp.

Rewriting the algebra to A(x^3-1) + B(x^2-1) + 1
means that if x=1.0f, we'll definitely get out 1.0f.

Also nice, x^2 is now a common subexpression.

Change-Id: I3503b1241798bf72ba2ac6770c59d3d14567d3d8
Reviewed-on: https://skia-review.googlesource.com/123681
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2 files changed