Average Error: 5.5 → 3.7
Time: 22.4s
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}\;z \le -5.595282481905591 \cdot 10^{+24} \lor \neg \left(z \le 7.074420817155232 \cdot 10^{+69}\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(\sqrt[3]{t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right)} \cdot \left(\sqrt[3]{t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right)} \cdot \sqrt[3]{t \cdot \left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right)}\right) - t \cdot \left(4.0 \cdot a\right)\right)\right) - i \cdot \left(4.0 \cdot x\right)\right) - \left(k \cdot j\right) \cdot 27.0\\ \mathbf{else}:\\ \;\;\;\;(t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18.0\right)\right) + \left((\left(4.0 \cdot a\right) \cdot \left(-t\right) + \left(b \cdot c\right))_*\right))_* - (j \cdot \left(k \cdot 27.0\right) + \left(i \cdot \left(4.0 \cdot x\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

Derivation

  1. Split input into 2 regimes
  2. if z < -5.595282481905591e+24 or 7.074420817155232e+69 < z

    1. Initial program 7.1

      \[\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. Taylor expanded around 0 7.0

      \[\leadsto \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) - \color{blue}{27.0 \cdot \left(j \cdot k\right)}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt7.2

      \[\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) - 27.0 \cdot \left(j \cdot k\right)\]

    if -5.595282481905591e+24 < z < 7.074420817155232e+69

    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. Simplified1.7

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

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

Reproduce

herbie shell --seed 2019005 +o rules:numerics
(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: 21.3s)Debug log

sample254.0ms

Algorithm
intervals

simplify149.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

149.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: 2.4b

localize49.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)

rewrite50.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

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

series111.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify518.0ms

Counts
14 → 56
Calls

14 calls. Slowest were:

185.0ms
(* 18.0 (* t (* x (* z y))))
156.0ms
(* 18.0 (* t (* x (* z y))))
44.0ms
(* 18.0 (* x (* z y)))

prune982.0ms

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0.7b

localize9.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
(* 27.0 (* j k))
0.2b
(* (* x 18.0) y)

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

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

series82.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

35.0ms
(* (* (* (* x 18.0) y) z) t)
25.0ms
(* (* (* x 18.0) y) z)
11.0ms
(* (* x 18.0) y)
11.0ms
(* 27.0 (* j k))

simplify431.0ms

Counts
14 → 56
Calls

14 calls. Slowest were:

137.0ms
(* 18.0 (* t (* x (* z y))))
136.0ms
(* 18.0 (* t (* x (* z y))))
42.0ms
(* 18.0 (* x (* z y)))

prune1.2s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.7b

localize23.0ms

Local error

Found 4 expressions with local error:

19.7b
(cbrt (* (* (* (* x 18.0) y) z) t))
19.7b
(cbrt (* (* (* (* x 18.0) y) z) t))
19.7b
(cbrt (* (* (* (* x 18.0) y) z) t))
4.9b
(* (* (* (* x 18.0) y) z) t)

rewrite66.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

21.0ms
(* (* (* (* x 18.0) y) z) t)
17.0ms
(cbrt (* (* (* (* x 18.0) y) z) t))
16.0ms
(cbrt (* (* (* (* x 18.0) y) z) t))

series452.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

151.0ms
(cbrt (* (* (* (* x 18.0) y) z) t))
133.0ms
(cbrt (* (* (* (* x 18.0) y) z) t))
131.0ms
(cbrt (* (* (* (* x 18.0) y) z) t))
36.0ms
(* (* (* (* x 18.0) y) z) t)

simplify2.9s

Counts
16 → 56
Calls

16 calls. Slowest were:

433.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (+ (log (/ 1 t)) (log (/ 1 y))))))))
388.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (+ (log (/ 1 t)) (log (/ 1 y))))))))
385.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (+ (log (/ 1 t)) (log (/ 1 y))))))))

prune1.6s

Pruning

5 alts after pruning (4 fresh and 1 done)

Merged error: 0.7b

localize30.0ms

Local error

Found 4 expressions with local error:

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

rewrite28.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

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

series425.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

137.0ms
(cbrt (* 27.0 (* j k)))
130.0ms
(cbrt (* 27.0 (* j k)))
122.0ms
(cbrt (* 27.0 (* j k)))
36.0ms
(* (* (* (* x 18.0) y) z) t)

simplify1.4s

Counts
16 → 56
Calls

16 calls. Slowest were:

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

prune1.1s

Pruning

5 alts after pruning (3 fresh and 2 done)

Merged error: 0.7b

regimes1.6s

Accuracy

42.8% (2.5b remaining)

Error of 3.7b against oracle of 1.2b and baseline of 5.6b

bsearch972.0ms

end0.0ms

sample6.9s

Algorithm
intervals