Average Error: 5.4 → 4.2
Time: 21.8s
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 -2.0299028491367458 \cdot 10^{+89} \lor \neg \left(t \le 1.1868101734393283 \cdot 10^{-205}\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(z \cdot \left(18.0 \cdot y\right)\right) \cdot x\right) \cdot t - \left(a \cdot 4.0\right) \cdot t\right)\right) - \left(4.0 \cdot x\right) \cdot i\right) - k \cdot \left(j \cdot 27.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot \left(z \cdot t\right) - \left(a \cdot 4.0\right) \cdot t\right)\right) - \left(4.0 \cdot x\right) \cdot i\right) - k \cdot \left(j \cdot 27.0\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 < -2.0299028491367458e+89 or 1.1868101734393283e-205 < t

    1. Initial program 3.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. Using strategy rm
    3. Applied associate-*l*3.5

      \[\leadsto \left(\left(\left(\left(\color{blue}{\left(x \cdot \left(18.0 \cdot y\right)\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\]
    4. Using strategy rm
    5. Applied associate-*l*4.1

      \[\leadsto \left(\left(\left(\color{blue}{\left(x \cdot \left(\left(18.0 \cdot y\right) \cdot z\right)\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 -2.0299028491367458e+89 < t < 1.1868101734393283e-205

    1. Initial program 7.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. Using strategy rm
    3. Applied associate-*l*7.2

      \[\leadsto \left(\left(\left(\left(\color{blue}{\left(x \cdot \left(18.0 \cdot y\right)\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\]
    4. Using strategy rm
    5. Applied associate-*l*4.4

      \[\leadsto \left(\left(\left(\color{blue}{\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot \left(z \cdot t\right)} - \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\]
  3. Recombined 2 regimes into one program.
  4. Final simplification4.2

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

Reproduce

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

sample253.0ms

Algorithm
intervals

simplify126.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune37.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 3.9b

localize54.0ms

Local error

Found 4 expressions with local error:

6.8b
(* (* (* (* x 18.0) y) z) t)
4.4b
(* (* (* x 18.0) y) z)
0.2b
(* (* j 27.0) k)
0.2b
(* (* x 18.0) y)

rewrite43.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

22.0ms
(* (* (* (* x 18.0) y) z) t)
11.0ms
(* (* (* x 18.0) y) z)
4.0ms
(* (* j 27.0) k)

series80.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

38.0ms
(* (* (* (* x 18.0) y) z) t)
18.0ms
(* (* (* x 18.0) y) z)
12.0ms
(* (* j 27.0) k)
11.0ms
(* (* x 18.0) y)

simplify501.0ms

Counts
14 → 48
Calls

14 calls. Slowest were:

231.0ms
(* 18.0 (* t (* x (* z y))))
161.0ms
(* 18.0 (* t (* x (* z y))))
36.0ms
(* 18.0 (* x (* z y)))

prune1.1s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0.3b

localize28.0ms

Local error

Found 4 expressions with local error:

6.8b
(* (* (* x (* 18.0 y)) z) t)
4.4b
(* (* x (* 18.0 y)) z)
0.2b
(* (* j 27.0) k)
0.2b
(* x (* 18.0 y))

rewrite28.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

15.0ms
(* (* (* x (* 18.0 y)) z) t)
6.0ms
(* (* x (* 18.0 y)) z)
4.0ms
(* (* j 27.0) k)

series103.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

48.0ms
(* (* (* x (* 18.0 y)) z) t)
19.0ms
(* x (* 18.0 y))
18.0ms
(* (* x (* 18.0 y)) z)
17.0ms
(* (* j 27.0) k)

simplify618.0ms

Counts
13 → 48
Calls

13 calls. Slowest were:

242.0ms
(* 18.0 (* t (* x (* z y))))
187.0ms
(* 18.0 (* t (* x (* z y))))
48.0ms
(* 18.0 (* x (* z y)))

prune1.2s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.3b

localize30.0ms

Local error

Found 4 expressions with local error:

6.8b
(* (* x (* (* 18.0 y) z)) t)
4.5b
(* x (* (* 18.0 y) z))
0.2b
(* (* j 27.0) k)
0.2b
(* (* 18.0 y) z)

rewrite30.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

14.0ms
(* (* x (* (* 18.0 y) z)) t)
6.0ms
(* x (* (* 18.0 y) z))
4.0ms
(* (* j 27.0) k)

series108.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

37.0ms
(* (* x (* (* 18.0 y) z)) t)
33.0ms
(* x (* (* 18.0 y) z))
19.0ms
(* (* j 27.0) k)
19.0ms
(* (* 18.0 y) z)

simplify540.0ms

Counts
12 → 48
Calls

12 calls. Slowest were:

206.0ms
(* 18.0 (* t (* x (* z y))))
193.0ms
(* 18.0 (* t (* x (* z y))))
48.0ms
(* 18.0 (* x (* z y)))

prune1.6s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.0b

localize28.0ms

Local error

Found 4 expressions with local error:

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

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
4 → 49
Calls

4 calls. Slowest were:

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

series186.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

84.0ms
(* (- (* (* x 18.0) (* y z)) (* a 4.0)) t)
69.0ms
(- (* c b) (+ (* 27.0 (* k j)) (* (* x 4.0) i)))
22.0ms
(* (* x 18.0) (* y z))
10.0ms
(* 27.0 (* k j))

simplify2.5s

Counts
22 → 61
Calls

22 calls. Slowest were:

647.0ms
(* (* (* (* x 18.0) (* x 18.0)) (* x 18.0)) (* (* (* y z) (* y z)) (* y z)))
435.0ms
(* (- (* (* (* x 18.0) (* y z)) (* (* x 18.0) (* y z))) (* (* a 4.0) (* a 4.0))) t)
327.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* t a)))

prune1.3s

Pruning

9 alts after pruning (7 fresh and 2 done)

Merged error: 0.0b

regimes2.5s

Accuracy

33.3% (3.8b remaining)

Error of 4.2b against oracle of 0.4b and baseline of 6.1b

bsearch976.0ms

end0.0ms

sample6.1s

Algorithm
intervals