Average Error: 0.9 → 0.6
Time: 23.8s
Precision: 64
\[\frac{\sinh \left(k - k \cdot x\right)}{\sinh k}\]
\[\frac{-1}{3} \cdot \left(k \cdot \left(x \cdot k\right)\right) + \left(1 - x\right)\]
\frac{\sinh \left(k - k \cdot x\right)}{\sinh k}
\frac{-1}{3} \cdot \left(k \cdot \left(x \cdot k\right)\right) + \left(1 - x\right)
double f(double k, double x) {
        double r30034149 = k;
        double r30034150 = x;
        double r30034151 = r30034149 * r30034150;
        double r30034152 = r30034149 - r30034151;
        double r30034153 = sinh(r30034152);
        double r30034154 = sinh(r30034149);
        double r30034155 = r30034153 / r30034154;
        return r30034155;
}

double f(double k, double x) {
        double r30034156 = -0.3333333333333333;
        double r30034157 = k;
        double r30034158 = x;
        double r30034159 = r30034158 * r30034157;
        double r30034160 = r30034157 * r30034159;
        double r30034161 = r30034156 * r30034160;
        double r30034162 = 1.0;
        double r30034163 = r30034162 - r30034158;
        double r30034164 = r30034161 + r30034163;
        return r30034164;
}

Error

Bits error versus k

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.9

    \[\frac{\sinh \left(k - k \cdot x\right)}{\sinh k}\]
  2. Taylor expanded around 0 0.6

    \[\leadsto \color{blue}{1 - \left(x + \frac{1}{3} \cdot \left(x \cdot {k}^{2}\right)\right)}\]
  3. Simplified0.6

    \[\leadsto \color{blue}{\left(1 - x\right) + \frac{-1}{3} \cdot \left(k \cdot \left(x \cdot k\right)\right)}\]
  4. Final simplification0.6

    \[\leadsto \frac{-1}{3} \cdot \left(k \cdot \left(x \cdot k\right)\right) + \left(1 - x\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (k x)
  :name "sinh(k - k * x) / sinh(k)"
  (/ (sinh (- k (* k x))) (sinh k)))