Average Error: 5.4 → 1.7
Time: 25.1s
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 -2.885269682548215 \cdot 10^{-77} \lor \neg \left(t \le 11628.174800005745\right):\\ \;\;\;\;\left(\left(b \cdot c + \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)\right) - \left(4.0 \cdot x\right) \cdot i\right) - k \cdot \left(j \cdot 27.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(y \cdot \left(t \cdot z\right)\right) \cdot 18.0\right) \cdot x - \left(a \cdot 4.0\right) \cdot t\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 t < -2.885269682548215e-77 or 11628.174800005745 < t

    1. Initial program 2.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*2.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\]

    if -2.885269682548215e-77 < t < 11628.174800005745

    1. Initial program 7.9

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

      \[\leadsto \left(\left(\left(\color{blue}{\left(x \cdot 18.0\right) \cdot \left(y \cdot \left(z \cdot t\right)\right)} - \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\]
    6. Using strategy rm
    7. Applied associate-*l*1.5

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

      \[\leadsto \left(\left(\left(x \cdot \left(18.0 \cdot \left(y \cdot \left(z \cdot t\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) - \color{blue}{27.0 \cdot \left(j \cdot k\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.885269682548215 \cdot 10^{-77} \lor \neg \left(t \le 11628.174800005745\right):\\ \;\;\;\;\left(\left(b \cdot c + \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)\right) - \left(4.0 \cdot x\right) \cdot i\right) - k \cdot \left(j \cdot 27.0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(\left(y \cdot \left(t \cdot z\right)\right) \cdot 18.0\right) \cdot x - \left(a \cdot 4.0\right) \cdot t\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 2018360 +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: 16.2s)Debug log

start241.0ms

Algorithm
intervals

setup187.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 3.6b

localize60.0ms

Local error

Found 4 expressions with local error:

7.1b
(* (* (* (* x 18.0) y) z) t)
4.4b
(* (* (* x 18.0) y) z)
0.2b
(* (* j 27.0) k)
0.2b
(* (* x 18.0) y)

rewrite43.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

23.0ms
(* (* (* (* x 18.0) y) z) t)
11.0ms
(* (* (* x 18.0) y) z)
4.0ms
(* (* x 18.0) y)

series100.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

40.0ms
(* (* (* (* x 18.0) y) z) t)
29.0ms
(* (* (* x 18.0) y) z)
16.0ms
(* (* j 27.0) k)
16.0ms
(* (* x 18.0) y)

simplify416.0ms

Counts
14 → 56
Calls

14 calls. Slowest were:

164.0ms
(* 18.0 (* t (* x (* z y))))
146.0ms
(* 18.0 (* t (* x (* z y))))
25.0ms
(* 18.0 (* x (* z y)))

prune1.5s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.5b

localize17.0ms

Local error

Found 4 expressions with local error:

9.3b
(* (* (* x 18.0) y) (* z t))
0.2b
(* (* j 27.0) k)
0.2b
(* (* x 18.0) y)
0.0b
(- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t))

rewrite40.0ms

Algorithm
rewrite-expression-head
Counts
4 → 53
Calls

4 calls. Slowest were:

18.0ms
(- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t))
13.0ms
(* (* (* x 18.0) y) (* z t))
4.0ms
(* (* j 27.0) k)

series154.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

82.0ms
(- (* (* (* x 18.0) y) (* z t)) (* (* a 4.0) t))
38.0ms
(* (* (* x 18.0) y) (* z t))
20.0ms
(* (* j 27.0) k)
14.0ms
(* (* x 18.0) y)

simplify2.1s

Counts
20 → 65
Calls

20 calls. Slowest were:

333.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))
313.0ms
(fma (* (* x 18.0) y) (* z t) (- (* t (* a 4.0))))
280.0ms
(/ (exp (* (* (* x 18.0) y) (* z t))) (exp (* (* a 4.0) t)))

prune1.9s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

localize17.0ms

Local error

Found 4 expressions with local error:

5.9b
(* y (* z t))
5.3b
(* (* x 18.0) (* y (* z t)))
0.2b
(* (* j 27.0) k)
0.0b
(- (* (* x 18.0) (* y (* z t))) (* (* a 4.0) t))

rewrite19.0ms

Algorithm
rewrite-expression-head
Counts
4 → 53
Calls

4 calls. Slowest were:

11.0ms
(- (* (* x 18.0) (* y (* z t))) (* (* a 4.0) t))
5.0ms
(* (* x 18.0) (* y (* z t)))
2.0ms
(* (* j 27.0) k)

series213.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

120.0ms
(- (* (* x 18.0) (* y (* z t))) (* (* a 4.0) t))
49.0ms
(* (* x 18.0) (* y (* z t)))
26.0ms
(* y (* z t))
19.0ms
(* (* j 27.0) k)

simplify2.1s

Counts
20 → 65
Calls

20 calls. Slowest were:

308.0ms
(- (* 18.0 (* t (* x (* z y)))) (* 4.0 (* a t)))
300.0ms
(/ (exp (* (* x 18.0) (* y (* z t)))) (exp (* (* a 4.0) t)))
266.0ms
(fma (* x 18.0) (* y (* z t)) (- (* t (* a 4.0))))

prune1.6s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0.0b

localize37.0ms

Local error

Found 4 expressions with local error:

5.9b
(* y (* z t))
5.1b
(* x (* 18.0 (* y (* z t))))
0.3b
(* 18.0 (* y (* z t)))
0.2b
(* (* j 27.0) k)

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

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

series117.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

52.0ms
(* x (* 18.0 (* y (* z t))))
27.0ms
(* y (* z t))
24.0ms
(* 18.0 (* y (* z t)))
14.0ms
(* (* j 27.0) k)

simplify458.0ms

Counts
14 → 56
Calls

14 calls. Slowest were:

195.0ms
(* 18.0 (* t (* x (* z y))))
137.0ms
(* 18.0 (* t (* x (* z y))))
25.0ms
(* 18.0 (* t (* z y)))

prune2.0s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0.0b

regimes2.4s

Accuracy

73% (1.3b remaining)

Error of 1.7b against oracle of 0.4b and baseline of 5.2b

bsearch481.0ms