Average Error: 25.9 → 25.8
Time: 14.2s
Precision: 64
Internal Precision: 320
\[\frac{a \cdot c + b \cdot d}{{c}^{2} + {d}^{2}}\]
\[\frac{\frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}\]

Error

Bits error versus a

Bits error versus c

Bits error versus b

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 25.9

    \[\frac{a \cdot c + b \cdot d}{{c}^{2} + {d}^{2}}\]
  2. Initial simplification25.9

    \[\leadsto \frac{a \cdot c + b \cdot d}{d \cdot d + c \cdot c}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt25.9

    \[\leadsto \frac{a \cdot c + b \cdot d}{\color{blue}{\sqrt{d \cdot d + c \cdot c} \cdot \sqrt{d \cdot d + c \cdot c}}}\]
  5. Applied associate-/r*25.8

    \[\leadsto \color{blue}{\frac{\frac{a \cdot c + b \cdot d}{\sqrt{d \cdot d + c \cdot c}}}{\sqrt{d \cdot d + c \cdot c}}}\]
  6. Final simplification25.8

    \[\leadsto \frac{\frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}\]

Runtime

Time bar (total: 14.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (a c b d)
  :name "(a*c + b*d)/(c^2 + d^2)"
  (/ (+ (* a c) (* b d)) (+ (pow c 2) (pow d 2))))