Linear.Quaternion:$ctanh from linear-1.19.1.3

Percentage Accurate: 96.0% → 98.0%
Time: 7.1s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot \frac{\sin y}{y}}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x (/ (sin y) y)) z))
double code(double x, double y, double z) {
	return (x * (sin(y) / y)) / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (sin(y) / y)) / z
end function
public static double code(double x, double y, double z) {
	return (x * (Math.sin(y) / y)) / z;
}
def code(x, y, z):
	return (x * (math.sin(y) / y)) / z
function code(x, y, z)
	return Float64(Float64(x * Float64(sin(y) / y)) / z)
end
function tmp = code(x, y, z)
	tmp = (x * (sin(y) / y)) / z;
end
code[x_, y_, z_] := N[(N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \frac{\sin y}{y}}{z}
\end{array}

Sampling outcomes in binary64 precision:

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.

Initial Program: 96.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot \frac{\sin y}{y}}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x (/ (sin y) y)) z))
double code(double x, double y, double z) {
	return (x * (sin(y) / y)) / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (sin(y) / y)) / z
end function
public static double code(double x, double y, double z) {
	return (x * (Math.sin(y) / y)) / z;
}
def code(x, y, z):
	return (x * (math.sin(y) / y)) / z
function code(x, y, z)
	return Float64(Float64(x * Float64(sin(y) / y)) / z)
end
function tmp = code(x, y, z)
	tmp = (x * (sin(y) / y)) / z;
end
code[x_, y_, z_] := N[(N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \frac{\sin y}{y}}{z}
\end{array}

Alternative 1: 98.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sin y}{y}\\ t_1 := \frac{x \cdot t_0}{z}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-222}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (sin y) y)) (t_1 (/ (* x t_0) z)))
   (if (<= t_1 -5e-222) t_1 (* t_0 (/ x z)))))
double code(double x, double y, double z) {
	double t_0 = sin(y) / y;
	double t_1 = (x * t_0) / z;
	double tmp;
	if (t_1 <= -5e-222) {
		tmp = t_1;
	} else {
		tmp = t_0 * (x / z);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = sin(y) / y
    t_1 = (x * t_0) / z
    if (t_1 <= (-5d-222)) then
        tmp = t_1
    else
        tmp = t_0 * (x / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = Math.sin(y) / y;
	double t_1 = (x * t_0) / z;
	double tmp;
	if (t_1 <= -5e-222) {
		tmp = t_1;
	} else {
		tmp = t_0 * (x / z);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = math.sin(y) / y
	t_1 = (x * t_0) / z
	tmp = 0
	if t_1 <= -5e-222:
		tmp = t_1
	else:
		tmp = t_0 * (x / z)
	return tmp
function code(x, y, z)
	t_0 = Float64(sin(y) / y)
	t_1 = Float64(Float64(x * t_0) / z)
	tmp = 0.0
	if (t_1 <= -5e-222)
		tmp = t_1;
	else
		tmp = Float64(t_0 * Float64(x / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = sin(y) / y;
	t_1 = (x * t_0) / z;
	tmp = 0.0;
	if (t_1 <= -5e-222)
		tmp = t_1;
	else
		tmp = t_0 * (x / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * t$95$0), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-222], t$95$1, N[(t$95$0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
t_1 := \frac{x \cdot t_0}{z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-222}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{x}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (/.f64 (sin.f64 y) y)) z) < -5.00000000000000008e-222

    1. Initial program 99.8%

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

    if -5.00000000000000008e-222 < (/.f64 (*.f64 x (/.f64 (sin.f64 y) y)) z)

    1. Initial program 93.1%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{\sin y} \cdot y}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity83.0%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\frac{z}{\sin y} \cdot y} \]
      2. frac-times80.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\sin y}} \cdot \frac{x}{y}} \]
      3. clear-num80.9%

        \[\leadsto \color{blue}{\frac{\sin y}{z}} \cdot \frac{x}{y} \]
      4. frac-times85.8%

        \[\leadsto \color{blue}{\frac{\sin y \cdot x}{z \cdot y}} \]
      5. *-commutative85.8%

        \[\leadsto \frac{\sin y \cdot x}{\color{blue}{y \cdot z}} \]
      6. times-frac98.7%

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

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

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

Alternative 2: 75.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6 \cdot 10^{-6}:\\ \;\;\;\;\frac{x}{z} \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin y \cdot \frac{x}{y \cdot z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 6e-6)
   (* (/ x z) (+ 1.0 (* -0.16666666666666666 (* y y))))
   (* (sin y) (/ x (* y z)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 6e-6) {
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	} else {
		tmp = sin(y) * (x / (y * z));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 6d-6) then
        tmp = (x / z) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
    else
        tmp = sin(y) * (x / (y * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 6e-6) {
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	} else {
		tmp = Math.sin(y) * (x / (y * z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 6e-6:
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)))
	else:
		tmp = math.sin(y) * (x / (y * z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 6e-6)
		tmp = Float64(Float64(x / z) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y))));
	else
		tmp = Float64(sin(y) * Float64(x / Float64(y * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 6e-6)
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	else
		tmp = sin(y) * (x / (y * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 6e-6], N[(N[(x / z), $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] * N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{-6}:\\
\;\;\;\;\frac{x}{z} \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{x}{y \cdot z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 6.0000000000000002e-6

    1. Initial program 96.9%

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{\sin y} \cdot y}} \]
    3. Simplified78.3%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{\sin y} \cdot y}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity78.3%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\frac{z}{\sin y} \cdot y} \]
      2. frac-times75.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\sin y}} \cdot \frac{x}{y}} \]
      3. clear-num76.8%

        \[\leadsto \color{blue}{\frac{\sin y}{z}} \cdot \frac{x}{y} \]
      4. frac-times78.7%

        \[\leadsto \color{blue}{\frac{\sin y \cdot x}{z \cdot y}} \]
      5. *-commutative78.7%

        \[\leadsto \frac{\sin y \cdot x}{\color{blue}{y \cdot z}} \]
      6. times-frac98.4%

        \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
    5. Applied egg-rr98.4%

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

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot {y}^{2}\right)} \cdot \frac{x}{z} \]
    7. Step-by-step derivation
      1. unpow268.6%

        \[\leadsto \left(1 + -0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \frac{x}{z} \]
    8. Simplified68.6%

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \cdot \frac{x}{z} \]

    if 6.0000000000000002e-6 < y

    1. Initial program 91.1%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. times-frac87.9%

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      3. *-commutative87.9%

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. associate-*r/87.9%

        \[\leadsto \color{blue}{\sin y \cdot \frac{x}{z \cdot y}} \]
      5. *-commutative87.9%

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

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

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

Alternative 3: 96.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\sin y}{y} \cdot \frac{x}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (* (/ (sin y) y) (/ x z)))
double code(double x, double y, double z) {
	return (sin(y) / y) * (x / z);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (sin(y) / y) * (x / z)
end function
public static double code(double x, double y, double z) {
	return (Math.sin(y) / y) * (x / z);
}
def code(x, y, z):
	return (math.sin(y) / y) * (x / z)
function code(x, y, z)
	return Float64(Float64(sin(y) / y) * Float64(x / z))
end
function tmp = code(x, y, z)
	tmp = (sin(y) / y) * (x / z);
end
code[x_, y_, z_] := N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sin y}{y} \cdot \frac{x}{z}
\end{array}
Derivation
  1. Initial program 95.5%

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{\sin y} \cdot y}} \]
  3. Simplified80.7%

    \[\leadsto \color{blue}{\frac{x}{\frac{z}{\sin y} \cdot y}} \]
  4. Step-by-step derivation
    1. *-un-lft-identity80.7%

      \[\leadsto \frac{\color{blue}{1 \cdot x}}{\frac{z}{\sin y} \cdot y} \]
    2. frac-times79.8%

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{\sin y}} \cdot \frac{x}{y}} \]
    3. clear-num80.5%

      \[\leadsto \color{blue}{\frac{\sin y}{z}} \cdot \frac{x}{y} \]
    4. frac-times81.0%

      \[\leadsto \color{blue}{\frac{\sin y \cdot x}{z \cdot y}} \]
    5. *-commutative81.0%

      \[\leadsto \frac{\sin y \cdot x}{\color{blue}{y \cdot z}} \]
    6. times-frac96.9%

      \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
  5. Applied egg-rr96.9%

    \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
  6. Final simplification96.9%

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

Alternative 4: 62.6% accurate, 8.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.5:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 2.5) (/ x z) (* 6.0 (* (/ 1.0 y) (/ (/ x z) y)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 2.5) {
		tmp = x / z;
	} else {
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 2.5d0) then
        tmp = x / z
    else
        tmp = 6.0d0 * ((1.0d0 / y) * ((x / z) / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 2.5) {
		tmp = x / z;
	} else {
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 2.5:
		tmp = x / z
	else:
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 2.5)
		tmp = Float64(x / z);
	else
		tmp = Float64(6.0 * Float64(Float64(1.0 / y) * Float64(Float64(x / z) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 2.5)
		tmp = x / z;
	else
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 2.5], N[(x / z), $MachinePrecision], N[(6.0 * N[(N[(1.0 / y), $MachinePrecision] * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.5:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;6 \cdot \left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.5

    1. Initial program 96.9%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. times-frac78.7%

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      3. *-commutative78.7%

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. associate-*r/80.0%

        \[\leadsto \color{blue}{\sin y \cdot \frac{x}{z \cdot y}} \]
      5. *-commutative80.0%

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

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

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

    if 2.5 < y

    1. Initial program 91.1%

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
    5. Taylor expanded in y around inf 36.3%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{{y}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative36.3%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot {y}^{2}}} \]
      2. unpow236.3%

        \[\leadsto 6 \cdot \frac{x}{z \cdot \color{blue}{\left(y \cdot y\right)}} \]
    7. Simplified36.3%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}} \]
    8. Step-by-step derivation
      1. associate-/r*36.2%

        \[\leadsto 6 \cdot \color{blue}{\frac{\frac{x}{z}}{y \cdot y}} \]
      2. *-un-lft-identity36.2%

        \[\leadsto 6 \cdot \frac{\color{blue}{1 \cdot \frac{x}{z}}}{y \cdot y} \]
      3. times-frac36.4%

        \[\leadsto 6 \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)} \]
    9. Applied egg-rr36.4%

      \[\leadsto 6 \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.5:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)\\ \end{array} \]

Alternative 5: 60.5% accurate, 8.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 12.5:\\ \;\;\;\;\frac{x}{z} \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 12.5)
   (* (/ x z) (+ 1.0 (* -0.16666666666666666 (* y y))))
   (* 6.0 (* (/ 1.0 y) (/ (/ x z) y)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 12.5) {
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	} else {
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 12.5d0) then
        tmp = (x / z) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
    else
        tmp = 6.0d0 * ((1.0d0 / y) * ((x / z) / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 12.5) {
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	} else {
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 12.5:
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)))
	else:
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 12.5)
		tmp = Float64(Float64(x / z) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y))));
	else
		tmp = Float64(6.0 * Float64(Float64(1.0 / y) * Float64(Float64(x / z) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 12.5)
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	else
		tmp = 6.0 * ((1.0 / y) * ((x / z) / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 12.5], N[(N[(x / z), $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(N[(1.0 / y), $MachinePrecision] * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 12.5:\\
\;\;\;\;\frac{x}{z} \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;6 \cdot \left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 12.5

    1. Initial program 96.9%

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{\sin y} \cdot y}} \]
    3. Simplified78.4%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{\sin y} \cdot y}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity78.4%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\frac{z}{\sin y} \cdot y} \]
      2. frac-times76.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\sin y}} \cdot \frac{x}{y}} \]
      3. clear-num76.9%

        \[\leadsto \color{blue}{\frac{\sin y}{z}} \cdot \frac{x}{y} \]
      4. frac-times78.8%

        \[\leadsto \color{blue}{\frac{\sin y \cdot x}{z \cdot y}} \]
      5. *-commutative78.8%

        \[\leadsto \frac{\sin y \cdot x}{\color{blue}{y \cdot z}} \]
      6. times-frac98.4%

        \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
    5. Applied egg-rr98.4%

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

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot {y}^{2}\right)} \cdot \frac{x}{z} \]
    7. Step-by-step derivation
      1. unpow268.3%

        \[\leadsto \left(1 + -0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \frac{x}{z} \]
    8. Simplified68.3%

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \cdot \frac{x}{z} \]

    if 12.5 < y

    1. Initial program 91.0%

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{\sin y} \cdot y}} \]
    3. Simplified87.7%

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

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
    5. Taylor expanded in y around inf 36.8%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{{y}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative36.8%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot {y}^{2}}} \]
      2. unpow236.8%

        \[\leadsto 6 \cdot \frac{x}{z \cdot \color{blue}{\left(y \cdot y\right)}} \]
    7. Simplified36.8%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}} \]
    8. Step-by-step derivation
      1. associate-/r*36.7%

        \[\leadsto 6 \cdot \color{blue}{\frac{\frac{x}{z}}{y \cdot y}} \]
      2. *-un-lft-identity36.7%

        \[\leadsto 6 \cdot \frac{\color{blue}{1 \cdot \frac{x}{z}}}{y \cdot y} \]
      3. times-frac36.9%

        \[\leadsto 6 \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)} \]
    9. Applied egg-rr36.9%

      \[\leadsto 6 \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{\frac{x}{z}}{y}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.6%

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

Alternative 6: 60.5% accurate, 8.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 12.5:\\ \;\;\;\;\frac{x}{z} \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(6 \cdot \frac{x}{y}\right) \cdot \frac{1}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 12.5)
   (* (/ x z) (+ 1.0 (* -0.16666666666666666 (* y y))))
   (/ (* (* 6.0 (/ x y)) (/ 1.0 z)) y)))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 12.5) {
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	} else {
		tmp = ((6.0 * (x / y)) * (1.0 / z)) / y;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 12.5d0) then
        tmp = (x / z) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
    else
        tmp = ((6.0d0 * (x / y)) * (1.0d0 / z)) / y
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 12.5) {
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	} else {
		tmp = ((6.0 * (x / y)) * (1.0 / z)) / y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 12.5:
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)))
	else:
		tmp = ((6.0 * (x / y)) * (1.0 / z)) / y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 12.5)
		tmp = Float64(Float64(x / z) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y))));
	else
		tmp = Float64(Float64(Float64(6.0 * Float64(x / y)) * Float64(1.0 / z)) / y);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 12.5)
		tmp = (x / z) * (1.0 + (-0.16666666666666666 * (y * y)));
	else
		tmp = ((6.0 * (x / y)) * (1.0 / z)) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 12.5], N[(N[(x / z), $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(6.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 12.5:\\
\;\;\;\;\frac{x}{z} \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(6 \cdot \frac{x}{y}\right) \cdot \frac{1}{z}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 12.5

    1. Initial program 96.9%

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{\sin y} \cdot y}} \]
    3. Simplified78.4%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{\sin y} \cdot y}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity78.4%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\frac{z}{\sin y} \cdot y} \]
      2. frac-times76.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\sin y}} \cdot \frac{x}{y}} \]
      3. clear-num76.9%

        \[\leadsto \color{blue}{\frac{\sin y}{z}} \cdot \frac{x}{y} \]
      4. frac-times78.8%

        \[\leadsto \color{blue}{\frac{\sin y \cdot x}{z \cdot y}} \]
      5. *-commutative78.8%

        \[\leadsto \frac{\sin y \cdot x}{\color{blue}{y \cdot z}} \]
      6. times-frac98.4%

        \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \frac{x}{z}} \]
    5. Applied egg-rr98.4%

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

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot {y}^{2}\right)} \cdot \frac{x}{z} \]
    7. Step-by-step derivation
      1. unpow268.3%

        \[\leadsto \left(1 + -0.16666666666666666 \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \frac{x}{z} \]
    8. Simplified68.3%

      \[\leadsto \color{blue}{\left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)} \cdot \frac{x}{z} \]

    if 12.5 < y

    1. Initial program 91.0%

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{\sin y} \cdot y}} \]
    3. Simplified87.7%

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

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
    5. Taylor expanded in y around inf 36.8%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{{y}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative36.8%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot {y}^{2}}} \]
      2. unpow236.8%

        \[\leadsto 6 \cdot \frac{x}{z \cdot \color{blue}{\left(y \cdot y\right)}} \]
    7. Simplified36.8%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}} \]
    8. Step-by-step derivation
      1. associate-/r*36.7%

        \[\leadsto 6 \cdot \color{blue}{\frac{\frac{x}{z}}{y \cdot y}} \]
      2. div-inv36.7%

        \[\leadsto 6 \cdot \frac{\color{blue}{x \cdot \frac{1}{z}}}{y \cdot y} \]
      3. times-frac36.9%

        \[\leadsto 6 \cdot \color{blue}{\left(\frac{x}{y} \cdot \frac{\frac{1}{z}}{y}\right)} \]
    9. Applied egg-rr36.9%

      \[\leadsto 6 \cdot \color{blue}{\left(\frac{x}{y} \cdot \frac{\frac{1}{z}}{y}\right)} \]
    10. Step-by-step derivation
      1. associate-*r*36.9%

        \[\leadsto \color{blue}{\left(6 \cdot \frac{x}{y}\right) \cdot \frac{\frac{1}{z}}{y}} \]
      2. associate-*r/36.9%

        \[\leadsto \color{blue}{\frac{\left(6 \cdot \frac{x}{y}\right) \cdot \frac{1}{z}}{y}} \]
    11. Applied egg-rr36.9%

      \[\leadsto \color{blue}{\frac{\left(6 \cdot \frac{x}{y}\right) \cdot \frac{1}{z}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.6%

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

Alternative 7: 62.2% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 5.5 \cdot 10^{+71}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 5.5e+71) (/ x z) (* 6.0 (/ x (* z (* y y))))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 5.5e+71) {
		tmp = x / z;
	} else {
		tmp = 6.0 * (x / (z * (y * y)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 5.5d+71) then
        tmp = x / z
    else
        tmp = 6.0d0 * (x / (z * (y * y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 5.5e+71) {
		tmp = x / z;
	} else {
		tmp = 6.0 * (x / (z * (y * y)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 5.5e+71:
		tmp = x / z
	else:
		tmp = 6.0 * (x / (z * (y * y)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 5.5e+71)
		tmp = Float64(x / z);
	else
		tmp = Float64(6.0 * Float64(x / Float64(z * Float64(y * y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 5.5e+71)
		tmp = x / z;
	else
		tmp = 6.0 * (x / (z * (y * y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 5.5e+71], N[(x / z), $MachinePrecision], N[(6.0 * N[(x / N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{+71}:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 5.5e71

    1. Initial program 97.1%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. times-frac80.0%

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      3. *-commutative80.0%

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. associate-*r/81.2%

        \[\leadsto \color{blue}{\sin y \cdot \frac{x}{z \cdot y}} \]
      5. *-commutative81.2%

        \[\leadsto \sin y \cdot \frac{x}{\color{blue}{y \cdot z}} \]
    3. Simplified81.2%

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

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

    if 5.5e71 < y

    1. Initial program 89.1%

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
    5. Taylor expanded in y around inf 40.1%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{{y}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative40.1%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot {y}^{2}}} \]
      2. unpow240.1%

        \[\leadsto 6 \cdot \frac{x}{z \cdot \color{blue}{\left(y \cdot y\right)}} \]
    7. Simplified40.1%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.5 \cdot 10^{+71}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}\\ \end{array} \]

Alternative 8: 62.2% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 4.6 \cdot 10^{+53}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \frac{\frac{x}{y}}{y \cdot z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 4.6e+53) (/ x z) (* 6.0 (/ (/ x y) (* y z)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 4.6e+53) {
		tmp = x / z;
	} else {
		tmp = 6.0 * ((x / y) / (y * z));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 4.6d+53) then
        tmp = x / z
    else
        tmp = 6.0d0 * ((x / y) / (y * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 4.6e+53) {
		tmp = x / z;
	} else {
		tmp = 6.0 * ((x / y) / (y * z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 4.6e+53:
		tmp = x / z
	else:
		tmp = 6.0 * ((x / y) / (y * z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 4.6e+53)
		tmp = Float64(x / z);
	else
		tmp = Float64(6.0 * Float64(Float64(x / y) / Float64(y * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 4.6e+53)
		tmp = x / z;
	else
		tmp = 6.0 * ((x / y) / (y * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 4.6e+53], N[(x / z), $MachinePrecision], N[(6.0 * N[(N[(x / y), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+53}:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;6 \cdot \frac{\frac{x}{y}}{y \cdot z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.60000000000000039e53

    1. Initial program 97.0%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. times-frac79.7%

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      3. *-commutative79.7%

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. associate-*r/80.9%

        \[\leadsto \color{blue}{\sin y \cdot \frac{x}{z \cdot y}} \]
      5. *-commutative80.9%

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

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

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

    if 4.60000000000000039e53 < y

    1. Initial program 89.7%

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{\sin y} \cdot y}} \]
    3. Simplified85.7%

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

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
    5. Taylor expanded in y around inf 38.2%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{{y}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative38.2%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot {y}^{2}}} \]
      2. unpow238.2%

        \[\leadsto 6 \cdot \frac{x}{z \cdot \color{blue}{\left(y \cdot y\right)}} \]
    7. Simplified38.2%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}} \]
    8. Taylor expanded in x around 0 38.2%

      \[\leadsto 6 \cdot \color{blue}{\frac{x}{{y}^{2} \cdot z}} \]
    9. Step-by-step derivation
      1. unpow238.2%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{\left(y \cdot y\right)} \cdot z} \]
      2. associate-*r*38.2%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{y \cdot \left(y \cdot z\right)}} \]
      3. associate-/r*38.3%

        \[\leadsto 6 \cdot \color{blue}{\frac{\frac{x}{y}}{y \cdot z}} \]
      4. *-commutative38.3%

        \[\leadsto 6 \cdot \frac{\frac{x}{y}}{\color{blue}{z \cdot y}} \]
    10. Simplified38.3%

      \[\leadsto 6 \cdot \color{blue}{\frac{\frac{x}{y}}{z \cdot y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.6 \cdot 10^{+53}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \frac{\frac{x}{y}}{y \cdot z}\\ \end{array} \]

Alternative 9: 62.6% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.5:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x \cdot 6}{y \cdot z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 2.5) (/ x z) (/ (/ (* x 6.0) (* y z)) y)))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 2.5) {
		tmp = x / z;
	} else {
		tmp = ((x * 6.0) / (y * z)) / y;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 2.5d0) then
        tmp = x / z
    else
        tmp = ((x * 6.0d0) / (y * z)) / y
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 2.5) {
		tmp = x / z;
	} else {
		tmp = ((x * 6.0) / (y * z)) / y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 2.5:
		tmp = x / z
	else:
		tmp = ((x * 6.0) / (y * z)) / y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 2.5)
		tmp = Float64(x / z);
	else
		tmp = Float64(Float64(Float64(x * 6.0) / Float64(y * z)) / y);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 2.5)
		tmp = x / z;
	else
		tmp = ((x * 6.0) / (y * z)) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 2.5], N[(x / z), $MachinePrecision], N[(N[(N[(x * 6.0), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.5:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot 6}{y \cdot z}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.5

    1. Initial program 96.9%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. times-frac78.7%

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      3. *-commutative78.7%

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. associate-*r/80.0%

        \[\leadsto \color{blue}{\sin y \cdot \frac{x}{z \cdot y}} \]
      5. *-commutative80.0%

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

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

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

    if 2.5 < y

    1. Initial program 91.1%

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\left(0.16666666666666666 \cdot \left(y \cdot z\right) + \frac{z}{y}\right)} \cdot y} \]
    5. Taylor expanded in y around inf 36.3%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{{y}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative36.3%

        \[\leadsto 6 \cdot \frac{x}{\color{blue}{z \cdot {y}^{2}}} \]
      2. unpow236.3%

        \[\leadsto 6 \cdot \frac{x}{z \cdot \color{blue}{\left(y \cdot y\right)}} \]
    7. Simplified36.3%

      \[\leadsto \color{blue}{6 \cdot \frac{x}{z \cdot \left(y \cdot y\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/36.3%

        \[\leadsto \color{blue}{\frac{6 \cdot x}{z \cdot \left(y \cdot y\right)}} \]
      2. associate-*r*36.3%

        \[\leadsto \frac{6 \cdot x}{\color{blue}{\left(z \cdot y\right) \cdot y}} \]
      3. associate-/r*36.3%

        \[\leadsto \color{blue}{\frac{\frac{6 \cdot x}{z \cdot y}}{y}} \]
      4. *-commutative36.3%

        \[\leadsto \frac{\frac{\color{blue}{x \cdot 6}}{z \cdot y}}{y} \]
      5. *-commutative36.3%

        \[\leadsto \frac{\frac{x \cdot 6}{\color{blue}{y \cdot z}}}{y} \]
    9. Applied egg-rr36.3%

      \[\leadsto \color{blue}{\frac{\frac{x \cdot 6}{y \cdot z}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.5:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x \cdot 6}{y \cdot z}}{y}\\ \end{array} \]

Alternative 10: 62.2% accurate, 11.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6 \cdot 10^{+46}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{y \cdot z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 6e+46) (/ x z) (* y (/ x (* y z)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 6e+46) {
		tmp = x / z;
	} else {
		tmp = y * (x / (y * z));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= 6d+46) then
        tmp = x / z
    else
        tmp = y * (x / (y * z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 6e+46) {
		tmp = x / z;
	} else {
		tmp = y * (x / (y * z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 6e+46:
		tmp = x / z
	else:
		tmp = y * (x / (y * z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 6e+46)
		tmp = Float64(x / z);
	else
		tmp = Float64(y * Float64(x / Float64(y * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 6e+46)
		tmp = x / z;
	else
		tmp = y * (x / (y * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 6e+46], N[(x / z), $MachinePrecision], N[(y * N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y \cdot z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 6.00000000000000047e46

    1. Initial program 97.0%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
      2. times-frac79.6%

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      3. *-commutative79.6%

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. associate-*r/80.8%

        \[\leadsto \color{blue}{\sin y \cdot \frac{x}{z \cdot y}} \]
      5. *-commutative80.8%

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

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

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

    if 6.00000000000000047e46 < y

    1. Initial program 89.8%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
      3. *-commutative86.1%

        \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
      4. times-frac90.1%

        \[\leadsto \color{blue}{\frac{\sin y}{z} \cdot \frac{x}{y}} \]
    3. Simplified90.1%

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

      \[\leadsto \color{blue}{\frac{y}{z}} \cdot \frac{x}{y} \]
    5. Step-by-step derivation
      1. clear-num27.6%

        \[\leadsto \frac{y}{z} \cdot \color{blue}{\frac{1}{\frac{y}{x}}} \]
      2. un-div-inv27.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{\frac{y}{x}}} \]
    6. Applied egg-rr27.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{z}}{\frac{y}{x}}} \]
    7. Step-by-step derivation
      1. div-inv27.6%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \frac{1}{\frac{y}{x}}} \]
      2. clear-num24.2%

        \[\leadsto \frac{y}{z} \cdot \color{blue}{\frac{x}{y}} \]
      3. div-inv24.2%

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{z}\right)} \cdot \frac{x}{y} \]
      4. associate-*l*38.7%

        \[\leadsto \color{blue}{y \cdot \left(\frac{1}{z} \cdot \frac{x}{y}\right)} \]
      5. times-frac38.8%

        \[\leadsto y \cdot \color{blue}{\frac{1 \cdot x}{z \cdot y}} \]
      6. *-un-lft-identity38.8%

        \[\leadsto y \cdot \frac{\color{blue}{x}}{z \cdot y} \]
      7. *-commutative38.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{y \cdot z}} \]
    8. Applied egg-rr38.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6 \cdot 10^{+46}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{y \cdot z}\\ \end{array} \]

Alternative 11: 58.6% accurate, 35.7× speedup?

\[\begin{array}{l} \\ \frac{x}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ x z))
double code(double x, double y, double z) {
	return x / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x / z
end function
public static double code(double x, double y, double z) {
	return x / z;
}
def code(x, y, z):
	return x / z
function code(x, y, z)
	return Float64(x / z)
end
function tmp = code(x, y, z)
	tmp = x / z;
end
code[x_, y_, z_] := N[(x / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{z}
\end{array}
Derivation
  1. Initial program 95.5%

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

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{\sin y}{y}} \]
    2. times-frac81.0%

      \[\leadsto \color{blue}{\frac{x \cdot \sin y}{z \cdot y}} \]
    3. *-commutative81.0%

      \[\leadsto \frac{\color{blue}{\sin y \cdot x}}{z \cdot y} \]
    4. associate-*r/82.0%

      \[\leadsto \color{blue}{\sin y \cdot \frac{x}{z \cdot y}} \]
    5. *-commutative82.0%

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

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

    \[\leadsto \color{blue}{\frac{x}{z}} \]
  5. Final simplification57.5%

    \[\leadsto \frac{x}{z} \]

Developer target: 99.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{\sin y}\\ t_1 := \frac{x \cdot \frac{1}{t_0}}{z}\\ \mathbf{if}\;z < -4.2173720203427147 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;\frac{x}{z \cdot t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ y (sin y))) (t_1 (/ (* x (/ 1.0 t_0)) z)))
   (if (< z -4.2173720203427147e-29)
     t_1
     (if (< z 4.446702369113811e+64) (/ x (* z t_0)) t_1))))
double code(double x, double y, double z) {
	double t_0 = y / sin(y);
	double t_1 = (x * (1.0 / t_0)) / z;
	double tmp;
	if (z < -4.2173720203427147e-29) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x / (z * t_0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = y / sin(y)
    t_1 = (x * (1.0d0 / t_0)) / z
    if (z < (-4.2173720203427147d-29)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x / (z * t_0)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = y / Math.sin(y);
	double t_1 = (x * (1.0 / t_0)) / z;
	double tmp;
	if (z < -4.2173720203427147e-29) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x / (z * t_0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = y / math.sin(y)
	t_1 = (x * (1.0 / t_0)) / z
	tmp = 0
	if z < -4.2173720203427147e-29:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x / (z * t_0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z)
	t_0 = Float64(y / sin(y))
	t_1 = Float64(Float64(x * Float64(1.0 / t_0)) / z)
	tmp = 0.0
	if (z < -4.2173720203427147e-29)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x / Float64(z * t_0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = y / sin(y);
	t_1 = (x * (1.0 / t_0)) / z;
	tmp = 0.0;
	if (z < -4.2173720203427147e-29)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x / (z * t_0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[Less[z, -4.2173720203427147e-29], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x / N[(z * t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{\sin y}\\
t_1 := \frac{x \cdot \frac{1}{t_0}}{z}\\
\mathbf{if}\;z < -4.2173720203427147 \cdot 10^{-29}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;\frac{x}{z \cdot t_0}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

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

  :herbie-target
  (if (< z -4.2173720203427147e-29) (/ (* x (/ 1.0 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1.0 (/ y (sin y)))) z)))

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