Average Error: 4.8 → 3.0
Time: 18.7s
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 -32448.042836922086:\\ \;\;\;\;\left(\left(b \cdot c + \left(18.0 \cdot \left(t \cdot \left(\left(z \cdot y\right) \cdot x\right)\right) - \left(a \cdot 4.0\right) \cdot t\right)\right) - \left(x \cdot 4.0\right) \cdot i\right) - 27.0 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \le 1.4053745018992819 \cdot 10^{+82}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(z \cdot t\right) \cdot \left(\left(18.0 \cdot x\right) \cdot y\right) - \left(a \cdot 4.0\right) \cdot t\right)\right) - \left(x \cdot 4.0\right) \cdot i\right) - 27.0 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(\sqrt[3]{\left(18.0 \cdot x\right) \cdot y} \cdot \left(\sqrt[3]{\left(18.0 \cdot x\right) \cdot y} \cdot \sqrt[3]{\left(18.0 \cdot x\right) \cdot y}\right)\right)\right) - \left(a \cdot 4.0\right) \cdot t\right)\right) - \left(x \cdot 4.0\right) \cdot i\right) - 27.0 \cdot \left(j \cdot k\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 3 regimes
  2. if t < -32448.042836922086

    1. Initial program 1.6

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

      \[\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 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) - 27.0 \cdot \left(j \cdot k\right)\]
    5. Taylor expanded around -inf 1.8

      \[\leadsto \left(\left(\left(\color{blue}{18.0 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\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) - 27.0 \cdot \left(j \cdot k\right)\]

    if -32448.042836922086 < t < 1.4053745018992819e+82

    1. Initial program 6.3

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

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

    if 1.4053745018992819e+82 < t

    1. Initial program 1.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 1.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}{27.0 \cdot \left(j \cdot k\right)}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt1.3

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

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

Reproduce

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

sample183.0ms

Algorithm
intervals
Results
141.0ms525×body80valid

simplify133.0ms

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

prune34.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 3.4b

localize53.0ms

Local error

Found 4 expressions with local error:

5.8b
(* (* (* x 18.0) y) z)
4.8b
(* (* (* (* x 18.0) y) z) t)
0.2b
(* (* x 18.0) y)
0.2b
(* (* j 27.0) k)

rewrite30.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
20.0ms
(* (* (* (* x 18.0) y) z) t)
5.0ms
(* (* (* x 18.0) y) z)
2.0ms
(* (* j 27.0) k)
2.0ms
(* (* x 18.0) y)

series71.0ms

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

simplify473.0ms

Counts
14 → 48
Calls
14 calls:
Slowest
192.0ms
(* 18.0 (* t (* x (* z y))))
167.0ms
(* 18.0 (* t (* x (* z y))))
27.0ms
(* 18.0 (* x (* z y)))
24.0ms
(* 18.0 (* x (* z y)))
12.0ms
(* 18.0 (* x y))

prune1.0s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 1.2b

localize20.0ms

Local error

Found 4 expressions with local error:

5.8b
(* (* (* x 18.0) y) z)
4.8b
(* (* (* (* x 18.0) y) z) t)
0.2b
(* 27.0 (* j k))
0.2b
(* (* x 18.0) y)

rewrite43.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
25.0ms
(* (* (* (* x 18.0) y) z) t)
11.0ms
(* (* (* x 18.0) y) z)
4.0ms
(* (* x 18.0) y)
2.0ms
(* 27.0 (* j k))

series118.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
48.0ms
(* (* (* (* x 18.0) y) z) t)
33.0ms
(* (* (* x 18.0) y) z)
19.0ms
(* 27.0 (* j k))
17.0ms
(* (* x 18.0) y)

simplify618.0ms

Counts
14 → 48
Calls
14 calls:
Slowest
219.0ms
(* 18.0 (* t (* x (* z y))))
210.0ms
(* 18.0 (* t (* x (* z y))))
48.0ms
(* 18.0 (* x (* z y)))
45.0ms
(* 18.0 (* x (* z y)))
13.0ms
(* 18.0 (* x y))

prune1.1s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 1.2b

localize45.0ms

Local error

Found 4 expressions with local error:

13.4b
(cbrt (* (* x 18.0) y))
13.4b
(cbrt (* (* x 18.0) y))
13.4b
(cbrt (* (* x 18.0) y))
5.8b
(* (* (* (cbrt (* (* x 18.0) y)) (cbrt (* (* x 18.0) y))) (cbrt (* (* x 18.0) y))) z)

rewrite67.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
63.0ms
(* (* (* (cbrt (* (* x 18.0) y)) (cbrt (* (* x 18.0) y))) (cbrt (* (* x 18.0) y))) z)
1.0ms
(cbrt (* (* x 18.0) y))
1.0ms
(cbrt (* (* x 18.0) y))
1.0ms
(cbrt (* (* x 18.0) y))

series419.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
122.0ms
(cbrt (* (* x 18.0) y))
103.0ms
(cbrt (* (* x 18.0) y))
100.0ms
(cbrt (* (* x 18.0) y))
93.0ms
(* (* (* (cbrt (* (* x 18.0) y)) (cbrt (* (* x 18.0) y))) (cbrt (* (* x 18.0) y))) z)

simplify1.1s

Counts
16 → 48
Calls
16 calls:
Slowest
166.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ -1 x)) (log (/ -1 y))))))
162.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 x)) (log (/ 1 y))))))
147.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 x)) (log (/ 1 y))))))
137.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 x)) (log (/ 1 y))))))
130.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ -1 x)) (log (/ -1 y))))))

prune1.3s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 1.2b

localize28.0ms

Local error

Found 4 expressions with local error:

5.8b
(* (* x (* 18.0 y)) z)
4.8b
(* (* (* x (* 18.0 y)) z) t)
0.7b
(* x (* 18.0 y))
0.2b
(* 27.0 (* j k))

rewrite16.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
7.0ms
(* (* x (* 18.0 y)) z)
7.0ms
(* (* (* x (* 18.0 y)) z) t)
1.0ms
(* 27.0 (* j k))
1.0ms
(* x (* 18.0 y))

series108.0ms

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

simplify464.0ms

Counts
13 → 48
Calls
13 calls:
Slowest
188.0ms
(* 18.0 (* t (* x (* z y))))
162.0ms
(* 18.0 (* t (* x (* z y))))
31.0ms
(* 18.0 (* x (* z y)))
24.0ms
(* 18.0 (* x (* z y)))
12.0ms
(* 27.0 (* j k))

prune978.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 1.2b

regimes2.2s

Accuracy

45.7% (2.2b remaining)

Error of 3.0b against oracle of 0.8b and baseline of 4.9b

bsearch606.0ms

end0.0ms

sample6.1s

Algorithm
intervals
Results
5.2s16149×body80valid