Average Error: 11.7 → 11.4
Time: 23.7s
Precision: 64
Internal Precision: 128
\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
\[\begin{array}{l} \mathbf{if}\;x \le 1.3099434334785528 \cdot 10^{+80}:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \left(\left(\left(-a\right) \cdot \left(x \cdot t\right) + \sqrt[3]{\left(y \cdot z\right) \cdot x} \cdot \left(\sqrt[3]{\left(y \cdot z\right) \cdot x} \cdot \sqrt[3]{\left(y \cdot z\right) \cdot x}\right)\right) - b \cdot \left(z \cdot c - a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot z - t \cdot a\right) \cdot x - \sqrt[3]{z \cdot c - a \cdot i} \cdot \left(b \cdot \left(\sqrt[3]{z \cdot c - a \cdot i} \cdot \sqrt[3]{z \cdot c - a \cdot i}\right)\right)\right) + j \cdot \left(t \cdot c - y \cdot i\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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < 1.3099434334785528e+80

    1. Initial program 12.3

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    2. Using strategy rm
    3. Applied sub-neg12.3

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\right)\right)} - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied distribute-lft-in12.3

      \[\leadsto \left(\color{blue}{\left(x \cdot \left(y \cdot z\right) + x \cdot \left(-t \cdot a\right)\right)} - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied distribute-lft-neg-in12.3

      \[\leadsto \left(\left(x \cdot \left(y \cdot z\right) + x \cdot \color{blue}{\left(\left(-t\right) \cdot a\right)}\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    7. Applied associate-*r*11.8

      \[\leadsto \left(\left(x \cdot \left(y \cdot z\right) + \color{blue}{\left(x \cdot \left(-t\right)\right) \cdot a}\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    8. Using strategy rm
    9. Applied add-cube-cbrt11.9

      \[\leadsto \left(\left(\color{blue}{\left(\sqrt[3]{x \cdot \left(y \cdot z\right)} \cdot \sqrt[3]{x \cdot \left(y \cdot z\right)}\right) \cdot \sqrt[3]{x \cdot \left(y \cdot z\right)}} + \left(x \cdot \left(-t\right)\right) \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]

    if 1.3099434334785528e+80 < x

    1. Initial program 7.4

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    2. Using strategy rm
    3. Applied add-cube-cbrt7.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \color{blue}{\left(\left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right) \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied associate-*r*7.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(b \cdot \left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) \cdot \sqrt[3]{c \cdot z - i \cdot a}}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification11.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le 1.3099434334785528 \cdot 10^{+80}:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \left(\left(\left(-a\right) \cdot \left(x \cdot t\right) + \sqrt[3]{\left(y \cdot z\right) \cdot x} \cdot \left(\sqrt[3]{\left(y \cdot z\right) \cdot x} \cdot \sqrt[3]{\left(y \cdot z\right) \cdot x}\right)\right) - b \cdot \left(z \cdot c - a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y \cdot z - t \cdot a\right) \cdot x - \sqrt[3]{z \cdot c - a \cdot i} \cdot \left(b \cdot \left(\sqrt[3]{z \cdot c - a \cdot i} \cdot \sqrt[3]{z \cdot c - a \cdot i}\right)\right)\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019022 +o rules:numerics
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))

Details

Time bar (total: 21.2s)Debug log

sample154.0ms

Algorithm
intervals
Results
100.0ms623×body80valid

simplify183.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
183.0ms
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y))))

prune30.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 10.3b

localize67.0ms

Local error

Found 4 expressions with local error:

5.5b
(* b (- (* c z) (* i a)))
4.7b
(* j (- (* c t) (* i y)))
3.8b
(* x (- (* y z) (* t a)))
0.2b
(- (* y z) (* t a))

rewrite16.0ms

Algorithm
rewrite-expression-head
Rules
associate-*r*
distribute-lft-in
distribute-rgt-in
add-cube-cbrt
prod-diff
*-un-lft-identity
sub-neg
add-sqr-sqrt
add-log-exp
associate-*r/
flip--
log1p-expm1-u
add-exp-log
add-cbrt-cube
flip3--
pow1
expm1-log1p-u
*-commutative
diff-log
fma-neg
Counts
4 → 79
Calls
4 calls:
Slowest
5.0ms
(* b (- (* c z) (* i a)))
4.0ms
(* j (- (* c t) (* i y)))
3.0ms
(* x (- (* y z) (* t a)))
2.0ms
(- (* y z) (* t a))

series172.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
48.0ms
(* b (- (* c z) (* i a)))
43.0ms
(* x (- (* y z) (* t a)))
43.0ms
(* j (- (* c t) (* i y)))
39.0ms
(- (* y z) (* t a))

simplify1.6s

Counts
48 → 91
Calls
48 calls:
Slowest
173.0ms
(+ (* (* y z) (* y z)) (+ (* (* t a) (* t a)) (* (* y z) (* t a))))
134.0ms
(+ (* (* c t) (* c t)) (+ (* (* i y) (* i y)) (* (* c t) (* i y))))
133.0ms
(+ (* (* c z) (* c z)) (+ (* (* i a) (* i a)) (* (* c z) (* i a))))
90.0ms
(- (* x (* z y)) (* a (* x t)))
83.0ms
(- (* z (* b c)) (* a (* i b)))

prune1.6s

Pruning

18 alts after pruning (18 fresh and 0 done)

Merged error: 7.1b

localize15.0ms

Local error

Found 4 expressions with local error:

5.5b
(* b (- (* c z) (* i a)))
4.8b
(* x (- (* t a)))
4.7b
(* j (- (* c t) (* i y)))
3.1b
(* x (* y z))

rewrite11.0ms

Algorithm
rewrite-expression-head
Rules
13×associate-*r*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
distribute-lft-in
distribute-rgt-in
add-log-exp
log1p-expm1-u
*-commutative
add-exp-log
associate-*r/
prod-diff
add-cbrt-cube
sub-neg
pow1
expm1-log1p-u
flip--
flip3--
distribute-rgt-neg-out
distribute-rgt-neg-in
neg-mul-1
distribute-lft-neg-in
Counts
4 → 70
Calls
4 calls:
Slowest
4.0ms
(* b (- (* c z) (* i a)))
3.0ms
(* j (- (* c t) (* i y)))
2.0ms
(* x (- (* t a)))
1.0ms
(* x (* y z))

series173.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
71.0ms
(* j (- (* c t) (* i y)))
58.0ms
(* b (- (* c z) (* i a)))
28.0ms
(* x (- (* t a)))
16.0ms
(* x (* y z))

simplify1.1s

Counts
39 → 82
Calls
39 calls:
Slowest
178.0ms
(+ (* (* c t) (* c t)) (+ (* (* i y) (* i y)) (* (* c t) (* i y))))
163.0ms
(+ (* (* c z) (* c z)) (+ (* (* i a) (* i a)) (* (* c z) (* i a))))
67.0ms
(- (* t (* j c)) (* i (* y j)))
67.0ms
(- (* t (* j c)) (* i (* y j)))
65.0ms
(- (* z (* b c)) (* a (* i b)))

prune1.4s

Pruning

17 alts after pruning (17 fresh and 0 done)

Merged error: 5.7b

localize18.0ms

Local error

Found 4 expressions with local error:

5.5b
(* b (- (* c z) (* i a)))
4.7b
(* j (- (* c t) (* i y)))
3.5b
(* (* x (- t)) a)
3.1b
(* x (* y z))

rewrite13.0ms

Algorithm
rewrite-expression-head
Rules
associate-*r*
add-cube-cbrt
distribute-lft-in
*-un-lft-identity
add-sqr-sqrt
distribute-rgt-in
add-log-exp
log1p-expm1-u
*-commutative
add-exp-log
associate-*r/
prod-diff
add-cbrt-cube
sub-neg
pow1
expm1-log1p-u
flip--
flip3--
distribute-rgt-neg-out
associate-*l*
distribute-lft-neg-out
Counts
4 → 65
Calls
4 calls:
Slowest
5.0ms
(* b (- (* c z) (* i a)))
3.0ms
(* j (- (* c t) (* i y)))
3.0ms
(* (* x (- t)) a)
1.0ms
(* x (* y z))

series134.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
52.0ms
(* j (- (* c t) (* i y)))
48.0ms
(* b (- (* c z) (* i a)))
18.0ms
(* x (* y z))
17.0ms
(* (* x (- t)) a)

simplify1.1s

Counts
35 → 77
Calls
35 calls:
Slowest
164.0ms
(+ (* (* c t) (* c t)) (+ (* (* i y) (* i y)) (* (* c t) (* i y))))
158.0ms
(+ (* (* c z) (* c z)) (+ (* (* i a) (* i a)) (* (* c z) (* i a))))
80.0ms
(- (* t (* j c)) (* i (* y j)))
68.0ms
(- (* z (* b c)) (* a (* i b)))
60.0ms
(- (* t (* j c)) (* i (* y j)))

prune1.8s

Pruning

17 alts after pruning (17 fresh and 0 done)

Merged error: 5.2b

localize22.0ms

Local error

Found 4 expressions with local error:

17.1b
(cbrt (* x (* y z)))
17.1b
(cbrt (* x (* y z)))
17.1b
(cbrt (* x (* y z)))
5.5b
(* b (- (* c z) (* i a)))

rewrite6.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
log1p-expm1-u
add-exp-log
add-cbrt-cube
pow1
expm1-log1p-u
associate-*r*
pow1/3
distribute-lft-in
distribute-rgt-in
cbrt-prod
associate-*r/
prod-diff
sub-neg
flip--
*-commutative
flip3--
Counts
4 → 54
Calls
4 calls:
Slowest
4.0ms
(* b (- (* c z) (* i a)))
1.0ms
(cbrt (* x (* y z)))
1.0ms
(cbrt (* x (* y z)))
1.0ms
(cbrt (* x (* y z)))

series381.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
110.0ms
(cbrt (* x (* y z)))
107.0ms
(cbrt (* x (* y z)))
105.0ms
(cbrt (* x (* y z)))
58.0ms
(* b (- (* c z) (* i a)))

simplify1.9s

Counts
26 → 66
Calls
26 calls:
Slowest
215.0ms
(+ (* (* c z) (* c z)) (+ (* (* i a) (* i a)) (* (* c z) (* i a))))
160.0ms
(exp (* -1/3 (+ (log (/ 1 z)) (+ (log (/ 1 x)) (log (/ 1 y))))))
156.0ms
(* (cbrt -1) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
150.0ms
(* (cbrt -1) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))
149.0ms
(* (cbrt -1) (exp (* -1/3 (+ (log (/ -1 x)) (+ (log (/ -1 z)) (log (/ -1 y)))))))

prune1.4s

Pruning

17 alts after pruning (16 fresh and 1 done)

Merged error: 5.2b

regimes1.6s

Accuracy

13.8% (5.1b remaining)

Error of 11.4b against oracle of 6.3b and baseline of 12.2b

bsearch223.0ms

end0.0ms

sample5.9s

Algorithm
intervals
Results
4.9s18959×body80valid