Average Error: 2.8 → 8.1
Time: 14.5s
Precision: 64
\[\frac{x \cdot \frac{\sin y}{y}}{z}\]
\[\frac{\frac{x \cdot \sin y}{y}}{z}\]
\frac{x \cdot \frac{\sin y}{y}}{z}
\frac{\frac{x \cdot \sin y}{y}}{z}
double f(double x, double y, double z) {
        double r365772 = x;
        double r365773 = y;
        double r365774 = sin(r365773);
        double r365775 = r365774 / r365773;
        double r365776 = r365772 * r365775;
        double r365777 = z;
        double r365778 = r365776 / r365777;
        return r365778;
}

double f(double x, double y, double z) {
        double r365779 = x;
        double r365780 = y;
        double r365781 = sin(r365780);
        double r365782 = r365779 * r365781;
        double r365783 = r365782 / r365780;
        double r365784 = z;
        double r365785 = r365783 / r365784;
        return r365785;
}

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.8
Target0.4
Herbie8.1
\[\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 3 regimes
  2. if x < -1.7143815842868617e+86

    1. Initial program 0.2

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

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

    if -1.7143815842868617e+86 < x < 5.988929035362862e-61

    1. Initial program 4.7

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

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

    if 5.988929035362862e-61 < x

    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}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification8.1

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

Reproduce

herbie shell --seed 2019308 
(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))