Linear.Quaternion:$ccosh from linear-1.19.1.3

Percentage Accurate: 89.1% → 99.9%
Time: 9.0s
Alternatives: 11
Speedup: 205.0×

Specification

?
\[\frac{\sin x \cdot \sinh y}{x} \]

Your Program's Arguments

Results

Enter valid numbers for all inputs

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\frac{\sin x}{x} \cdot \sinh y \]
Derivation
  1. Initial program 85.6%

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Step-by-step derivation
    1. associate-*l/99.9%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
  4. Final simplification99.9%

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

Alternative 2: 86.3% accurate, 0.7× speedup?

\[\begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 5 \cdot 10^{+104}:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\sinh y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if (sinh.f64 y) < -inf.0

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    4. Taylor expanded in x around 0 86.5%

      \[\leadsto \color{blue}{1} \cdot \sinh y \]

    if -inf.0 < (sinh.f64 y) < 4.9999999999999997e104

    1. Initial program 72.5%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 71.4%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Step-by-step derivation
      1. *-commutative71.4%

        \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
      2. associate-/l*98.1%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    6. Simplified98.1%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/98.7%

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot y} \]
    8. Applied egg-rr98.7%

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

    if 4.9999999999999997e104 < (sinh.f64 y)

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    4. Taylor expanded in x around 0 81.4%

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot {x}^{2}\right)} \cdot \sinh y \]
    5. Step-by-step derivation
      1. *-commutative81.4%

        \[\leadsto \left(1 + \color{blue}{{x}^{2} \cdot -0.16666666666666666}\right) \cdot \sinh y \]
      2. unpow281.4%

        \[\leadsto \left(1 + \color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666\right) \cdot \sinh y \]
    6. Simplified81.4%

      \[\leadsto \color{blue}{\left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)} \cdot \sinh y \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sinh y \leq -\infty:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;\sinh y \leq 5 \cdot 10^{+104}:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\sinh y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\\ \end{array} \]

Alternative 3: 99.9% accurate, 1.0× speedup?

\[\sin x \cdot \frac{\sinh y}{x} \]
Derivation
  1. Initial program 85.6%

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Step-by-step derivation
    1. associate-*r/99.9%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
  4. Final simplification99.9%

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

Alternative 4: 85.9% accurate, 1.9× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-5}:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;y \leq 2400000000:\\ \;\;\;\;\sin x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if y < -4.8000000000000001e-5 or 2.4e9 < y

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    4. Taylor expanded in x around 0 78.5%

      \[\leadsto \color{blue}{1} \cdot \sinh y \]

    if -4.8000000000000001e-5 < y < 2.4e9

    1. Initial program 72.7%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 70.9%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Step-by-step derivation
      1. *-commutative70.9%

        \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
      2. associate-/l*97.4%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    6. Simplified97.4%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    7. Step-by-step derivation
      1. clear-num97.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{x}{y}}{\sin x}}} \]
      2. associate-/r/97.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{x}{y}} \cdot \sin x} \]
      3. clear-num98.0%

        \[\leadsto \color{blue}{\frac{y}{x}} \cdot \sin x \]
    8. Applied egg-rr98.0%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \sin x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-5}:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;y \leq 2400000000:\\ \;\;\;\;\sin x \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]

Alternative 5: 86.0% accurate, 1.9× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq -0.000106:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;y \leq 2400000000:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if y < -1.06e-4 or 2.4e9 < y

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    4. Taylor expanded in x around 0 78.5%

      \[\leadsto \color{blue}{1} \cdot \sinh y \]

    if -1.06e-4 < y < 2.4e9

    1. Initial program 72.7%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 70.9%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Step-by-step derivation
      1. *-commutative70.9%

        \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
      2. associate-/l*97.4%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    6. Simplified97.4%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/98.0%

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot y} \]
    8. Applied egg-rr98.0%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.000106:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;y \leq 2400000000:\\ \;\;\;\;\frac{\sin x}{x} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]

Alternative 6: 74.1% accurate, 2.0× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{-8}:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;y \leq 2400000000:\\ \;\;\;\;\frac{1}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{x \cdot x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if y < -4.0000000000000001e-8 or 2.4e9 < y

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \sinh y} \]
    4. Taylor expanded in x around 0 78.5%

      \[\leadsto \color{blue}{1} \cdot \sinh y \]

    if -4.0000000000000001e-8 < y < 2.4e9

    1. Initial program 72.7%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Step-by-step derivation
      1. associate-*r/72.7%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
      2. associate-/l*99.2%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{\sinh y}}} \]
      3. clear-num99.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{x}{\sinh y}}{\sin x}}} \]
    5. Applied egg-rr99.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{\frac{x}{\sinh y}}{\sin x}}} \]
    6. Taylor expanded in y around 0 70.3%

      \[\leadsto \frac{1}{\color{blue}{\frac{x}{y \cdot \sin x}}} \]
    7. Step-by-step derivation
      1. associate-/r*97.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{x}{y}}{\sin x}}} \]
    8. Simplified97.4%

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{x}{y}}{\sin x}}} \]
    9. Taylor expanded in x around 0 74.9%

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{{x}^{2}}{y}}} \]
    10. Step-by-step derivation
      1. unpow274.9%

        \[\leadsto \frac{1}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{\color{blue}{x \cdot x}}{y}} \]
    11. Simplified74.9%

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{x \cdot x}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{-8}:\\ \;\;\;\;\sinh y\\ \mathbf{elif}\;y \leq 2400000000:\\ \;\;\;\;\frac{1}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{x \cdot x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\sinh y\\ \end{array} \]

Alternative 7: 46.6% accurate, 12.0× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq -660:\\ \;\;\;\;\frac{x \cdot y}{x}\\ \mathbf{elif}\;y \leq 0.0052:\\ \;\;\;\;\frac{1}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{x \cdot x}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if y < -660

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 4.3%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Taylor expanded in x around 0 13.3%

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

    if -660 < y < 0.0051999999999999998

    1. Initial program 72.1%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Step-by-step derivation
      1. associate-*r/72.1%

        \[\leadsto \color{blue}{\frac{\sin x \cdot \sinh y}{x}} \]
      2. associate-/l*99.2%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{\sinh y}}} \]
      3. clear-num99.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{x}{\sinh y}}{\sin x}}} \]
    5. Applied egg-rr99.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{\frac{x}{\sinh y}}{\sin x}}} \]
    6. Taylor expanded in y around 0 71.5%

      \[\leadsto \frac{1}{\color{blue}{\frac{x}{y \cdot \sin x}}} \]
    7. Step-by-step derivation
      1. associate-/r*99.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{x}{y}}{\sin x}}} \]
    8. Simplified99.2%

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{x}{y}}{\sin x}}} \]
    9. Taylor expanded in x around 0 76.6%

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{{x}^{2}}{y}}} \]
    10. Step-by-step derivation
      1. unpow276.6%

        \[\leadsto \frac{1}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{\color{blue}{x \cdot x}}{y}} \]
    11. Simplified76.6%

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{x \cdot x}{y}}} \]

    if 0.0051999999999999998 < y

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 5.0%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Step-by-step derivation
      1. *-commutative5.0%

        \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
      2. associate-/l*33.5%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    6. Simplified33.5%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    7. Taylor expanded in x around 0 23.0%

      \[\leadsto \color{blue}{y + -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right)} \]
    8. Step-by-step derivation
      1. unpow223.0%

        \[\leadsto y + -0.16666666666666666 \cdot \left(y \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
    9. Simplified23.0%

      \[\leadsto \color{blue}{y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -660:\\ \;\;\;\;\frac{x \cdot y}{x}\\ \mathbf{elif}\;y \leq 0.0052:\\ \;\;\;\;\frac{1}{\frac{1}{y} + 0.16666666666666666 \cdot \frac{x \cdot x}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\ \end{array} \]

Alternative 8: 34.5% accurate, 18.4× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+94}:\\ \;\;\;\;\frac{x \cdot y}{x}\\ \mathbf{elif}\;y \leq 0.0052:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if y < -1e94

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 5.0%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Taylor expanded in x around 0 20.1%

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

    if -1e94 < y < 0.0051999999999999998

    1. Initial program 75.9%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 62.7%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Step-by-step derivation
      1. *-commutative62.7%

        \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
      2. associate-/l*89.2%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    6. Simplified89.2%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    7. Taylor expanded in x around 0 52.4%

      \[\leadsto \color{blue}{y} \]

    if 0.0051999999999999998 < y

    1. Initial program 100.0%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 5.0%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Step-by-step derivation
      1. *-commutative5.0%

        \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
      2. associate-/l*33.5%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    6. Simplified33.5%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    7. Taylor expanded in x around 0 23.0%

      \[\leadsto \color{blue}{y + -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right)} \]
    8. Step-by-step derivation
      1. +-commutative23.0%

        \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right) + y} \]
      2. *-commutative23.0%

        \[\leadsto -0.16666666666666666 \cdot \color{blue}{\left({x}^{2} \cdot y\right)} + y \]
      3. associate-*r*23.0%

        \[\leadsto \color{blue}{\left(-0.16666666666666666 \cdot {x}^{2}\right) \cdot y} + y \]
      4. *-commutative23.0%

        \[\leadsto \color{blue}{\left({x}^{2} \cdot -0.16666666666666666\right)} \cdot y + y \]
      5. unpow223.0%

        \[\leadsto \left(\color{blue}{\left(x \cdot x\right)} \cdot -0.16666666666666666\right) \cdot y + y \]
      6. associate-*r*23.0%

        \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \cdot y + y \]
      7. *-lft-identity23.0%

        \[\leadsto \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) \cdot y + \color{blue}{1 \cdot y} \]
      8. distribute-rgt-in23.0%

        \[\leadsto \color{blue}{y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right) + 1\right)} \]
      9. fma-udef23.0%

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)} \]
    9. Simplified23.0%

      \[\leadsto \color{blue}{y \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)} \]
    10. Taylor expanded in x around inf 20.8%

      \[\leadsto y \cdot \color{blue}{\left(-0.16666666666666666 \cdot {x}^{2}\right)} \]
    11. Step-by-step derivation
      1. unpow220.8%

        \[\leadsto y \cdot \left(-0.16666666666666666 \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
      2. *-commutative20.8%

        \[\leadsto y \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot -0.16666666666666666\right)} \]
      3. associate-*l*20.8%

        \[\leadsto y \cdot \color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \]
    12. Simplified20.8%

      \[\leadsto y \cdot \color{blue}{\left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)} \]
    13. Taylor expanded in y around 0 20.8%

      \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right)} \]
    14. Step-by-step derivation
      1. unpow220.8%

        \[\leadsto -0.16666666666666666 \cdot \left(y \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
    15. Simplified20.8%

      \[\leadsto \color{blue}{-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+94}:\\ \;\;\;\;\frac{x \cdot y}{x}\\ \mathbf{elif}\;y \leq 0.0052:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\ \end{array} \]

Alternative 9: 32.2% accurate, 22.4× speedup?

\[\begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{+193} \lor \neg \left(x \leq 5 \cdot 10^{+96}\right):\\ \;\;\;\;\frac{x \cdot y}{x}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x < -3.3e193 or 5.0000000000000004e96 < x

    1. Initial program 99.9%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 45.8%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Taylor expanded in x around 0 21.2%

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

    if -3.3e193 < x < 5.0000000000000004e96

    1. Initial program 81.1%

      \[\frac{\sin x \cdot \sinh y}{x} \]
    2. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
    4. Taylor expanded in y around 0 37.5%

      \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
    5. Step-by-step derivation
      1. *-commutative37.5%

        \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
      2. associate-/l*74.6%

        \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    6. Simplified74.6%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
    7. Taylor expanded in x around 0 42.0%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{+193} \lor \neg \left(x \leq 5 \cdot 10^{+96}\right):\\ \;\;\;\;\frac{x \cdot y}{x}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 10: 36.3% accurate, 22.8× speedup?

\[y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right) \]
Derivation
  1. Initial program 85.6%

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Step-by-step derivation
    1. associate-*r/99.9%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
  4. Taylor expanded in y around 0 39.5%

    \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
  5. Step-by-step derivation
    1. *-commutative39.5%

      \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
    2. associate-/l*67.7%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
  6. Simplified67.7%

    \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
  7. Taylor expanded in x around 0 38.9%

    \[\leadsto \color{blue}{y + -0.16666666666666666 \cdot \left(y \cdot {x}^{2}\right)} \]
  8. Step-by-step derivation
    1. unpow238.9%

      \[\leadsto y + -0.16666666666666666 \cdot \left(y \cdot \color{blue}{\left(x \cdot x\right)}\right) \]
  9. Simplified38.9%

    \[\leadsto \color{blue}{y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)} \]
  10. Final simplification38.9%

    \[\leadsto y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right) \]

Alternative 11: 27.8% accurate, 205.0× speedup?

\[y \]
Derivation
  1. Initial program 85.6%

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Step-by-step derivation
    1. associate-*r/99.9%

      \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}} \]
  4. Taylor expanded in y around 0 39.5%

    \[\leadsto \color{blue}{\frac{y \cdot \sin x}{x}} \]
  5. Step-by-step derivation
    1. *-commutative39.5%

      \[\leadsto \frac{\color{blue}{\sin x \cdot y}}{x} \]
    2. associate-/l*67.7%

      \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
  6. Simplified67.7%

    \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{y}}} \]
  7. Taylor expanded in x around 0 33.0%

    \[\leadsto \color{blue}{y} \]
  8. Final simplification33.0%

    \[\leadsto y \]

Developer target: 99.9% accurate, 1.0× speedup?

\[\sin x \cdot \frac{\sinh y}{x} \]

Reproduce

?
herbie shell --seed 2023167 
(FPCore (x y)
  :name "Linear.Quaternion:$ccosh from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (* (sin x) (/ (sinh y) x))

  (/ (* (sin x) (sinh y)) x))