Average Error: 6.0 → 1.7
Time: 2.9m
Precision: 64
Internal Precision: 384
\[2.0 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)\]
\[2.0 \cdot \left(\left(t \cdot z + y \cdot x\right) - \left(i \cdot c\right) \cdot \left(b \cdot c + a\right)\right)\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Target

Original6.0
Target1.7
Herbie1.7
\[2.0 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)\]

Derivation

  1. Initial program 6.0

    \[2.0 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)\]
  2. Taylor expanded around inf 10.5

    \[\leadsto 2.0 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot \left(a \cdot i\right) + b \cdot \left({c}^{2} \cdot i\right)\right)}\right)\]
  3. Applied simplify1.7

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

Runtime

Time bar (total: 2.9m)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"

  :herbie-target
  (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))

  (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))