Average Error: 5.5 → 3.8
Time: 21.3s
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 -6.645199625663559 \cdot 10^{-140}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\sqrt[3]{\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z} \cdot \left(\sqrt[3]{\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z} \cdot \sqrt[3]{\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z}\right)\right) \cdot t - t \cdot \left(4.0 \cdot a\right)\right)\right) - i \cdot \left(4.0 \cdot x\right)\right) - k \cdot \left(j \cdot 27.0\right)\\ \mathbf{elif}\;t \le -3.512484448389878 \cdot 10^{-268}:\\ \;\;\;\;\left(\left(b \cdot c + \left(-t\right) \cdot \left(4.0 \cdot a\right)\right) - i \cdot \left(4.0 \cdot x\right)\right) - j \cdot \left(27.0 \cdot k\right)\\ \mathbf{elif}\;t \le 2.6133038325664402 \cdot 10^{-115}:\\ \;\;\;\;\left(\left(\left(\left(t \cdot z\right) \cdot \left(\left(x \cdot 18.0\right) \cdot y\right) - t \cdot \left(4.0 \cdot a\right)\right) + b \cdot c\right) - i \cdot \left(4.0 \cdot x\right)\right) - j \cdot \left(27.0 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(4.0 \cdot a\right)\right)\right) - i \cdot \left(4.0 \cdot x\right)\right) - \sqrt[3]{k \cdot \left(j \cdot 27.0\right)} \cdot \left(\sqrt[3]{k \cdot \left(j \cdot 27.0\right)} \cdot \sqrt[3]{k \cdot \left(j \cdot 27.0\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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if t < -6.645199625663559e-140

    1. Initial program 3.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. Using strategy rm
    3. Applied add-cube-cbrt3.2

      \[\leadsto \left(\left(\left(\color{blue}{\left(\left(\sqrt[3]{\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z} \cdot \sqrt[3]{\left(\left(x \cdot 18.0\right) \cdot y\right) \cdot z}\right) \cdot \sqrt[3]{\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 -6.645199625663559e-140 < t < -3.512484448389878e-268

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

      \[\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}{j \cdot \left(27.0 \cdot k\right)}\]
    4. Taylor expanded around 0 5.5

      \[\leadsto \left(\left(\left(\color{blue}{0} - \left(a \cdot 4.0\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - j \cdot \left(27.0 \cdot k\right)\]

    if -3.512484448389878e-268 < t < 2.6133038325664402e-115

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

      \[\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}{j \cdot \left(27.0 \cdot k\right)}\]
    4. Using strategy rm
    5. Applied associate-*l*4.5

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

    if 2.6133038325664402e-115 < t

    1. Initial program 3.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-cbrt3.2

      \[\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}{\left(\sqrt[3]{\left(j \cdot 27.0\right) \cdot k} \cdot \sqrt[3]{\left(j \cdot 27.0\right) \cdot k}\right) \cdot \sqrt[3]{\left(j \cdot 27.0\right) \cdot k}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification3.8

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

Reproduce

herbie shell --seed 2019016 
(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

sample301.0ms

Algorithm
intervals
Results
525×(pre true 80)
525×(body real 80)

simplify137.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
136.0ms
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k))

prune49.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 3.8b

localize67.0ms

Local error

Found 4 expressions with local error:

7.6b
(* (* (* x 18.0) y) z)
6.4b
(* (* (* (* x 18.0) y) z) t)
0.3b
(* (* j 27.0) k)
0.2b
(* (* x 18.0) y)

rewrite28.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
add-cube-cbrt
*-commutative
add-exp-log
associate-*l*
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
Counts
4 → 36
Calls
4 calls:
Slowest
12.0ms
(* (* (* (* x 18.0) y) z) t)
11.0ms
(* (* (* x 18.0) y) z)
2.0ms
(* (* x 18.0) y)
2.0ms
(* (* j 27.0) k)

series80.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
31.0ms
(* (* (* (* x 18.0) y) z) t)
18.0ms
(* (* x 18.0) y)
18.0ms
(* (* (* x 18.0) y) z)
13.0ms
(* (* j 27.0) k)

simplify510.0ms

Counts
14 → 48
Calls
14 calls:
Slowest
184.0ms
(* 18.0 (* t (* x (* z y))))
180.0ms
(* 18.0 (* t (* x (* z y))))
46.0ms
(* 18.0 (* x (* z y)))
32.0ms
(* 18.0 (* x (* z y)))
13.0ms
(* 27.0 (* j k))

prune1.0s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0.1b

localize26.0ms

Local error

Found 4 expressions with local error:

17.1b
(cbrt (* (* (* x 18.0) y) z))
17.1b
(cbrt (* (* (* x 18.0) y) z))
17.1b
(cbrt (* (* (* x 18.0) y) z))
7.6b
(* (* (* x 18.0) y) z)

rewrite29.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
pow1/3
cbrt-prod
*-commutative
associate-*l*
Counts
4 → 36
Calls
4 calls:
Slowest
10.0ms
(* (* (* x 18.0) y) z)
6.0ms
(cbrt (* (* (* x 18.0) y) z))
6.0ms
(cbrt (* (* (* x 18.0) y) z))
6.0ms
(cbrt (* (* (* x 18.0) y) z))

series411.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
141.0ms
(cbrt (* (* (* x 18.0) y) z))
130.0ms
(cbrt (* (* (* x 18.0) y) z))
110.0ms
(cbrt (* (* (* x 18.0) y) z))
30.0ms
(* (* (* x 18.0) y) z)

simplify1.1s

Counts
16 → 48
Calls
16 calls:
Slowest
153.0ms
(* (cbrt -18.0) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
143.0ms
(* (cbrt -18.0) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
130.0ms
(* (cbrt -18.0) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
102.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (log (/ 1 y)))))))
102.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (log (/ 1 y)))))))

prune1.3s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.1b

localize13.0ms

Local error

Found 4 expressions with local error:

8.5b
(cbrt (* (* j 27.0) k))
8.5b
(cbrt (* (* j 27.0) k))
8.5b
(cbrt (* (* j 27.0) k))
7.6b
(* (* (* x 18.0) y) z)

rewrite9.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
pow1/3
cbrt-prod
*-commutative
associate-*l*
Counts
4 → 36
Calls
4 calls:
Slowest
5.0ms
(* (* (* x 18.0) y) z)
1.0ms
(cbrt (* (* j 27.0) k))
1.0ms
(cbrt (* (* j 27.0) k))
1.0ms
(cbrt (* (* j 27.0) k))

series372.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
132.0ms
(cbrt (* (* j 27.0) k))
113.0ms
(cbrt (* (* j 27.0) k))
110.0ms
(cbrt (* (* j 27.0) k))
17.0ms
(* (* (* x 18.0) y) z)

simplify985.0ms

Counts
16 → 48
Calls
16 calls:
Slowest
151.0ms
(* (cbrt 27.0) (exp (* -1/3 (+ (log (/ 1 k)) (log (/ 1 j))))))
131.0ms
(* (cbrt 27.0) (exp (* -1/3 (+ (log (/ -1 j)) (log (/ -1 k))))))
124.0ms
(* (cbrt 27.0) (exp (* -1/3 (+ (log (/ 1 k)) (log (/ 1 j))))))
123.0ms
(* (cbrt 27.0) (exp (* -1/3 (+ (log (/ -1 j)) (log (/ -1 k))))))
123.0ms
(* (cbrt 27.0) (exp (* -1/3 (+ (log (/ -1 j)) (log (/ -1 k))))))

prune1.2s

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.1b

localize13.0ms

Local error

Found 4 expressions with local error:

7.6b
(* (* (* x 18.0) y) z)
6.4b
(* (* (* (* x 18.0) y) z) t)
0.5b
(* j (* 27.0 k))
0.2b
(* (* x 18.0) y)

rewrite22.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
add-cube-cbrt
*-commutative
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
associate-*l*
associate-*r*
Counts
4 → 36
Calls
4 calls:
Slowest
14.0ms
(* (* (* (* x 18.0) y) z) t)
5.0ms
(* (* (* x 18.0) y) z)
2.0ms
(* (* x 18.0) y)
1.0ms
(* j (* 27.0 k))

series90.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
41.0ms
(* (* (* (* x 18.0) y) z) t)
28.0ms
(* (* (* x 18.0) y) z)
11.0ms
(* j (* 27.0 k))
11.0ms
(* (* x 18.0) y)

simplify563.0ms

Counts
14 → 48
Calls
14 calls:
Slowest
234.0ms
(* 18.0 (* t (* x (* z y))))
186.0ms
(* 18.0 (* t (* x (* z y))))
45.0ms
(* 18.0 (* x (* z y)))
23.0ms
(* 18.0 (* x (* z y)))
13.0ms
(* 18.0 (* x y))

prune1.1s

Pruning

6 alts after pruning (4 fresh and 2 done)

Merged error: 0.0b

regimes2.3s

Accuracy

35.1% (3.2b remaining)

Error of 3.8b against oracle of 0.6b and baseline of 5.6b

bsearch1.8s

end0.0ms

sample6.6s

Algorithm
intervals
Results
16039×(pre true 80)
16039×(body real 80)