Average Error: 0.0 → 0.1
Time: 8.7s
Precision: 64
\[\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\]
\[\mathsf{fma}\left(\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, -x\right)\]
\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x
\mathsf{fma}\left(\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, -x\right)
double f(double x) {
        double r65200 = 2.30753;
        double r65201 = x;
        double r65202 = 0.27061;
        double r65203 = r65201 * r65202;
        double r65204 = r65200 + r65203;
        double r65205 = 1.0;
        double r65206 = 0.99229;
        double r65207 = 0.04481;
        double r65208 = r65201 * r65207;
        double r65209 = r65206 + r65208;
        double r65210 = r65201 * r65209;
        double r65211 = r65205 + r65210;
        double r65212 = r65204 / r65211;
        double r65213 = r65212 - r65201;
        return r65213;
}

double f(double x) {
        double r65214 = 1.0;
        double r65215 = 1.0;
        double r65216 = x;
        double r65217 = 0.99229;
        double r65218 = 0.04481;
        double r65219 = r65216 * r65218;
        double r65220 = r65217 + r65219;
        double r65221 = r65216 * r65220;
        double r65222 = r65215 + r65221;
        double r65223 = sqrt(r65222);
        double r65224 = r65214 / r65223;
        double r65225 = 2.30753;
        double r65226 = 0.27061;
        double r65227 = r65216 * r65226;
        double r65228 = r65225 + r65227;
        double r65229 = r65228 / r65223;
        double r65230 = -r65216;
        double r65231 = fma(r65224, r65229, r65230);
        return r65231;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.1

    \[\leadsto \frac{2.30753 + x \cdot 0.27061000000000002}{\color{blue}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}} - x\]
  4. Applied *-un-lft-identity0.1

    \[\leadsto \frac{\color{blue}{1 \cdot \left(2.30753 + x \cdot 0.27061000000000002\right)}}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - x\]
  5. Applied times-frac0.1

    \[\leadsto \color{blue}{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}} - x\]
  6. Applied fma-neg0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, -x\right)}\]
  7. Final simplification0.1

    \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, -x\right)\]

Reproduce

herbie shell --seed 2019198 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, C"
  (- (/ (+ 2.30753 (* x 0.27061)) (+ 1.0 (* x (+ 0.99229 (* x 0.04481))))) x))