Average Error: 0.1 → 0.1
Time: 5.3s
Precision: 64
Internal Precision: 128
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[(0.954929658551372 \cdot x + \left(\left(\left(-0.12900613773279798\right) \cdot \left(x \cdot x\right)\right) \cdot x\right))_*\]

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Initial simplification0.1

    \[\leadsto (\left(-0.12900613773279798\right) \cdot \left({x}^{3}\right) + \left(0.954929658551372 \cdot x\right))_*\]
  3. Taylor expanded around inf 0.1

    \[\leadsto \color{blue}{0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}}\]
  4. Using strategy rm
  5. Applied fma-neg0.1

    \[\leadsto \color{blue}{(0.954929658551372 \cdot x + \left(-0.12900613773279798 \cdot {x}^{3}\right))_*}\]
  6. Using strategy rm
  7. Applied unpow30.1

    \[\leadsto (0.954929658551372 \cdot x + \left(-0.12900613773279798 \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot x\right)}\right))_*\]
  8. Applied associate-*r*0.1

    \[\leadsto (0.954929658551372 \cdot x + \left(-\color{blue}{\left(0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x}\right))_*\]
  9. Final simplification0.1

    \[\leadsto (0.954929658551372 \cdot x + \left(\left(\left(-0.12900613773279798\right) \cdot \left(x \cdot x\right)\right) \cdot x\right))_*\]

Reproduce

herbie shell --seed 2018362 +o rules:numerics
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))

Details

Time bar (total: 2.9s)Debug log

start116.0ms

Algorithm
intervals

setup98.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize15.0ms

Local error

Found 1 expressions with local error:

0.1b
(fma (- 0.12900613773279798) (pow x 3) (* 0.954929658551372 x))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

7.0ms
(fma (- 0.12900613773279798) (pow x 3) (* 0.954929658551372 x))

series88.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

88.0ms
(fma (- 0.12900613773279798) (pow x 3) (* 0.954929658551372 x))

simplify200.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

71.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
65.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
63.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))

prune135.0ms

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 0.0b

localize5.0ms

Local error

Found 2 expressions with local error:

0.1b
(* 0.12900613773279798 (pow x 3))
0.0b
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
2 → 31
Calls

2 calls. Slowest were:

2.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
1.0ms
(* 0.12900613773279798 (pow x 3))

series66.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

50.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
16.0ms
(* 0.12900613773279798 (pow x 3))

simplify475.0ms

Counts
13 → 37
Calls

13 calls. Slowest were:

92.0ms
(/ (exp (* 0.954929658551372 x)) (exp (* 0.12900613773279798 (pow x 3))))
73.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
72.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))

prune379.0ms

Pruning

5 alts after pruning (4 fresh and 1 done)

Merged error: 0b

localize13.0ms

Local error

Found 2 expressions with local error:

0.1b
(* 0.12900613773279798 (pow x 3))
0.0b
(fma 0.954929658551372 x (- (* 0.12900613773279798 (pow x 3))))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
2 → 25
Calls

2 calls. Slowest were:

2.0ms
(* 0.12900613773279798 (pow x 3))
0.0ms
(fma 0.954929658551372 x (- (* 0.12900613773279798 (pow x 3))))

series76.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

47.0ms
(fma 0.954929658551372 x (- (* 0.12900613773279798 (pow x 3))))
29.0ms
(* 0.12900613773279798 (pow x 3))

simplify163.0ms

Counts
10 → 31
Calls

10 calls. Slowest were:

53.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
53.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
36.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))

prune332.0ms

Pruning

5 alts after pruning (3 fresh and 2 done)

Merged error: 0b

localize21.0ms

Local error

Found 3 expressions with local error:

0.1b
(* 0.12900613773279798 (* x x))
0.1b
(* (* 0.12900613773279798 (* x x)) x)
0.0b
(fma 0.954929658551372 x (- (* (* 0.12900613773279798 (* x x)) x)))

rewrite9.0ms

Algorithm
rewrite-expression-head
Counts
3 → 32
Calls

3 calls. Slowest were:

6.0ms
(* (* 0.12900613773279798 (* x x)) x)
2.0ms
(* 0.12900613773279798 (* x x))
0.0ms
(fma 0.954929658551372 x (- (* (* 0.12900613773279798 (* x x)) x)))

series99.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

60.0ms
(fma 0.954929658551372 x (- (* (* 0.12900613773279798 (* x x)) x)))
23.0ms
(* 0.12900613773279798 (* x x))
16.0ms
(* (* 0.12900613773279798 (* x x)) x)

simplify237.0ms

Counts
9 → 41
Calls

9 calls. Slowest were:

72.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
71.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
45.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))

prune359.0ms

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

regimes33.0ms

Accuracy

0% (0.1b remaining)

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

bsearch10.0ms