Average Error: 0.1 → 0.1
Time: 4.6s
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({x}^{3} \cdot \left(-0.12900613773279798\right)\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. Simplified0.1

    \[\leadsto \color{blue}{(\left(-0.12900613773279798\right) \cdot \left({x}^{3}\right) + \left(0.954929658551372 \cdot x\right))_*}\]
  3. Taylor expanded around 0 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. Final simplification0.1

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

Reproduce

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

Details

Time bar (total: 4.2s)Debug log

sample260.0ms

Algorithm
intervals

simplify142.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

142.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x)))

prune38.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize70.0ms

Local error

Found 1 expressions with local error:

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

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

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

series121.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify195.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

72.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
65.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
57.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))

prune125.0ms

Pruning

4 alts after pruning (4 fresh and 0 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)))
2.0ms
(* 0.12900613773279798 (pow x 3))

series93.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

71.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))
22.0ms
(* 0.12900613773279798 (pow x 3))

simplify488.0ms

Counts
13 → 37
Calls

13 calls. Slowest were:

111.0ms
(/ (exp (* 0.954929658551372 x)) (exp (* 0.12900613773279798 (pow x 3))))
99.0ms
(fma 0.954929658551372 x (- (* (pow x 3) 0.12900613773279798)))
75.0ms
(- (* 0.954929658551372 x) (* 0.12900613773279798 (pow x 3)))

prune248.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.0b

localize6.0ms

Local error

Found 1 expressions with local error:

0.1b
(* 0.12900613773279798 (pow x 3))

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
1 → 15
Calls

1 calls. Slowest were:

1.0ms
(* 0.12900613773279798 (pow x 3))

series24.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

24.0ms
(* 0.12900613773279798 (pow x 3))

simplify44.0ms

Counts
7 → 18
Calls

7 calls. Slowest were:

11.0ms
(* 0.12900613773279798 (pow x 3))
11.0ms
(* 0.12900613773279798 (pow x 3))
10.0ms
(* 0.12900613773279798 (pow x 3))

prune211.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize26.0ms

Local error

Found 1 expressions with local error:

0.2b
(* (* 0.12900613773279798 x) (* x x))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
1 → 15
Calls

1 calls. Slowest were:

4.0ms
(* (* 0.12900613773279798 x) (* x x))

series16.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

16.0ms
(* (* 0.12900613773279798 x) (* x x))

simplify444.0ms

Counts
6 → 18
Calls

6 calls. Slowest were:

383.0ms
(* (* (* (* 0.12900613773279798 x) (* 0.12900613773279798 x)) (* 0.12900613773279798 x)) (* (* (* x x) (* x x)) (* x x)))
19.0ms
(+ (log (* 0.12900613773279798 x)) (log (* x x)))
11.0ms
(* 0.12900613773279798 (pow x 3))

prune159.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

regimes80.0ms

Accuracy

0% (0.1b remaining)

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

bsearch5.0ms

end0.0ms

sample1.4s

Algorithm
intervals