
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(if (<= y 13.0)
(sin x)
(if (<= y 1.4e+154)
(/ x (/ y (sinh y)))
(* 0.16666666666666666 (* (sin x) (* y y))))))
double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = sin(x);
} else if (y <= 1.4e+154) {
tmp = x / (y / sinh(y));
} else {
tmp = 0.16666666666666666 * (sin(x) * (y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 13.0d0) then
tmp = sin(x)
else if (y <= 1.4d+154) then
tmp = x / (y / sinh(y))
else
tmp = 0.16666666666666666d0 * (sin(x) * (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = Math.sin(x);
} else if (y <= 1.4e+154) {
tmp = x / (y / Math.sinh(y));
} else {
tmp = 0.16666666666666666 * (Math.sin(x) * (y * y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 13.0: tmp = math.sin(x) elif y <= 1.4e+154: tmp = x / (y / math.sinh(y)) else: tmp = 0.16666666666666666 * (math.sin(x) * (y * y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 13.0) tmp = sin(x); elseif (y <= 1.4e+154) tmp = Float64(x / Float64(y / sinh(y))); else tmp = Float64(0.16666666666666666 * Float64(sin(x) * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 13.0) tmp = sin(x); elseif (y <= 1.4e+154) tmp = x / (y / sinh(y)); else tmp = 0.16666666666666666 * (sin(x) * (y * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 13.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 1.4e+154], N[(x / N[(y / N[Sinh[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[Sin[x], $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 13:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\frac{y}{\sinh y}}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\sin x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 13Initial program 100.0%
Taylor expanded in y around 0 64.9%
if 13 < y < 1.4e154Initial program 100.0%
*-commutative100.0%
associate-/r/82.8%
Simplified82.8%
Taylor expanded in x around 0 62.1%
expm1-log1p-u17.2%
expm1-udef17.2%
associate-/r/24.1%
*-commutative24.1%
Applied egg-rr24.1%
expm1-def24.1%
expm1-log1p79.3%
associate-*r/79.3%
associate-/l*79.3%
Simplified79.3%
if 1.4e154 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in x around inf 100.0%
unpow2100.0%
Simplified100.0%
Final simplification69.9%
(FPCore (x y)
:precision binary64
(if (<= y 13.0)
(* (sin x) (+ 1.0 (* 0.16666666666666666 (* y y))))
(if (<= y 1.4e+154)
(/ x (/ y (sinh y)))
(* 0.16666666666666666 (* (sin x) (* y y))))))
double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
} else if (y <= 1.4e+154) {
tmp = x / (y / sinh(y));
} else {
tmp = 0.16666666666666666 * (sin(x) * (y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 13.0d0) then
tmp = sin(x) * (1.0d0 + (0.16666666666666666d0 * (y * y)))
else if (y <= 1.4d+154) then
tmp = x / (y / sinh(y))
else
tmp = 0.16666666666666666d0 * (sin(x) * (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = Math.sin(x) * (1.0 + (0.16666666666666666 * (y * y)));
} else if (y <= 1.4e+154) {
tmp = x / (y / Math.sinh(y));
} else {
tmp = 0.16666666666666666 * (Math.sin(x) * (y * y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 13.0: tmp = math.sin(x) * (1.0 + (0.16666666666666666 * (y * y))) elif y <= 1.4e+154: tmp = x / (y / math.sinh(y)) else: tmp = 0.16666666666666666 * (math.sin(x) * (y * y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 13.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))); elseif (y <= 1.4e+154) tmp = Float64(x / Float64(y / sinh(y))); else tmp = Float64(0.16666666666666666 * Float64(sin(x) * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 13.0) tmp = sin(x) * (1.0 + (0.16666666666666666 * (y * y))); elseif (y <= 1.4e+154) tmp = x / (y / sinh(y)); else tmp = 0.16666666666666666 * (sin(x) * (y * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 13.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+154], N[(x / N[(y / N[Sinh[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(N[Sin[x], $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 13:\\
\;\;\;\;\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\frac{y}{\sinh y}}\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\sin x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 13Initial program 100.0%
Taylor expanded in y around 0 82.5%
unpow282.5%
Simplified82.5%
if 13 < y < 1.4e154Initial program 100.0%
*-commutative100.0%
associate-/r/82.8%
Simplified82.8%
Taylor expanded in x around 0 62.1%
expm1-log1p-u17.2%
expm1-udef17.2%
associate-/r/24.1%
*-commutative24.1%
Applied egg-rr24.1%
expm1-def24.1%
expm1-log1p79.3%
associate-*r/79.3%
associate-/l*79.3%
Simplified79.3%
if 1.4e154 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in x around inf 100.0%
unpow2100.0%
Simplified100.0%
Final simplification83.9%
(FPCore (x y) :precision binary64 (if (<= y 13.0) (sin x) (/ x (/ y (sinh y)))))
double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = sin(x);
} else {
tmp = x / (y / sinh(y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 13.0d0) then
tmp = sin(x)
else
tmp = x / (y / sinh(y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = Math.sin(x);
} else {
tmp = x / (y / Math.sinh(y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 13.0: tmp = math.sin(x) else: tmp = x / (y / math.sinh(y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 13.0) tmp = sin(x); else tmp = Float64(x / Float64(y / sinh(y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 13.0) tmp = sin(x); else tmp = x / (y / sinh(y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 13.0], N[Sin[x], $MachinePrecision], N[(x / N[(y / N[Sinh[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 13:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{\sinh y}}\\
\end{array}
\end{array}
if y < 13Initial program 100.0%
Taylor expanded in y around 0 64.9%
if 13 < y Initial program 100.0%
*-commutative100.0%
associate-/r/72.2%
Simplified72.2%
Taylor expanded in x around 0 57.4%
expm1-log1p-u22.2%
expm1-udef22.2%
associate-/r/33.3%
*-commutative33.3%
Applied egg-rr33.3%
expm1-def33.3%
expm1-log1p85.2%
associate-*r/85.2%
associate-/l*85.2%
Simplified85.2%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(if (<= y 820.0)
(sin x)
(if (<= y 5.2e+44)
(+ x (* -0.16666666666666666 (* x (* x x))))
(* 0.16666666666666666 (* x (* y y))))))
double code(double x, double y) {
double tmp;
if (y <= 820.0) {
tmp = sin(x);
} else if (y <= 5.2e+44) {
tmp = x + (-0.16666666666666666 * (x * (x * x)));
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 820.0d0) then
tmp = sin(x)
else if (y <= 5.2d+44) then
tmp = x + ((-0.16666666666666666d0) * (x * (x * x)))
else
tmp = 0.16666666666666666d0 * (x * (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 820.0) {
tmp = Math.sin(x);
} else if (y <= 5.2e+44) {
tmp = x + (-0.16666666666666666 * (x * (x * x)));
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 820.0: tmp = math.sin(x) elif y <= 5.2e+44: tmp = x + (-0.16666666666666666 * (x * (x * x))) else: tmp = 0.16666666666666666 * (x * (y * y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 820.0) tmp = sin(x); elseif (y <= 5.2e+44) tmp = Float64(x + Float64(-0.16666666666666666 * Float64(x * Float64(x * x)))); else tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 820.0) tmp = sin(x); elseif (y <= 5.2e+44) tmp = x + (-0.16666666666666666 * (x * (x * x))); else tmp = 0.16666666666666666 * (x * (y * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 820.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 5.2e+44], N[(x + N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 820:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+44}:\\
\;\;\;\;x + -0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 820Initial program 100.0%
Taylor expanded in y around 0 64.9%
if 820 < y < 5.1999999999999998e44Initial program 100.0%
associate-*r/100.0%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 2.8%
Taylor expanded in x around 0 35.0%
unpow335.0%
Applied egg-rr35.0%
if 5.1999999999999998e44 < y Initial program 100.0%
Taylor expanded in y around 0 54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in y around inf 54.4%
unpow254.4%
associate-*r*54.4%
*-commutative54.4%
associate-*r*52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in x around 0 59.7%
unpow259.7%
associate-*l*44.2%
Simplified44.2%
Taylor expanded in y around 0 59.7%
unpow259.7%
*-commutative59.7%
Simplified59.7%
Final simplification63.2%
(FPCore (x y) :precision binary64 (if (<= y 6e+44) (+ x (* -0.16666666666666666 (* x (* x x)))) (* 0.16666666666666666 (* x (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= 6e+44) {
tmp = x + (-0.16666666666666666 * (x * (x * x)));
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 6d+44) then
tmp = x + ((-0.16666666666666666d0) * (x * (x * x)))
else
tmp = 0.16666666666666666d0 * (x * (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6e+44) {
tmp = x + (-0.16666666666666666 * (x * (x * x)));
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6e+44: tmp = x + (-0.16666666666666666 * (x * (x * x))) else: tmp = 0.16666666666666666 * (x * (y * y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 6e+44) tmp = Float64(x + Float64(-0.16666666666666666 * Float64(x * Float64(x * x)))); else tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6e+44) tmp = x + (-0.16666666666666666 * (x * (x * x))); else tmp = 0.16666666666666666 * (x * (y * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6e+44], N[(x + N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{+44}:\\
\;\;\;\;x + -0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 5.99999999999999974e44Initial program 100.0%
associate-*r/86.7%
clear-num86.6%
Applied egg-rr86.6%
Taylor expanded in y around 0 62.8%
Taylor expanded in x around 0 39.9%
unpow339.9%
Applied egg-rr39.9%
if 5.99999999999999974e44 < y Initial program 100.0%
Taylor expanded in y around 0 54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in y around inf 54.4%
unpow254.4%
associate-*r*54.4%
*-commutative54.4%
associate-*r*52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in x around 0 59.7%
unpow259.7%
associate-*l*44.2%
Simplified44.2%
Taylor expanded in y around 0 59.7%
unpow259.7%
*-commutative59.7%
Simplified59.7%
Final simplification43.6%
(FPCore (x y) :precision binary64 (if (<= y 13.0) x (* 0.16666666666666666 (* x (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = x;
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 13.0d0) then
tmp = x
else
tmp = 0.16666666666666666d0 * (x * (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 13.0) {
tmp = x;
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 13.0: tmp = x else: tmp = 0.16666666666666666 * (x * (y * y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 13.0) tmp = x; else tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 13.0) tmp = x; else tmp = 0.16666666666666666 * (x * (y * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 13.0], x, N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 13:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 13Initial program 100.0%
*-commutative100.0%
associate-/r/88.4%
Simplified88.4%
Taylor expanded in x around 0 48.7%
Taylor expanded in y around 0 34.6%
if 13 < y Initial program 100.0%
Taylor expanded in y around 0 48.7%
unpow248.7%
Simplified48.7%
Taylor expanded in y around inf 48.7%
unpow248.7%
associate-*r*48.7%
*-commutative48.7%
associate-*r*47.2%
*-commutative47.2%
Simplified47.2%
Taylor expanded in x around 0 53.3%
unpow253.3%
associate-*l*39.5%
Simplified39.5%
Taylor expanded in y around 0 53.3%
unpow253.3%
*-commutative53.3%
Simplified53.3%
Final simplification38.5%
(FPCore (x y) :precision binary64 (if (<= y 200000000000.0) x (/ (* x y) y)))
double code(double x, double y) {
double tmp;
if (y <= 200000000000.0) {
tmp = x;
} else {
tmp = (x * y) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 200000000000.0d0) then
tmp = x
else
tmp = (x * y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 200000000000.0) {
tmp = x;
} else {
tmp = (x * y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 200000000000.0: tmp = x else: tmp = (x * y) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 200000000000.0) tmp = x; else tmp = Float64(Float64(x * y) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 200000000000.0) tmp = x; else tmp = (x * y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 200000000000.0], x, N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 200000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\end{array}
\end{array}
if y < 2e11Initial program 100.0%
*-commutative100.0%
associate-/r/88.6%
Simplified88.6%
Taylor expanded in x around 0 49.2%
Taylor expanded in y around 0 34.3%
if 2e11 < y Initial program 100.0%
associate-*r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 2.7%
Taylor expanded in x around 0 21.0%
Final simplification31.6%
(FPCore (x y) :precision binary64 x)
double code(double x, double y) {
return x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x
end function
public static double code(double x, double y) {
return x;
}
def code(x, y): return x
function code(x, y) return x end
function tmp = code(x, y) tmp = x; end
code[x_, y_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
*-commutative100.0%
associate-/r/85.0%
Simplified85.0%
Taylor expanded in x around 0 50.5%
Taylor expanded in y around 0 27.9%
Final simplification27.9%
herbie shell --seed 2023279
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))