Average Error: 15.4 → 0.9
Time: 12.9s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{g}}{\sqrt[3]{a}}\]

Error

Bits error versus g

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.4

    \[\sqrt[3]{\frac{g}{2 \cdot a}}\]
  2. Using strategy rm
  3. Applied div-inv15.4

    \[\leadsto \sqrt[3]{\color{blue}{g \cdot \frac{1}{2 \cdot a}}}\]
  4. Applied cbrt-prod0.9

    \[\leadsto \color{blue}{\sqrt[3]{g} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}}\]
  5. Taylor expanded around 0 34.4

    \[\leadsto \sqrt[3]{g} \cdot \color{blue}{\left(\sqrt[3]{\frac{1}{2}} \cdot {\left(\frac{1}{a}\right)}^{\frac{1}{3}}\right)}\]
  6. Simplified0.9

    \[\leadsto \sqrt[3]{g} \cdot \color{blue}{\left(\sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{1}{2}}\right)}\]
  7. Using strategy rm
  8. Applied cbrt-div0.9

    \[\leadsto \sqrt[3]{g} \cdot \left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{a}}} \cdot \sqrt[3]{\frac{1}{2}}\right)\]
  9. Applied associate-*l/0.9

    \[\leadsto \sqrt[3]{g} \cdot \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt[3]{a}}}\]
  10. Applied associate-*r/0.9

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g} \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{\frac{1}{2}}\right)}{\sqrt[3]{a}}}\]
  11. Final simplification0.9

    \[\leadsto \frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{g}}{\sqrt[3]{a}}\]

Reproduce

herbie shell --seed 2019010 +o rules:numerics
(FPCore (g a)
  :name "2-ancestry mixing, zero discriminant"
  (cbrt (/ g (* 2 a))))

Details

Time bar (total: 10.7s)Debug log

sample57.0ms

Algorithm
intervals

simplify5.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
5.0ms
(cbrt (/ g (* 2 a)))

prune11.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 16.1b

localize18.0ms

Local error

Found 1 expressions with local error:

16.1b
(cbrt (/ g (* 2 a)))

rewrite2.0ms

Algorithm
rewrite-expression-head
Rules
cbrt-prod
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
div-inv
log1p-expm1-u
add-exp-log
pow1/3
add-cbrt-cube
cbrt-div
pow1
expm1-log1p-u
Counts
1 → 15
Calls
1 calls:
Slowest
1.0ms
(cbrt (/ g (* 2 a)))

series131.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
130.0ms
(cbrt (/ g (* 2 a)))

simplify421.0ms

Counts
8 → 18
Calls
8 calls:
Slowest
200.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
152.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))))
52.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))
6.0ms
(cbrt (* (cbrt (/ g (* 2 a))) (cbrt (/ g (* 2 a)))))
5.0ms
(cbrt (sqrt (/ g (* 2 a))))

prune186.0ms

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 0.2b

localize9.0ms

Local error

Found 3 expressions with local error:

0.7b
(cbrt g)
0.6b
(cbrt (* 2 a))
0.3b
(/ (cbrt g) (cbrt (* 2 a)))

rewrite5.0ms

Algorithm
rewrite-expression-head
Rules
12×add-cube-cbrt
12×times-frac
12×*-un-lft-identity
12×add-sqr-sqrt
add-exp-log
cbrt-prod
associate-/r*
add-log-exp
associate-/l*
log1p-expm1-u
add-cbrt-cube
pow1
expm1-log1p-u
pow1/3
div-inv
div-exp
frac-2neg
clear-num
cbrt-undiv
Counts
3 → 54
Calls
3 calls:
Slowest
4.0ms
(/ (cbrt g) (cbrt (* 2 a)))
0.0ms
(cbrt (* 2 a))
0.0ms
(cbrt g)

series755.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
354.0ms
(cbrt (* 2 a))
260.0ms
(cbrt g)
141.0ms
(/ (cbrt g) (cbrt (* 2 a)))

simplify571.0ms

Counts
42 → 63
Calls
42 calls:
Slowest
223.0ms
(/ (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))) (cbrt 2))
129.0ms
(/ (* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (cbrt -1)) (cbrt -2))
40.0ms
(/ (exp (* 1/3 (- (log g) (log a)))) (cbrt 2))
33.0ms
(/ (* (cbrt (cbrt g)) (cbrt (cbrt g))) (* (cbrt (cbrt (* 2 a))) (cbrt (cbrt (* 2 a)))))
18.0ms
(/ (* (cbrt (cbrt g)) (cbrt (cbrt g))) 1)

prune628.0ms

Pruning

21 alts after pruning (20 fresh and 1 done)

Merged error: 0.1b

localize10.0ms

Local error

Found 3 expressions with local error:

0.7b
(cbrt g)
0.6b
(cbrt (/ 1 (* 2 a)))
0.3b
(* (cbrt g) (cbrt (/ 1 (* 2 a))))

rewrite6.0ms

Algorithm
rewrite-expression-head
Rules
cbrt-prod
add-cube-cbrt
associate-*r*
*-un-lft-identity
add-sqr-sqrt
add-exp-log
pow1
pow1/3
add-log-exp
log1p-expm1-u
associate-*l*
add-cbrt-cube
expm1-log1p-u
div-inv
pow-prod-down
cbrt-div
cbrt-unprod
*-commutative
associate-*r/
prod-exp
Counts
3 → 50
Calls
3 calls:
Slowest
5.0ms
(* (cbrt g) (cbrt (/ 1 (* 2 a))))
1.0ms
(cbrt (/ 1 (* 2 a)))
0.0ms
(cbrt g)

series713.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
315.0ms
(cbrt (/ 1 (* 2 a)))
250.0ms
(cbrt g)
148.0ms
(* (cbrt g) (cbrt (/ 1 (* 2 a))))

simplify672.0ms

Counts
28 → 59
Calls
28 calls:
Slowest
261.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
186.0ms
(* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (* (cbrt -1) (cbrt -1/2)))
74.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))
38.0ms
(* g (/ 1 (* 2 a)))
30.0ms
(* g (/ 1 (* 2 a)))

prune786.0ms

Pruning

23 alts after pruning (22 fresh and 1 done)

Merged error: 0.0b

localize27.0ms

Local error

Found 4 expressions with local error:

0.7b
(cbrt g)
0.6b
(cbrt (/ 1 a))
0.5b
(* (cbrt (/ 1 a)) (cbrt 1/2))
0.3b
(* (cbrt g) (* (cbrt (/ 1 a)) (cbrt 1/2)))

rewrite18.0ms

Algorithm
rewrite-expression-head
Rules
11×add-exp-log
11×pow1
10×associate-*l*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
cbrt-prod
pow-prod-down
pow1/3
add-cbrt-cube
add-log-exp
log1p-expm1-u
cbrt-unprod
prod-exp
associate-*r*
expm1-log1p-u
cbrt-div
div-inv
*-commutative
associate-*l/
associate-*r/
Counts
4 → 72
Calls
4 calls:
Slowest
11.0ms
(* (cbrt g) (* (cbrt (/ 1 a)) (cbrt 1/2)))
5.0ms
(* (cbrt (/ 1 a)) (cbrt 1/2))
1.0ms
(cbrt (/ 1 a))
0.0ms
(cbrt g)

series1.1s

Counts
4 → 12
Calls
4 calls:
Slowest
375.0ms
(* (cbrt (/ 1 a)) (cbrt 1/2))
328.0ms
(cbrt (/ 1 a))
251.0ms
(cbrt g)
146.0ms
(* (cbrt g) (* (cbrt (/ 1 a)) (cbrt 1/2)))

simplify1.2s

Counts
42 → 84
Calls
42 calls:
Slowest
477.0ms
(* g (* (* (* (cbrt (/ 1 a)) (cbrt 1/2)) (* (cbrt (/ 1 a)) (cbrt 1/2))) (* (cbrt (/ 1 a)) (cbrt 1/2))))
195.0ms
(* (cbrt 1/2) (* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (pow (cbrt -1) 2)))
159.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
80.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))
68.0ms
(* g (* (/ 1 a) 1/2))

prune883.0ms

Pruning

20 alts after pruning (19 fresh and 1 done)

Merged error: 0.0b

regimes788.0ms

Accuracy

0% (0.8b remaining)

Error of 0.9b against oracle of 0.0b and baseline of 0.9b

bsearch2.0ms

end0.0ms

sample1.7s

Algorithm
intervals