Average Error: 5.5 → 4.6
Time: 20.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}\;x \le -3.3723825016084254 \cdot 10^{-11}:\\ \;\;\;\;\left(c \cdot b - \left(\left(k \cdot j\right) \cdot 27.0 + i \cdot \left(4.0 \cdot x\right)\right)\right) + \left(\left(x \cdot 18.0\right) \cdot \left(y \cdot z\right) - a \cdot 4.0\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sqrt[3]{t \cdot \left(z \cdot \left(\left(x \cdot 18.0\right) \cdot y\right)\right)} \cdot \left(\sqrt[3]{t \cdot \left(z \cdot \left(\left(x \cdot 18.0\right) \cdot y\right)\right)} \cdot \sqrt[3]{t \cdot \left(z \cdot \left(\left(x \cdot 18.0\right) \cdot y\right)\right)}\right) - \left(a \cdot 4.0\right) \cdot t\right) + c \cdot b\right) - i \cdot \left(4.0 \cdot x\right)\right) - k \cdot \left(27.0 \cdot j\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 x < -3.3723825016084254e-11

    1. Initial program 12.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. Simplified6.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}\]

    if -3.3723825016084254e-11 < x

    1. Initial program 4.0

      \[\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 add-cube-cbrt4.1

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

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

Reproduce

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

sample266.0ms

Algorithm
intervals

simplify133.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune27.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 2.4b

localize85.0ms

Local error

Found 4 expressions with local error:

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

rewrite39.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

27.0ms
(* (* (* (* x 18.0) y) z) t)
6.0ms
(* (* (* x 18.0) y) z)
2.0ms
(* (* x 18.0) y)

series107.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

45.0ms
(* (* (* (* x 18.0) y) z) t)
32.0ms
(* (* (* x 18.0) y) z)
19.0ms
(* (* j 27.0) k)
12.0ms
(* (* x 18.0) y)

simplify485.0ms

Counts
14 → 48
Calls

14 calls. Slowest were:

188.0ms
(* 18.0 (* t (* x (* z y))))
184.0ms
(* 18.0 (* t (* x (* z y))))
34.0ms
(* 18.0 (* x (* z y)))

prune1.0s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0.7b

localize18.0ms

Local error

Found 4 expressions with local error:

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

rewrite45.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

26.0ms
(* (* (* (* x 18.0) y) z) t)
12.0ms
(* (* (* x 18.0) y) z)
5.0ms
(* (* x 18.0) y)

series93.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify543.0ms

Counts
14 → 48
Calls

14 calls. Slowest were:

208.0ms
(* 18.0 (* t (* x (* z y))))
207.0ms
(* 18.0 (* t (* x (* z y))))
23.0ms
(* 18.0 (* x (* z y)))

prune1.0s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.7b

localize23.0ms

Local error

Found 4 expressions with local error:

9.2b
(cbrt (* j (* 27.0 k)))
9.2b
(cbrt (* j (* 27.0 k)))
9.2b
(cbrt (* j (* 27.0 k)))
4.9b
(* (* (* (* x 18.0) y) z) t)

rewrite30.0ms

Algorithm
rewrite-expression-head
Counts
4 → 36
Calls

4 calls. Slowest were:

26.0ms
(* (* (* (* x 18.0) y) z) t)
1.0ms
(cbrt (* j (* 27.0 k)))
1.0ms
(cbrt (* j (* 27.0 k)))

series404.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

135.0ms
(cbrt (* j (* 27.0 k)))
110.0ms
(cbrt (* j (* 27.0 k)))
108.0ms
(cbrt (* j (* 27.0 k)))
50.0ms
(* (* (* (* x 18.0) y) z) t)

simplify1.4s

Counts
16 → 48
Calls

16 calls. Slowest were:

241.0ms
(* 18.0 (* t (* x (* z y))))
201.0ms
(* 18.0 (* t (* x (* z y))))
163.0ms
(* (cbrt 27.0) (exp (* -1/3 (+ (log (/ 1 k)) (log (/ 1 j))))))

prune1.6s

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 0.7b

localize23.0ms

Local error

Found 4 expressions with local error:

9.2b
(cbrt (* j (* 27.0 k)))
9.2b
(cbrt (* j (* 27.0 k)))
4.9b
(* (* (* (* x 18.0) y) z) t)
4.5b
(* (* (* x 18.0) y) z)

rewrite22.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)
1.0ms
(cbrt (* j (* 27.0 k)))

series336.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

137.0ms
(cbrt (* j (* 27.0 k)))
135.0ms
(cbrt (* j (* 27.0 k)))
34.0ms
(* (* (* (* x 18.0) y) z) t)
30.0ms
(* (* (* x 18.0) y) z)

simplify1.0s

Counts
16 → 48
Calls

16 calls. Slowest were:

205.0ms
(* 18.0 (* t (* x (* z y))))
134.0ms
(* 18.0 (* t (* x (* z y))))
126.0ms
(* (cbrt 27.0) (exp (* -1/3 (+ (log (/ 1 k)) (log (/ 1 j))))))

prune1.4s

Pruning

6 alts after pruning (4 fresh and 2 done)

Merged error: 0.7b

regimes1.9s

Accuracy

25.7% (3.4b remaining)

Error of 4.6b against oracle of 1.2b and baseline of 5.8b

bsearch503.0ms

end0.0ms

sample6.4s

Algorithm
intervals