Average Error: 1.7 → 0.3
Time: 59.3s
Precision: 64
Internal Precision: 640
\[x - \frac{y - z}{\frac{\left(t - z\right) + 1.0}{a}}\]
\[x - \frac{y - z}{\left(t - z\right) + 1.0} \cdot a\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Target

Original1.7
Target0.3
Herbie0.3
\[x - \frac{y - z}{\left(t - z\right) + 1.0} \cdot a\]

Derivation

  1. Initial program 1.7

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1.0}{a}}\]
  2. Using strategy rm
  3. Applied associate-/r/0.3

    \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1.0} \cdot a}\]
  4. Removed slow pow expressions.

Runtime

Time bar (total: 59.3s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"

  :herbie-target
  (- x (* (/ (- y z) (+ (- t z) 1.0)) a))

  (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))