Average Error: 15.2 → 0.8
Time: 10.8s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\left(\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{a}}\right) \cdot \sqrt[3]{g}\]

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

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

    \[\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 inf 33.6

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

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

    \[\leadsto \left(\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{a}}\right) \cdot \sqrt[3]{g}\]

Reproduce

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

Details

Time bar (total: 9.3s)Debug log

sample49.0ms

Algorithm
intervals
Results
508×(pre true 80)
257×(body real 80)
251×(body nan 80)

simplify5.0ms

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

prune9.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 14.8b

localize19.0ms

Local error

Found 1 expressions with local error:

14.8b
(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)))

series117.0ms

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

simplify479.0ms

Counts
8 → 18
Calls
8 calls:
Slowest
250.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
162.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))))
54.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))
5.0ms
(cbrt (sqrt (/ g (* 2 a))))
3.0ms
(cbrt (* (cbrt (/ g (* 2 a))) (cbrt (/ g (* 2 a)))))

prune195.0ms

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 0.2b

localize10.0ms

Local error

Found 3 expressions with local error:

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

rewrite8.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
6.0ms
(/ (cbrt g) (cbrt (* 2 a)))
1.0ms
(cbrt (* 2 a))
0.0ms
(cbrt g)

series742.0ms

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

simplify562.0ms

Counts
42 → 63
Calls
42 calls:
Slowest
203.0ms
(/ (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))) (cbrt 2))
138.0ms
(/ (* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (cbrt -1)) (cbrt -2))
51.0ms
(/ (exp (* 1/3 (- (log g) (log a)))) (cbrt 2))
23.0ms
(/ (* (cbrt (cbrt g)) (cbrt (cbrt g))) (* (cbrt (cbrt (* 2 a))) (cbrt (cbrt (* 2 a)))))
15.0ms
(/ (* (cbrt (cbrt g)) (cbrt (cbrt g))) (cbrt 2))

prune599.0ms

Pruning

15 alts after pruning (14 fresh and 1 done)

Merged error: 0.1b

localize1.0ms

Local error

Found 3 expressions with local error:

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

rewrite8.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
6.0ms
(/ (cbrt g) (cbrt (* 2 a)))
1.0ms
(cbrt (* 2 a))
0.0ms
(cbrt g)

series818.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
352.0ms
(cbrt (* 2 a))
267.0ms
(cbrt g)
198.0ms
(/ (cbrt g) (cbrt (* 2 a)))

simplify623.0ms

Counts
42 → 63
Calls
42 calls:
Slowest
240.0ms
(/ (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))) (cbrt 2))
159.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))
21.0ms
(/ (* (cbrt (cbrt g)) (cbrt (cbrt g))) (* (cbrt (cbrt (* 2 a))) (cbrt (cbrt (* 2 a)))))
14.0ms
(/ (* (cbrt (cbrt g)) (cbrt (cbrt g))) (cbrt 2))

prune627.0ms

Pruning

15 alts after pruning (13 fresh and 2 done)

Merged error: 0.1b

localize17.0ms

Local error

Found 3 expressions with local error:

0.6b
(cbrt g)
0.6b
(cbrt (/ 1 (* 2 a)))
0.4b
(* (cbrt g) (cbrt (/ 1 (* 2 a))))

rewrite11.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
8.0ms
(* (cbrt g) (cbrt (/ 1 (* 2 a))))
1.0ms
(cbrt (/ 1 (* 2 a)))
0.0ms
(cbrt g)

series756.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
311.0ms
(cbrt (/ 1 (* 2 a)))
286.0ms
(cbrt g)
160.0ms
(* (cbrt g) (cbrt (/ 1 (* 2 a))))

simplify656.0ms

Counts
28 → 59
Calls
28 calls:
Slowest
207.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
194.0ms
(* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (* (cbrt -1) (cbrt -1/2)))
73.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))
47.0ms
(* g (/ 1 (* 2 a)))
45.0ms
(* g (/ 1 (* 2 a)))

prune540.0ms

Pruning

15 alts after pruning (13 fresh and 2 done)

Merged error: 0.0b

regimes630.0ms

Accuracy

0% (0.8b remaining)

Error of 0.8b against oracle of 0.1b and baseline of 0.8b

bsearch3.0ms

end0.0ms

sample1.8s

Algorithm
intervals
Results
15853×(pre true 80)
8001×(body real 80)
7852×(body nan 80)