Average Error: 5.3 → 4.0
Time: 46.7s
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}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i = -\infty:\\ \;\;\;\;c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(j \cdot k\right) \cdot 27.0\right)\\ \mathbf{elif}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i \le 1.892427743955644 \cdot 10^{+293}:\\ \;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - k \cdot \left(j \cdot 27.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \left(t \cdot \left(z \cdot 18.0\right)\right) - \left(x \cdot i + a \cdot t\right) \cdot 4.0\\ \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 3 regimes
  2. if (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) < -inf.0

    1. Initial program 60.5

      \[\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. Simplified39.4

      \[\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 0 36.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}{0}\]

    if -inf.0 < (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) < 1.892427743955644e+293

    1. Initial program 0.4

      \[\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\]

    if 1.892427743955644e+293 < (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i))

    1. Initial program 41.3

      \[\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. Simplified27.0

      \[\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 37.4

      \[\leadsto \color{blue}{18.0 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right) - \left(4.0 \cdot \left(t \cdot a\right) + 4.0 \cdot \left(i \cdot x\right)\right)}\]
    4. Simplified35.8

      \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \left(\left(z \cdot 18.0\right) \cdot t\right) - 4.0 \cdot \left(a \cdot t + x \cdot i\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification4.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i = -\infty:\\ \;\;\;\;c \cdot b - \left(\left(x \cdot 4.0\right) \cdot i + \left(j \cdot k\right) \cdot 27.0\right)\\ \mathbf{elif}\;\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i \le 1.892427743955644 \cdot 10^{+293}:\\ \;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - \left(x \cdot 4.0\right) \cdot i\right) - k \cdot \left(j \cdot 27.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \left(t \cdot \left(z \cdot 18.0\right)\right) - \left(x \cdot i + a \cdot t\right) \cdot 4.0\\ \end{array}\]

Reproduce

herbie shell --seed 2019002 
(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: 45.5s)Debug log

sample162.0ms

Algorithm
intervals

simplify82.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune28.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 4.5b

localize40.0ms

Local error

Found 4 expressions with local error:

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

rewrite45.0ms

Algorithm
rewrite-expression-head
Counts
4 → 55
Calls

4 calls. Slowest were:

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

series11.9s

Counts
4 → 12
Calls

4 calls. Slowest were:

11.8s
(+ (- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i))) (* (- (* (* x 18.0) (* y z)) (* a 4.0)) t))
62.0ms
(* (- (* (* x 18.0) (* y z)) (* a 4.0)) t)
18.0ms
(* (* x 18.0) (* y z))
10.0ms
(* 27.0 (* k j))

simplify5.1s

Counts
33 → 67
Calls

33 calls. Slowest were:

576.0ms
(* (exp (- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))) (exp (* (- (* (* x 18.0) (* y z)) (* a 4.0)) t)))
537.0ms
(* (* (* (* x 18.0) (* x 18.0)) (* x 18.0)) (* (* (* y z) (* y z)) (* y z)))
384.0ms
(+ (* (- (* (* c b) (* c b)) (* (+ (* 27.0 (* k j)) (* (* x 4.0) i)) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))) (+ (* (* (* x 18.0) (* y z)) (* (* x 18.0) (* y z))) (+ (* (* a 4.0) (* a 4.0)) (* (* (* x 18.0) (* y z)) (* a 4.0))))) (* (+ (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i))) (* (- (pow (* (* x 18.0) (* y z)) 3) (pow (* a 4.0) 3)) t)))

prune1.3s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0.5b

localize24.0ms

Local error

Found 4 expressions with local error:

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

rewrite59.0ms

Algorithm
rewrite-expression-head
Counts
4 → 55
Calls

4 calls. Slowest were:

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

series11.7s

Counts
4 → 12
Calls

4 calls. Slowest were:

11.6s
(+ (- (* c b) (+ (* (* 27.0 k) j) (* (* x 4.0) i))) (* (- (* (* x 18.0) (* y z)) (* a 4.0)) t))
78.0ms
(* (- (* (* x 18.0) (* y z)) (* a 4.0)) t)
17.0ms
(* (* x 18.0) (* y z))
14.0ms
(* (* 27.0 k) j)

simplify4.5s

Counts
33 → 67
Calls

33 calls. Slowest were:

635.0ms
(* (* (* (* x 18.0) (* x 18.0)) (* x 18.0)) (* (* (* y z) (* y z)) (* y z)))
378.0ms
(+ (* (- (* (* c b) (* c b)) (* (+ (* (* 27.0 k) j) (* (* x 4.0) i)) (+ (* (* 27.0 k) j) (* (* x 4.0) i)))) (+ (* (* (* x 18.0) (* y z)) (* (* x 18.0) (* y z))) (+ (* (* a 4.0) (* a 4.0)) (* (* (* x 18.0) (* y z)) (* a 4.0))))) (* (+ (* c b) (+ (* (* 27.0 k) j) (* (* x 4.0) i))) (* (- (pow (* (* x 18.0) (* y z)) 3) (pow (* a 4.0) 3)) t)))
347.0ms
(* (+ (* (* c b) (* c b)) (+ (* (+ (* (* 27.0 k) j) (* (* x 4.0) i)) (+ (* (* 27.0 k) j) (* (* x 4.0) i))) (* (* c b) (+ (* (* 27.0 k) j) (* (* x 4.0) i))))) (+ (* (* (* x 18.0) (* y z)) (* (* x 18.0) (* y z))) (+ (* (* a 4.0) (* a 4.0)) (* (* (* x 18.0) (* y z)) (* a 4.0)))))

prune1.1s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.5b

localize16.0ms

Local error

Found 4 expressions with local error:

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

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 40
Calls

4 calls. Slowest were:

9.0ms
(* (- (* x (* 18.0 (* y z))) (* a 4.0)) t)
2.0ms
(* x (* 18.0 (* y z)))
2.0ms
(* (* 27.0 k) j)

series101.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify877.0ms

Counts
17 → 52
Calls

17 calls. Slowest were:

271.0ms
(* (- (* (* x (* 18.0 (* y z))) (* x (* 18.0 (* y z)))) (* (* a 4.0) (* a 4.0))) t)
193.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* t a)))
192.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* t a)))

prune799.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.5b

localize29.0ms

Local error

Found 4 expressions with local error:

6.8b
(* (* (* (* x 18.0) y) z) t)
5.7b
(* (* (* x 18.0) y) z)
0.5b
(* (* j 27.0) k)
0.2b
(* (* a 4.0) t)

rewrite26.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

13.0ms
(* (* (* (* x 18.0) y) z) t)
8.0ms
(* (* (* x 18.0) y) z)
2.0ms
(* (* j 27.0) k)

series69.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

29.0ms
(* (* (* (* x 18.0) y) z) t)
17.0ms
(* (* (* x 18.0) y) z)
11.0ms
(* (* a 4.0) t)
11.0ms
(* (* j 27.0) k)

simplify404.0ms

Counts
14 → 48
Calls

14 calls. Slowest were:

168.0ms
(* 18.0 (* t (* x (* z y))))
139.0ms
(* 18.0 (* t (* x (* z y))))
24.0ms
(* 18.0 (* x (* z y)))

prune719.0ms

Pruning

8 alts after pruning (5 fresh and 3 done)

Merged error: 0.5b

regimes1.9s

Accuracy

35.3% (3.3b remaining)

Error of 4.0b against oracle of 0.7b and baseline of 5.8b

bsearch10.0ms

end0.0ms

sample4.5s

Algorithm
intervals