Average Error: 5.3 → 3.7
Time: 17.2s
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 -4.820886975059018 \cdot 10^{+31} \lor \neg \left(z \le 4.1641646621740895 \cdot 10^{-82}\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(t \cdot \left(\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z\right) - t \cdot \left(a \cdot 4.0\right)\right)\right) - \left(4.0 \cdot x\right) \cdot i\right) - j \cdot \left(27.0 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(x \cdot \left(y \cdot z\right)\right) \cdot 18.0\right) \cdot t - t \cdot \left(a \cdot 4.0\right)\right)\right) - \left(4.0 \cdot x\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 2 regimes
  2. if z < -4.820886975059018e+31 or 4.1641646621740895e-82 < z

    1. Initial program 6.4

      \[\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*6.5

      \[\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\]
    4. Using strategy rm
    5. Applied associate-*l*6.4

      \[\leadsto \left(\left(\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) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \color{blue}{j \cdot \left(27.0 \cdot k\right)}\]

    if -4.820886975059018e+31 < z < 4.1641646621740895e-82

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

      \[\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\]
    4. Taylor expanded around inf 4.3

      \[\leadsto \left(\left(\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) + b \cdot c\right) - \left(x \cdot 4.0\right) \cdot i\right) - \color{blue}{27.0 \cdot \left(j \cdot k\right)}\]
    5. Taylor expanded around inf 1.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -4.820886975059018 \cdot 10^{+31} \lor \neg \left(z \le 4.1641646621740895 \cdot 10^{-82}\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(t \cdot \left(\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z\right) - t \cdot \left(a \cdot 4.0\right)\right)\right) - \left(4.0 \cdot x\right) \cdot i\right) - j \cdot \left(27.0 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(x \cdot \left(y \cdot z\right)\right) \cdot 18.0\right) \cdot t - t \cdot \left(a \cdot 4.0\right)\right)\right) - \left(4.0 \cdot x\right) \cdot i\right) - 27.0 \cdot \left(j \cdot k\right)\\ \end{array}\]

Reproduce

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

sample275.0ms

Algorithm
intervals

simplify339.0ms

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

prune24.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 1.5b

localize53.0ms

Local error

Found 4 expressions with local error:

6.1b
(* (* (* x 18.0) y) z)
2.8b
(* (* (* (* x 18.0) y) z) t)
0.2b
(* (* x 18.0) y)
0.2b
(* (* x 4.0) i)

rewrite23.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
13.0ms
(* (* (* (* x 18.0) y) z) t)
5.0ms
(* (* (* x 18.0) y) z)
2.0ms
(* (* x 18.0) y)
2.0ms
(* (* x 4.0) i)

series73.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
33.0ms
(* (* (* (* x 18.0) y) z) t)
18.0ms
(* (* (* x 18.0) y) z)
11.0ms
(* (* x 18.0) y)
11.0ms
(* (* x 4.0) i)

simplify353.0ms

Counts
14 → 48
Calls
14 calls:
Slowest
129.0ms
(* 18.0 (* t (* x (* z y))))
129.0ms
(* 18.0 (* t (* x (* z y))))
23.0ms
(* 18.0 (* x (* z y)))
22.0ms
(* 18.0 (* x (* z y)))
9.0ms
(* (* x 18.0) y)

prune948.0ms

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.3b

localize26.0ms

Local error

Found 4 expressions with local error:

6.1b
(* (* x (* 18.0 y)) z)
2.8b
(* (* (* x (* 18.0 y)) z) t)
0.2b
(* (* x 4.0) i)
0.2b
(* (* j 27.0) k)

rewrite17.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
7.0ms
(* (* (* x (* 18.0 y)) z) t)
6.0ms
(* (* x (* 18.0 y)) z)
2.0ms
(* (* x 4.0) i)
2.0ms
(* (* j 27.0) k)

series68.0ms

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

simplify445.0ms

Counts
13 → 48
Calls
13 calls:
Slowest
196.0ms
(* 18.0 (* t (* x (* z y))))
144.0ms
(* 18.0 (* t (* x (* z y))))
36.0ms
(* 18.0 (* x (* z y)))
25.0ms
(* 18.0 (* x (* z y)))
7.0ms
(* 27.0 (* j k))

prune920.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.3b

localize9.0ms

Local error

Found 4 expressions with local error:

6.1b
(* (* x (* 18.0 y)) z)
2.8b
(* (* (* x (* 18.0 y)) z) t)
0.2b
(* (* x 4.0) i)
0.2b
(* 27.0 (* j k))

rewrite13.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) t)
3.0ms
(* (* x (* 18.0 y)) z)
2.0ms
(* (* x 4.0) i)
1.0ms
(* 27.0 (* j k))

series69.0ms

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

simplify382.0ms

Counts
13 → 48
Calls
13 calls:
Slowest
156.0ms
(* 18.0 (* t (* x (* z y))))
134.0ms
(* 18.0 (* t (* x (* z y))))
23.0ms
(* 18.0 (* x (* z y)))
22.0ms
(* 18.0 (* x (* z y)))
8.0ms
(* 27.0 (* j k))

prune1.0s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0.3b

localize10.0ms

Local error

Found 4 expressions with local error:

6.1b
(* (* x (* 18.0 y)) z)
2.8b
(* (* (* x (* 18.0 y)) z) t)
0.3b
(* j (* 27.0 k))
0.2b
(* (* x 4.0) i)

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) t)
4.0ms
(* (* x 4.0) i)
3.0ms
(* (* x (* 18.0 y)) z)
2.0ms
(* j (* 27.0 k))

series87.0ms

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

simplify507.0ms

Counts
13 → 48
Calls
13 calls:
Slowest
208.0ms
(* 18.0 (* t (* x (* z y))))
178.0ms
(* 18.0 (* t (* x (* z y))))
38.0ms
(* 18.0 (* x (* z y)))
26.0ms
(* 18.0 (* x (* z y)))
11.0ms
(* 4.0 (* i x))

prune1.1s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.3b

regimes1.8s

Accuracy

40.3% (2.5b remaining)

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

bsearch1.1s

end0.0ms

sample6.3s

Algorithm
intervals