Average Error: 15.0 → 0.8
Time: 14.8s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\sqrt[3]{\frac{\frac{1}{2}}{a}} \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.0

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

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

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

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

    \[\leadsto \sqrt[3]{g} \cdot \color{blue}{\sqrt[3]{\frac{-1}{2} \cdot \frac{-1}{a}}}\]
  9. Simplified0.8

    \[\leadsto \sqrt[3]{g} \cdot \sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{a}}}\]
  10. Final simplification0.8

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

Reproduce

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

Details

Time bar (total: 9.8s)Debug log

start99.0ms

Algorithm
intervals

setup11.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 15.1b

localize8.0ms

Local error

Found 1 expressions with local error:

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

rewrite1.0ms

Algorithm
rewrite-expression-head
Counts
1 → 15
Calls

1 calls. Slowest were:

1.0ms
(cbrt (/ g (* 2 a)))

series140.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

140.0ms
(cbrt (/ g (* 2 a)))

simplify514.0ms

Counts
8 → 18
Calls

8 calls. Slowest were:

283.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
181.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))))
42.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))

prune223.0ms

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.2b

localize10.0ms

Local error

Found 3 expressions with local error:

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

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
3 → 50
Calls

3 calls. Slowest were:

4.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 were:

357.0ms
(cbrt (/ 1 (* 2 a)))
259.0ms
(cbrt g)
141.0ms
(* (cbrt g) (cbrt (/ 1 (* 2 a))))

simplify971.0ms

Counts
28 → 59
Calls

28 calls. Slowest were:

567.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
165.0ms
(* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (* (cbrt -1) (cbrt -1/2)))
66.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))

prune715.0ms

Pruning

19 alts after pruning (18 fresh and 1 done)

Merged error: 0.0b

localize13.0ms

Local error

Found 4 expressions with local error:

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

rewrite30.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

17.0ms
(* (cbrt g) (* (cbrt -1/2) (cbrt (/ -1 a))))
10.0ms
(* (cbrt -1/2) (cbrt (/ -1 a)))
1.0ms
(cbrt (/ -1 a))

series1.1s

Counts
4 → 12
Calls

4 calls. Slowest were:

392.0ms
(* (cbrt -1/2) (cbrt (/ -1 a)))
291.0ms
(cbrt (/ -1 a))
264.0ms
(cbrt g)
179.0ms
(* (cbrt g) (* (cbrt -1/2) (cbrt (/ -1 a))))

simplify1.4s

Counts
42 → 84
Calls

42 calls. Slowest were:

562.0ms
(* g (* (* (* (cbrt -1/2) (cbrt (/ -1 a))) (* (cbrt -1/2) (cbrt (/ -1 a)))) (* (cbrt -1/2) (cbrt (/ -1 a)))))
269.0ms
(* (cbrt -1) (* (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))) (cbrt -1/2)))
174.0ms
(* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (* (cbrt -1) (cbrt -1/2)))

prune1.1s

Pruning

19 alts after pruning (18 fresh and 1 done)

Merged error: 0.0b

localize15.0ms

Local error

Found 3 expressions with local error:

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

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
3 → 50
Calls

3 calls. Slowest were:

8.0ms
(* (cbrt g) (cbrt (/ 1/2 a)))
1.0ms
(cbrt (/ 1/2 a))
0.0ms
(cbrt g)

series723.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

334.0ms
(cbrt (/ 1/2 a))
243.0ms
(cbrt g)
147.0ms
(* (cbrt g) (cbrt (/ 1/2 a)))

simplify543.0ms

Counts
28 → 59
Calls

28 calls. Slowest were:

245.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log (/ 1 a)) (log (/ 1 g))))))
165.0ms
(* (exp (* 1/3 (- (log (/ -1 a)) (log (/ -1 g))))) (* (cbrt -1) (cbrt -1/2)))
65.0ms
(* (cbrt 1/2) (exp (* 1/3 (- (log g) (log a)))))

prune594.0ms

Pruning

19 alts after pruning (17 fresh and 2 done)

Merged error: 0.0b

regimes766.0ms

Accuracy

0% (0.8b remaining)

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

bsearch1.0ms