Average Error: 2.7 → 2.7
Time: 11.5s
Precision: 64
\[\frac{x \cdot \frac{\sin y}{y}}{z}\]
\[\frac{x}{z \cdot \frac{y}{\sin y}}\]
\frac{x \cdot \frac{\sin y}{y}}{z}
\frac{x}{z \cdot \frac{y}{\sin y}}
double f(double x, double y, double z) {
        double r330290 = x;
        double r330291 = y;
        double r330292 = sin(r330291);
        double r330293 = r330292 / r330291;
        double r330294 = r330290 * r330293;
        double r330295 = z;
        double r330296 = r330294 / r330295;
        return r330296;
}

double f(double x, double y, double z) {
        double r330297 = x;
        double r330298 = z;
        double r330299 = y;
        double r330300 = sin(r330299);
        double r330301 = r330299 / r330300;
        double r330302 = r330298 * r330301;
        double r330303 = r330297 / r330302;
        return r330303;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.7
Target0.3
Herbie2.7
\[\begin{array}{l} \mathbf{if}\;z \lt -4.217372020342714661850238929213415773451 \cdot 10^{-29}:\\ \;\;\;\;\frac{x \cdot \frac{1}{\frac{y}{\sin y}}}{z}\\ \mathbf{elif}\;z \lt 4.446702369113811028051510715777703865332 \cdot 10^{64}:\\ \;\;\;\;\frac{x}{z \cdot \frac{y}{\sin y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{1}{\frac{y}{\sin y}}}{z}\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if z < -5.867173042175517e+38 or 2.8069313034736843e-68 < z

    1. Initial program 0.3

      \[\frac{x \cdot \frac{\sin y}{y}}{z}\]
    2. Using strategy rm
    3. Applied clear-num0.4

      \[\leadsto \frac{x \cdot \color{blue}{\frac{1}{\frac{y}{\sin y}}}}{z}\]

    if -5.867173042175517e+38 < z < 2.8069313034736843e-68

    1. Initial program 5.8

      \[\frac{x \cdot \frac{\sin y}{y}}{z}\]
    2. Using strategy rm
    3. Applied associate-/l*0.2

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{\frac{\sin y}{y}}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.7

    \[\leadsto \frac{x}{z \cdot \frac{y}{\sin y}}\]

Reproduce

herbie shell --seed 2019298 
(FPCore (x y z)
  :name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< z -4.21737202034271466e-29) (/ (* x (/ 1 (/ y (sin y)))) z) (if (< z 4.44670236911381103e64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1 (/ y (sin y)))) z)))

  (/ (* x (/ (sin y) y)) z))