Average Error: 45.3 → 0
Time: 4.4s
Precision: 64
Internal Precision: 128
\[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
\[-1\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original45.3
Target0
Herbie0
\[-1\]

Derivation

  1. Initial program 45.3

    \[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
  2. Simplified0

    \[\leadsto \color{blue}{-1}\]
  3. Final simplification0

    \[\leadsto -1\]

Reproduce

herbie shell --seed 2019016 +o rules:numerics
(FPCore (x y z)
  :name "simple fma test"

  :herbie-target
  -1

  (- (fma x y z) (+ 1 (+ (* x y) z))))

Details

Time bar (total: 4.2s)Debug log

sample91.0ms

Algorithm
intervals
Results
256×(pre true 80)
84×(body real 1280)
68×(body real 80)
53×(body real 640)
24×(body real 2560)
19×(body real 320)
(body real 160)

simplify502.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
502.0ms
(- (fma x y z) (+ 1 (+ (* x y) z)))

prune15.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize1.0ms

Local error

Found 0 expressions with local error:

rewrite0.0ms

Algorithm
rewrite-expression-head
Rules
Counts
0 → 0
Calls
0 calls:
Slowest

series0.0ms

Counts
0 → 0
Calls
0 calls:
Slowest

simplify0.0ms

Counts
0 → 0
Calls
0 calls:
Slowest

prune4.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample3.5s

Algorithm
intervals
Results
8000×(pre true 80)
2621×(body real 1280)
2072×(body real 80)
1618×(body real 640)
729×(body real 320)
609×(body real 2560)
351×(body real 160)