Average Error: 5.3 → 3.7
Time: 21.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 -1.3357439743981973 \cdot 10^{+33} \lor \neg \left(z \le 2968448.138240671\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\sqrt[3]{\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z} \cdot \left(\sqrt[3]{\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z} \cdot \sqrt[3]{\left(x \cdot \left(18.0 \cdot y\right)\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) - \left(k \cdot j\right) \cdot 27.0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(18.0 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \cdot t - t \cdot \left(4.0 \cdot a\right)\right) + b \cdot c\right) - i \cdot \left(4.0 \cdot x\right)\right) - \left(k \cdot j\right) \cdot 27.0\\ \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 < -1.3357439743981973e+33 or 2968448.138240671 < 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. Using strategy rm
    3. Applied associate-*l*7.1

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

      \[\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. Using strategy rm
    6. Applied add-cube-cbrt7.2

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

    if -1.3357439743981973e+33 < z < 2968448.138240671

    1. Initial program 4.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*4.2

      \[\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.2

      \[\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.2

      \[\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 -1.3357439743981973 \cdot 10^{+33} \lor \neg \left(z \le 2968448.138240671\right):\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\sqrt[3]{\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z} \cdot \left(\sqrt[3]{\left(x \cdot \left(18.0 \cdot y\right)\right) \cdot z} \cdot \sqrt[3]{\left(x \cdot \left(18.0 \cdot y\right)\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) - \left(k \cdot j\right) \cdot 27.0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(18.0 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \cdot t - t \cdot \left(4.0 \cdot a\right)\right) + b \cdot c\right) - i \cdot \left(4.0 \cdot x\right)\right) - \left(k \cdot j\right) \cdot 27.0\\ \end{array}\]

Reproduce

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

sample247.0ms

Algorithm
intervals

simplify156.0ms

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

prune52.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 1.5b

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

rewrite49.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
log1p-expm1-u
add-cube-cbrt
*-commutative
add-exp-log
associate-*l*
add-cbrt-cube
*-un-lft-identity
pow1
expm1-log1p-u
add-sqr-sqrt
Counts
4 → 44
Calls
4 calls:
Slowest
28.0ms
(* (* (* (* x 18.0) y) z) t)
12.0ms
(* (* (* x 18.0) y) z)
4.0ms
(* (* x 4.0) i)
4.0ms
(* (* x 18.0) y)

series99.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
36.0ms
(* (* (* (* x 18.0) y) z) t)
31.0ms
(* (* (* x 18.0) y) z)
19.0ms
(* (* x 4.0) i)
14.0ms
(* (* x 18.0) y)

simplify655.0ms

Counts
14 → 56
Calls
14 calls:
Slowest
276.0ms
(* 18.0 (* t (* x (* z y))))
230.0ms
(* 18.0 (* t (* x (* z y))))
26.0ms
(* 18.0 (* x (* z y)))
24.0ms
(* 18.0 (* x (* z y)))
14.0ms
(* 18.0 (* x y))

prune991.0ms

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.3b

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

rewrite21.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
log1p-expm1-u
add-cube-cbrt
*-commutative
add-exp-log
associate-*l*
add-cbrt-cube
*-un-lft-identity
pow1
expm1-log1p-u
add-sqr-sqrt
Counts
4 → 44
Calls
4 calls:
Slowest
7.0ms
(* (* (* x (* 18.0 y)) z) t)
6.0ms
(* (* x (* 18.0 y)) z)
5.0ms
(* (* x 4.0) i)
2.0ms
(* (* j 27.0) k)

series86.0ms

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

simplify600.0ms

Counts
13 → 56
Calls
13 calls:
Slowest
244.0ms
(* 18.0 (* t (* x (* z y))))
211.0ms
(* 18.0 (* t (* x (* z y))))
41.0ms
(* 18.0 (* x (* z y)))
30.0ms
(* 18.0 (* x (* z y)))
14.0ms
(* 4.0 (* i x))

prune1.5s

Pruning

8 alts after pruning (8 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.2b
(* (* x 4.0) i)
0.2b
(* 27.0 (* j k))

rewrite14.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
log1p-expm1-u
add-cube-cbrt
*-commutative
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
expm1-log1p-u
add-sqr-sqrt
associate-*l*
associate-*r*
Counts
4 → 44
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))

series115.0ms

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

simplify632.0ms

Counts
13 → 56
Calls
13 calls:
Slowest
244.0ms
(* 18.0 (* t (* x (* z y))))
189.0ms
(* 18.0 (* t (* x (* z y))))
51.0ms
(* 18.0 (* x (* z y)))
49.0ms
(* 18.0 (* x (* z y)))
13.0ms
(* 4.0 (* i x))

prune1.3s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0.3b

localize25.0ms

Local error

Found 4 expressions with local error:

15.7b
(cbrt (* (* x (* 18.0 y)) z))
15.7b
(cbrt (* (* x (* 18.0 y)) z))
15.7b
(cbrt (* (* x (* 18.0 y)) z))
6.1b
(* (* x (* 18.0 y)) z)

rewrite9.0ms

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

series397.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
165.0ms
(cbrt (* (* x (* 18.0 y)) z))
114.0ms
(cbrt (* (* x (* 18.0 y)) z))
100.0ms
(cbrt (* (* x (* 18.0 y)) z))
18.0ms
(* (* x (* 18.0 y)) z)

simplify1.6s

Counts
15 → 56
Calls
15 calls:
Slowest
225.0ms
(* (cbrt -18.0) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
199.0ms
(* (cbrt -18.0) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
179.0ms
(* (cbrt -18.0) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
172.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (log (/ 1 y)))))))
163.0ms
(* (cbrt 18.0) (exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (log (/ 1 y)))))))

prune1.8s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.3b

regimes1.9s

Accuracy

41.8% (2.5b remaining)

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

bsearch1.1s

end0.0ms

sample6.5s

Algorithm
intervals