Average Error: 5.4 → 1.7
Time: 22.1s
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 -1.891331928653951 \cdot 10^{-10} \lor \neg \left(t \le 464.1224760310541\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z\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(\left(y \cdot \left(t \cdot z\right)\right) \cdot 18.0\right) \cdot x - \left(a \cdot 4.0\right) \cdot t\right)\right) - \left(4.0 \cdot x\right) \cdot i\right) - \left(k \cdot 27.0\right) \cdot j\\ \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 < -1.891331928653951e-10 or 464.1224760310541 < t

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

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

    if -1.891331928653951e-10 < t < 464.1224760310541

    1. Initial program 7.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*4.2

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.891331928653951 \cdot 10^{-10} \lor \neg \left(t \le 464.1224760310541\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z\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(\left(y \cdot \left(t \cdot z\right)\right) \cdot 18.0\right) \cdot x - \left(a \cdot 4.0\right) \cdot t\right)\right) - \left(4.0 \cdot x\right) \cdot i\right) - \left(k \cdot 27.0\right) \cdot j\\ \end{array}\]

Reproduce

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

start226.0ms

Algorithm
intervals

setup172.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 3.6b

localize94.0ms

Local error

Found 4 expressions with local error:

7.1b
(* (* (* (* 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)

rewrite34.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

13.0ms
(* (* (* (* x 18.0) y) z) t)
12.0ms
(* (* (* x 18.0) y) z)
4.0ms
(* (* j 27.0) k)

series118.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

49.0ms
(* (* (* (* x 18.0) y) z) t)
29.0ms
(* (* (* x 18.0) y) z)
21.0ms
(* (* j 27.0) k)
19.0ms
(* (* x 18.0) y)

simplify419.0ms

Counts
14 → 48
Calls

14 calls. Slowest were:

155.0ms
(* 18.0 (* t (* x (* z y))))
147.0ms
(* 18.0 (* t (* x (* z y))))
26.0ms
(* 18.0 (* x (* z y)))

prune1.3s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.5b

localize35.0ms

Local error

Found 4 expressions with local error:

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

rewrite40.0ms

Algorithm
rewrite-expression-head
Counts
4 → 43
Calls

4 calls. Slowest were:

17.0ms
(- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t))
14.0ms
(* (* (* x 18.0) y) (* z t))
4.0ms
(* (* x 18.0) y)

series179.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

110.0ms
(- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t))
36.0ms
(* (* (* x 18.0) y) (* z t))
22.0ms
(* (* x 18.0) y)
11.0ms
(* (* j 27.0) k)

simplify1.4s

Counts
17 → 55
Calls

17 calls. Slowest were:

272.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))
191.0ms
(* 18.0 (* t (* x (* z y))))
189.0ms
(/ (exp (* (* (* x 18.0) y) (* z t))) (exp (* (* a 4.0) t)))

prune1.1s

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 0.0b

localize27.0ms

Local error

Found 4 expressions with local error:

5.9b
(* y (* z t))
5.3b
(* (* x 18.0) (* y (* z t)))
0.2b
(* (* j 27.0) k)
0.0b
(- (* (* x 18.0) (* y (* z t))) (* (* a 4.0) t))

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 43
Calls

4 calls. Slowest were:

10.0ms
(- (* (* x 18.0) (* y (* z t))) (* (* a 4.0) t))
7.0ms
(* (* x 18.0) (* y (* z t)))
3.0ms
(* (* j 27.0) k)

series188.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

98.0ms
(- (* (* x 18.0) (* y (* z t))) (* (* a 4.0) t))
45.0ms
(* (* x 18.0) (* y (* z t)))
28.0ms
(* y (* z t))
18.0ms
(* (* j 27.0) k)

simplify1.2s

Counts
17 → 55
Calls

17 calls. Slowest were:

215.0ms
(/ (exp (* (* x 18.0) (* y (* z t)))) (exp (* (* a 4.0) t)))
170.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))
153.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))

prune1.3s

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 0.0b

localize15.0ms

Local error

Found 4 expressions with local error:

5.9b
(* y (* z t))
5.1b
(* x (* 18.0 (* y (* z t))))
0.3b
(* 18.0 (* y (* z t)))
0.2b
(* (* j 27.0) k)

rewrite19.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

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

series103.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

47.0ms
(* x (* 18.0 (* y (* z t))))
21.0ms
(* y (* z t))
17.0ms
(* 18.0 (* y (* z t)))
17.0ms
(* (* j 27.0) k)

simplify431.0ms

Counts
14 → 48
Calls

14 calls. Slowest were:

154.0ms
(* 18.0 (* t (* x (* z y))))
140.0ms
(* 18.0 (* t (* x (* z y))))
46.0ms
(* 18.0 (* t (* z y)))

prune1.2s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.0b

regimes2.7s

Accuracy

73.9% (1.3b remaining)

Error of 1.7b against oracle of 0.4b and baseline of 5.3b

bsearch785.0ms