Average Error: 61.8 → 0.3
Time: 6.6s
Precision: 64
Internal Precision: 128
\[\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right)\]
\[\left(3.9999999999999997 \cdot 10^{-32} \cdot t\right) \cdot t\]

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original61.8
Target50.5
Herbie0.3
\[(\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right))_*\]

Derivation

  1. Initial program 61.8

    \[\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right)\]
  2. Initial simplification0.4

    \[\leadsto \left(2 \cdot 10^{-16} \cdot t\right) \cdot \left(2 \cdot 10^{-16} \cdot t\right)\]
  3. Using strategy rm
  4. Applied associate-*r*0.3

    \[\leadsto \color{blue}{\left(\left(2 \cdot 10^{-16} \cdot t\right) \cdot 2 \cdot 10^{-16}\right) \cdot t}\]
  5. Taylor expanded around inf 0.3

    \[\leadsto \color{blue}{\left(3.9999999999999997 \cdot 10^{-32} \cdot t\right)} \cdot t\]
  6. Final simplification0.3

    \[\leadsto \left(3.9999999999999997 \cdot 10^{-32} \cdot t\right) \cdot t\]

Reproduce

herbie shell --seed 2018362 
(FPCore (t)
  :name "fma_test1"
  :pre (<= 0.9 t 1.1)

  :herbie-target
  (fma (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16)) (- -1 (* 2 (* t 2e-16))))

  (+ (* (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16))) (- -1 (* 2 (* t 2e-16)))))

Details

Time bar (total: 3.5s)Debug log

start84.0ms

Algorithm
intervals

setup1.7s

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.4b

localize12.0ms

Local error

Found 1 expressions with local error:

0.4b
(* (* 2e-16 t) (* 2e-16 t))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
1 → 16
Calls

1 calls. Slowest were:

11.0ms
(* (* 2e-16 t) (* 2e-16 t))

series19.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

19.0ms
(* (* 2e-16 t) (* 2e-16 t))

simplify782.0ms

Counts
9 → 19
Calls

9 calls. Slowest were:

708.0ms
(* (* (* (* 2e-16 t) (* 2e-16 t)) (* 2e-16 t)) (* (* (* 2e-16 t) (* 2e-16 t)) (* 2e-16 t)))
25.0ms
(+ (log (* 2e-16 t)) (log (* 2e-16 t)))
17.0ms
(* (* 2e-16 t) (* 2e-16 t))

prune194.0ms

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.0b

localize10.0ms

Local error

Found 2 expressions with local error:

0.3b
(* (* (* 2e-16 t) 2e-16) t)
0.2b
(* (* 2e-16 t) 2e-16)

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
2 → 18
Calls

2 calls. Slowest were:

5.0ms
(* (* (* 2e-16 t) 2e-16) t)
2.0ms
(* (* 2e-16 t) 2e-16)

series20.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

13.0ms
(* (* (* 2e-16 t) 2e-16) t)
7.0ms
(* (* 2e-16 t) 2e-16)

simplify17.0ms

Counts
7 → 24
Calls

7 calls. Slowest were:

4.0ms
(* 3.9999999999999997e-32 (pow t 2))
4.0ms
(* 3.9999999999999997e-32 (pow t 2))
4.0ms
(* 3.9999999999999997e-32 (pow t 2))

prune158.0ms

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.0b

localize9.0ms

Local error

Found 1 expressions with local error:

0.2b
(* (* 3.9999999999999997e-32 t) t)

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
1 → 9
Calls

1 calls. Slowest were:

4.0ms
(* (* 3.9999999999999997e-32 t) t)

series23.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

23.0ms
(* (* 3.9999999999999997e-32 t) t)

simplify25.0ms

Counts
3 → 12
Calls

3 calls. Slowest were:

9.0ms
(* 3.9999999999999997e-32 (pow t 2))
8.0ms
(* 3.9999999999999997e-32 (pow t 2))
7.0ms
(* 3.9999999999999997e-32 (pow t 2))

prune128.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.0b

localize9.0ms

Local error

Found 2 expressions with local error:

0.3b
(* 2e-16 (* t (* 2e-16 t)))
0.2b
(* t (* 2e-16 t))

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
2 → 18
Calls

2 calls. Slowest were:

4.0ms
(* 2e-16 (* t (* 2e-16 t)))
1.0ms
(* t (* 2e-16 t))

series38.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

20.0ms
(* t (* 2e-16 t))
18.0ms
(* 2e-16 (* t (* 2e-16 t)))

simplify38.0ms

Counts
7 → 24
Calls

7 calls. Slowest were:

7.0ms
(* 3.9999999999999997e-32 (pow t 2))
6.0ms
(* 3.9999999999999997e-32 (pow t 2))
6.0ms
(* 3.9999999999999997e-32 (pow t 2))

prune164.0ms

Pruning

8 alts after pruning (6 fresh and 2 done)

Merged error: 0.0b

regimes51.0ms

Accuracy

0% (0.3b remaining)

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

bsearch1.0ms