Average Error: 5.4 → 5.0
Time: 27.5s
Precision: 64
Internal Precision: 128
\[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
\[\begin{array}{l} \mathbf{if}\;t \le -4.100370728289162 \cdot 10^{-183} \lor \neg \left(t \le 1.2277234601236005 \cdot 10^{-299}\right):\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + j \cdot \left(k \cdot 27.0\right)\right)\right) + t \cdot \left(\left(\left(x \cdot z\right) \cdot y\right) \cdot 18.0 - a \cdot 4.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \cdot 4.0\right) + \left(c \cdot b - \left(27.0 \cdot \left(j \cdot k\right) + i \cdot \left(x \cdot 4.0\right)\right)\right)\\ \end{array}\]

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

Bits error versus j

Bits error versus k

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if t < -4.100370728289162e-183 or 1.2277234601236005e-299 < t

    1. Initial program 4.7

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
    2. Simplified5.2

      \[\leadsto \color{blue}{\left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + \left(\left(x \cdot 18.0\right) \cdot \left(y \cdot z\right) - a \cdot 4.0\right) \cdot t}\]
    3. Taylor expanded around inf 5.2

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + \color{blue}{\left(18.0 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right) - 4.0 \cdot \left(t \cdot a\right)\right)}\]
    4. Simplified4.9

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + \color{blue}{t \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot 18.0\right) - 4.0 \cdot a\right)}\]
    5. Using strategy rm
    6. Applied associate-*r*4.8

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + t \cdot \left(\color{blue}{\left(\left(x \cdot z\right) \cdot y\right) \cdot 18.0} - 4.0 \cdot a\right)\]
    7. Using strategy rm
    8. Applied associate-*r*4.9

      \[\leadsto \left(c \cdot b - \left(\color{blue}{\left(27.0 \cdot k\right) \cdot j} + \left(x \cdot 4.0\right) \cdot i\right)\right) + t \cdot \left(\left(\left(x \cdot z\right) \cdot y\right) \cdot 18.0 - 4.0 \cdot a\right)\]

    if -4.100370728289162e-183 < t < 1.2277234601236005e-299

    1. Initial program 9.2

      \[\left(\left(\left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \left(j \cdot 27.0\right) \cdot k\]
    2. Simplified10.9

      \[\leadsto \color{blue}{\left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + \left(\left(x \cdot 18.0\right) \cdot \left(y \cdot z\right) - a \cdot 4.0\right) \cdot t}\]
    3. Taylor expanded around inf 10.8

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + \color{blue}{\left(18.0 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right) - 4.0 \cdot \left(t \cdot a\right)\right)}\]
    4. Simplified9.5

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + \color{blue}{t \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot 18.0\right) - 4.0 \cdot a\right)}\]
    5. Using strategy rm
    6. Applied associate-*r*9.5

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + t \cdot \left(\color{blue}{\left(\left(x \cdot z\right) \cdot y\right) \cdot 18.0} - 4.0 \cdot a\right)\]
    7. Taylor expanded around 0 5.7

      \[\leadsto \left(c \cdot b - \left(27.0 \cdot \left(k \cdot j\right) + \left(x \cdot 4.0\right) \cdot i\right)\right) + t \cdot \left(\color{blue}{0} - 4.0 \cdot a\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification5.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -4.100370728289162 \cdot 10^{-183} \lor \neg \left(t \le 1.2277234601236005 \cdot 10^{-299}\right):\\ \;\;\;\;\left(c \cdot b - \left(i \cdot \left(x \cdot 4.0\right) + j \cdot \left(k \cdot 27.0\right)\right)\right) + t \cdot \left(\left(\left(x \cdot z\right) \cdot y\right) \cdot 18.0 - a \cdot 4.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \cdot 4.0\right) + \left(c \cdot b - \left(27.0 \cdot \left(j \cdot k\right) + i \cdot \left(x \cdot 4.0\right)\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019007 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1"
  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))

Details

Time bar (total: 25.8s)Debug log

sample332.0ms

Algorithm
intervals

simplify118.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

118.0ms
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k))

prune29.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 3.6b

localize52.0ms

Local error

Found 4 expressions with local error:

4.5b
(* (* x 18.0) (* y z))
3.6b
(* (- (* (* x 18.0) (* y z)) (* a 4.0)) t)
0.3b
(* 27.0 (* k j))
0.0b
(- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))

rewrite34.0ms

Algorithm
rewrite-expression-head
Counts
4 → 49
Calls

4 calls. Slowest were:

25.0ms
(* (- (* (* x 18.0) (* y z)) (* a 4.0)) t)
4.0ms
(- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))
3.0ms
(* (* x 18.0) (* y z))

series615.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

420.0ms
(* 27.0 (* k j))
89.0ms
(* (- (* (* x 18.0) (* y z)) (* a 4.0)) t)
87.0ms
(- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))
19.0ms
(* (* x 18.0) (* y z))

simplify2.4s

Counts
22 → 61
Calls

22 calls. Slowest were:

628.0ms
(* (* (* (* x 18.0) (* x 18.0)) (* x 18.0)) (* (* (* y z) (* y z)) (* y z)))
428.0ms
(* (- (* (* (* x 18.0) (* y z)) (* (* x 18.0) (* y z))) (* (* a 4.0) (* a 4.0))) t)
320.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* t a)))

prune1.5s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 2.3b

localize21.0ms

Local error

Found 4 expressions with local error:

4.4b
(* (* x z) (* y 18.0))
3.6b
(* t (- (* (* x z) (* y 18.0)) (* 4.0 a)))
0.3b
(* 27.0 (* k j))
0.0b
(- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))

rewrite35.0ms

Algorithm
rewrite-expression-head
Counts
4 → 53
Calls

4 calls. Slowest were:

19.0ms
(* t (- (* (* x z) (* y 18.0)) (* 4.0 a)))
8.0ms
(- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))
5.0ms
(* (* x z) (* y 18.0))

series257.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

112.0ms
(- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))
96.0ms
(* t (- (* (* x z) (* y 18.0)) (* 4.0 a)))
31.0ms
(* (* x z) (* y 18.0))
18.0ms
(* 27.0 (* k j))

simplify2.6s

Counts
27 → 65
Calls

27 calls. Slowest were:

667.0ms
(* (* (* (* x z) (* x z)) (* x z)) (* (* (* y 18.0) (* y 18.0)) (* y 18.0)))
362.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))
304.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))

prune1.5s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 2.3b

localize14.0ms

Local error

Found 4 expressions with local error:

4.3b
(* (* x z) y)
3.6b
(* t (- (* (* (* x z) y) 18.0) (* 4.0 a)))
0.3b
(* 27.0 (* k j))
0.2b
(* (* (* x z) y) 18.0)

rewrite35.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

19.0ms
(* t (- (* (* (* x z) y) 18.0) (* 4.0 a)))
11.0ms
(* (* (* x z) y) 18.0)
2.0ms
(* (* x z) y)

series155.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

97.0ms
(* t (- (* (* (* x z) y) 18.0) (* 4.0 a)))
28.0ms
(* (* x z) y)
19.0ms
(* (* (* x z) y) 18.0)
11.0ms
(* 27.0 (* k j))

simplify1.6s

Counts
22 → 56
Calls

22 calls. Slowest were:

477.0ms
(+ (* (* (* (* x z) y) 18.0) (* (* (* x z) y) 18.0)) (+ (* (* 4.0 a) (* 4.0 a)) (* (* (* (* x z) y) 18.0) (* 4.0 a))))
353.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))
344.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))

prune1.2s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 2.3b

localize28.0ms

Local error

Found 4 expressions with local error:

4.3b
(* (* x z) y)
3.6b
(* t (- (* (* (* x z) y) 18.0) (* 4.0 a)))
0.2b
(* (* 27.0 k) j)
0.2b
(* (* (* x z) y) 18.0)

rewrite60.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

39.0ms
(* t (- (* (* (* x z) y) 18.0) (* 4.0 a)))
11.0ms
(* (* (* x z) y) 18.0)
4.0ms
(* (* x z) y)

series159.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

101.0ms
(* t (- (* (* (* x z) y) 18.0) (* 4.0 a)))
20.0ms
(* (* x z) y)
19.0ms
(* (* (* x z) y) 18.0)
18.0ms
(* (* 27.0 k) j)

simplify1.6s

Counts
22 → 56
Calls

22 calls. Slowest were:

452.0ms
(+ (* (* (* (* x z) y) 18.0) (* (* (* x z) y) 18.0)) (+ (* (* 4.0 a) (* 4.0 a)) (* (* (* (* x z) y) 18.0) (* 4.0 a))))
368.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))
346.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))

prune1.2s

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 2.3b

regimes2.6s

Accuracy

17.1% (2.8b remaining)

Error of 5.0b against oracle of 2.1b and baseline of 5.6b

bsearch448.0ms

end0.0ms

sample7.2s

Algorithm
intervals