
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y): return (math.sin(x) * math.sinh(y)) / x
function code(x, y) return Float64(Float64(sin(x) * sinh(y)) / x) end
function tmp = code(x, y) tmp = (sin(x) * sinh(y)) / x; end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x \cdot \sinh y}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y): return (math.sin(x) * math.sinh(y)) / x
function code(x, y) return Float64(Float64(sin(x) * sinh(y)) / x) end
function tmp = code(x, y) tmp = (sin(x) * sinh(y)) / x; end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x \cdot \sinh y}{x}
\end{array}
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) x)))
double code(double x, double y) {
return sin(x) * (sinh(y) / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / x)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / x);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / x)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / x)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / x); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{x}
\end{array}
Initial program 92.3%
associate-*r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (log1p (expm1 y))))
(if (<= y -490.0)
t_0
(if (<= y 720.0)
(/ y (/ x (sin x)))
(if (<= y 2.1e+226)
t_0
(if (<= y 4.35e+248)
(* y (* x (* x -0.16666666666666666)))
(sqrt (* y y))))))))
double code(double x, double y) {
double t_0 = log1p(expm1(y));
double tmp;
if (y <= -490.0) {
tmp = t_0;
} else if (y <= 720.0) {
tmp = y / (x / sin(x));
} else if (y <= 2.1e+226) {
tmp = t_0;
} else if (y <= 4.35e+248) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = sqrt((y * y));
}
return tmp;
}
public static double code(double x, double y) {
double t_0 = Math.log1p(Math.expm1(y));
double tmp;
if (y <= -490.0) {
tmp = t_0;
} else if (y <= 720.0) {
tmp = y / (x / Math.sin(x));
} else if (y <= 2.1e+226) {
tmp = t_0;
} else if (y <= 4.35e+248) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = Math.sqrt((y * y));
}
return tmp;
}
def code(x, y): t_0 = math.log1p(math.expm1(y)) tmp = 0 if y <= -490.0: tmp = t_0 elif y <= 720.0: tmp = y / (x / math.sin(x)) elif y <= 2.1e+226: tmp = t_0 elif y <= 4.35e+248: tmp = y * (x * (x * -0.16666666666666666)) else: tmp = math.sqrt((y * y)) return tmp
function code(x, y) t_0 = log1p(expm1(y)) tmp = 0.0 if (y <= -490.0) tmp = t_0; elseif (y <= 720.0) tmp = Float64(y / Float64(x / sin(x))); elseif (y <= 2.1e+226) tmp = t_0; elseif (y <= 4.35e+248) tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); else tmp = sqrt(Float64(y * y)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[Log[1 + N[(Exp[y] - 1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -490.0], t$95$0, If[LessEqual[y, 720.0], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+226], t$95$0, If[LessEqual[y, 4.35e+248], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(y * y), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{log1p}\left(\mathsf{expm1}\left(y\right)\right)\\
\mathbf{if}\;y \leq -490:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 720:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+226}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 4.35 \cdot 10^{+248}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y \cdot y}\\
\end{array}
\end{array}
if y < -490 or 720 < y < 2.09999999999999993e226Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.4%
Taylor expanded in x around 0 14.9%
*-commutative14.9%
Simplified14.9%
div-inv14.9%
associate-*l*4.2%
div-inv4.2%
*-inverses4.2%
*-commutative4.2%
*-un-lft-identity4.2%
log1p-expm1-u80.0%
Applied egg-rr80.0%
if -490 < y < 720Initial program 84.3%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 83.8%
associate-/l*99.4%
Simplified99.4%
if 2.09999999999999993e226 < y < 4.34999999999999995e248Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 3.4%
associate-/l*3.4%
associate-/r/3.4%
Simplified3.4%
Taylor expanded in x around 0 85.7%
+-commutative85.7%
remove-double-neg85.7%
unsub-neg85.7%
associate-*r*85.7%
*-commutative85.7%
fma-neg85.7%
unpow285.7%
associate-*r*85.7%
remove-double-neg85.7%
Simplified85.7%
Taylor expanded in x around inf 85.7%
associate-*r*85.7%
*-commutative85.7%
unpow285.7%
associate-*r*85.7%
Simplified85.7%
if 4.34999999999999995e248 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 8.0%
Taylor expanded in x around 0 43.7%
*-commutative43.7%
Simplified43.7%
div-inv43.7%
associate-*l*9.5%
div-inv9.5%
*-inverses9.5%
*-commutative9.5%
*-un-lft-identity9.5%
add-sqr-sqrt9.5%
sqrt-unprod100.0%
Applied egg-rr100.0%
Final simplification90.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 6.0 (/ (/ y x) x))))
(if (<= y -270.0)
t_0
(if (<= y 0.175)
(/ y (+ 1.0 (* x (* x 0.16666666666666666))))
(if (<= y 1.42e+135) t_0 (sqrt (* y y)))))))
double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -270.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = y / (1.0 + (x * (x * 0.16666666666666666)));
} else if (y <= 1.42e+135) {
tmp = t_0;
} else {
tmp = sqrt((y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * ((y / x) / x)
if (y <= (-270.0d0)) then
tmp = t_0
else if (y <= 0.175d0) then
tmp = y / (1.0d0 + (x * (x * 0.16666666666666666d0)))
else if (y <= 1.42d+135) then
tmp = t_0
else
tmp = sqrt((y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -270.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = y / (1.0 + (x * (x * 0.16666666666666666)));
} else if (y <= 1.42e+135) {
tmp = t_0;
} else {
tmp = Math.sqrt((y * y));
}
return tmp;
}
def code(x, y): t_0 = 6.0 * ((y / x) / x) tmp = 0 if y <= -270.0: tmp = t_0 elif y <= 0.175: tmp = y / (1.0 + (x * (x * 0.16666666666666666))) elif y <= 1.42e+135: tmp = t_0 else: tmp = math.sqrt((y * y)) return tmp
function code(x, y) t_0 = Float64(6.0 * Float64(Float64(y / x) / x)) tmp = 0.0 if (y <= -270.0) tmp = t_0; elseif (y <= 0.175) tmp = Float64(y / Float64(1.0 + Float64(x * Float64(x * 0.16666666666666666)))); elseif (y <= 1.42e+135) tmp = t_0; else tmp = sqrt(Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 6.0 * ((y / x) / x); tmp = 0.0; if (y <= -270.0) tmp = t_0; elseif (y <= 0.175) tmp = y / (1.0 + (x * (x * 0.16666666666666666))); elseif (y <= 1.42e+135) tmp = t_0; else tmp = sqrt((y * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(6.0 * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -270.0], t$95$0, If[LessEqual[y, 0.175], N[(y / N[(1.0 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.42e+135], t$95$0, N[Sqrt[N[(y * y), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \frac{\frac{y}{x}}{x}\\
\mathbf{if}\;y \leq -270:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.175:\\
\;\;\;\;\frac{y}{1 + x \cdot \left(x \cdot 0.16666666666666666\right)}\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{+135}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y \cdot y}\\
\end{array}
\end{array}
if y < -270 or 0.17499999999999999 < y < 1.41999999999999998e135Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.7%
associate-/l*4.7%
Simplified4.7%
Taylor expanded in x around 0 3.9%
*-commutative3.9%
unpow23.9%
Simplified3.9%
Taylor expanded in x around inf 41.1%
unpow241.1%
associate-/r*41.2%
Simplified41.2%
if -270 < y < 0.17499999999999999Initial program 84.2%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 84.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 82.3%
*-commutative82.3%
unpow282.3%
Simplified82.3%
Taylor expanded in x around 0 82.3%
*-commutative82.3%
unpow282.3%
associate-*r*82.3%
Simplified82.3%
if 1.41999999999999998e135 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 5.1%
Taylor expanded in x around 0 26.3%
*-commutative26.3%
Simplified26.3%
div-inv26.3%
associate-*l*5.0%
div-inv5.0%
*-inverses5.0%
*-commutative5.0%
*-un-lft-identity5.0%
add-sqr-sqrt5.0%
sqrt-unprod61.9%
Applied egg-rr61.9%
Final simplification63.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 6.0 (/ (/ y x) x))))
(if (<= y -430.0)
t_0
(if (<= y 450.0)
(* (sin x) (/ y x))
(if (<= y 1.42e+135) t_0 (sqrt (* y y)))))))
double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -430.0) {
tmp = t_0;
} else if (y <= 450.0) {
tmp = sin(x) * (y / x);
} else if (y <= 1.42e+135) {
tmp = t_0;
} else {
tmp = sqrt((y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * ((y / x) / x)
if (y <= (-430.0d0)) then
tmp = t_0
else if (y <= 450.0d0) then
tmp = sin(x) * (y / x)
else if (y <= 1.42d+135) then
tmp = t_0
else
tmp = sqrt((y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -430.0) {
tmp = t_0;
} else if (y <= 450.0) {
tmp = Math.sin(x) * (y / x);
} else if (y <= 1.42e+135) {
tmp = t_0;
} else {
tmp = Math.sqrt((y * y));
}
return tmp;
}
def code(x, y): t_0 = 6.0 * ((y / x) / x) tmp = 0 if y <= -430.0: tmp = t_0 elif y <= 450.0: tmp = math.sin(x) * (y / x) elif y <= 1.42e+135: tmp = t_0 else: tmp = math.sqrt((y * y)) return tmp
function code(x, y) t_0 = Float64(6.0 * Float64(Float64(y / x) / x)) tmp = 0.0 if (y <= -430.0) tmp = t_0; elseif (y <= 450.0) tmp = Float64(sin(x) * Float64(y / x)); elseif (y <= 1.42e+135) tmp = t_0; else tmp = sqrt(Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 6.0 * ((y / x) / x); tmp = 0.0; if (y <= -430.0) tmp = t_0; elseif (y <= 450.0) tmp = sin(x) * (y / x); elseif (y <= 1.42e+135) tmp = t_0; else tmp = sqrt((y * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(6.0 * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -430.0], t$95$0, If[LessEqual[y, 450.0], N[(N[Sin[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.42e+135], t$95$0, N[Sqrt[N[(y * y), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \frac{\frac{y}{x}}{x}\\
\mathbf{if}\;y \leq -430:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 450:\\
\;\;\;\;\sin x \cdot \frac{y}{x}\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{+135}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y \cdot y}\\
\end{array}
\end{array}
if y < -430 or 450 < y < 1.41999999999999998e135Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.5%
associate-/l*4.5%
Simplified4.5%
Taylor expanded in x around 0 3.8%
*-commutative3.8%
unpow23.8%
Simplified3.8%
Taylor expanded in x around inf 41.5%
unpow241.5%
associate-/r*41.5%
Simplified41.5%
if -430 < y < 450Initial program 84.3%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 83.8%
associate-/l*99.4%
associate-/r/99.2%
Simplified99.2%
if 1.41999999999999998e135 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 5.1%
Taylor expanded in x around 0 26.3%
*-commutative26.3%
Simplified26.3%
div-inv26.3%
associate-*l*5.0%
div-inv5.0%
*-inverses5.0%
*-commutative5.0%
*-un-lft-identity5.0%
add-sqr-sqrt5.0%
sqrt-unprod61.9%
Applied egg-rr61.9%
Final simplification72.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 6.0 (/ (/ y x) x))))
(if (<= y -660.0)
t_0
(if (<= y 330.0)
(/ y (/ x (sin x)))
(if (<= y 1.42e+135) t_0 (sqrt (* y y)))))))
double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -660.0) {
tmp = t_0;
} else if (y <= 330.0) {
tmp = y / (x / sin(x));
} else if (y <= 1.42e+135) {
tmp = t_0;
} else {
tmp = sqrt((y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * ((y / x) / x)
if (y <= (-660.0d0)) then
tmp = t_0
else if (y <= 330.0d0) then
tmp = y / (x / sin(x))
else if (y <= 1.42d+135) then
tmp = t_0
else
tmp = sqrt((y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -660.0) {
tmp = t_0;
} else if (y <= 330.0) {
tmp = y / (x / Math.sin(x));
} else if (y <= 1.42e+135) {
tmp = t_0;
} else {
tmp = Math.sqrt((y * y));
}
return tmp;
}
def code(x, y): t_0 = 6.0 * ((y / x) / x) tmp = 0 if y <= -660.0: tmp = t_0 elif y <= 330.0: tmp = y / (x / math.sin(x)) elif y <= 1.42e+135: tmp = t_0 else: tmp = math.sqrt((y * y)) return tmp
function code(x, y) t_0 = Float64(6.0 * Float64(Float64(y / x) / x)) tmp = 0.0 if (y <= -660.0) tmp = t_0; elseif (y <= 330.0) tmp = Float64(y / Float64(x / sin(x))); elseif (y <= 1.42e+135) tmp = t_0; else tmp = sqrt(Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 6.0 * ((y / x) / x); tmp = 0.0; if (y <= -660.0) tmp = t_0; elseif (y <= 330.0) tmp = y / (x / sin(x)); elseif (y <= 1.42e+135) tmp = t_0; else tmp = sqrt((y * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(6.0 * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -660.0], t$95$0, If[LessEqual[y, 330.0], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.42e+135], t$95$0, N[Sqrt[N[(y * y), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \frac{\frac{y}{x}}{x}\\
\mathbf{if}\;y \leq -660:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 330:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{+135}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y \cdot y}\\
\end{array}
\end{array}
if y < -660 or 330 < y < 1.41999999999999998e135Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.5%
associate-/l*4.5%
Simplified4.5%
Taylor expanded in x around 0 3.8%
*-commutative3.8%
unpow23.8%
Simplified3.8%
Taylor expanded in x around inf 41.5%
unpow241.5%
associate-/r*41.5%
Simplified41.5%
if -660 < y < 330Initial program 84.3%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 83.8%
associate-/l*99.4%
Simplified99.4%
if 1.41999999999999998e135 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 5.1%
Taylor expanded in x around 0 26.3%
*-commutative26.3%
Simplified26.3%
div-inv26.3%
associate-*l*5.0%
div-inv5.0%
*-inverses5.0%
*-commutative5.0%
*-un-lft-identity5.0%
add-sqr-sqrt5.0%
sqrt-unprod61.9%
Applied egg-rr61.9%
Final simplification72.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 6.0 (/ (/ y x) x))) (t_1 (/ x (/ x y))))
(if (<= y -480.0)
t_0
(if (<= y 0.175)
t_1
(if (<= y 2.8e+194)
t_0
(if (<= y 1.52e+255)
(+ y (* -0.16666666666666666 (* y (* x x))))
t_1))))))
double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double t_1 = x / (x / y);
double tmp;
if (y <= -480.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = t_1;
} else if (y <= 2.8e+194) {
tmp = t_0;
} else if (y <= 1.52e+255) {
tmp = y + (-0.16666666666666666 * (y * (x * x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * ((y / x) / x)
t_1 = x / (x / y)
if (y <= (-480.0d0)) then
tmp = t_0
else if (y <= 0.175d0) then
tmp = t_1
else if (y <= 2.8d+194) then
tmp = t_0
else if (y <= 1.52d+255) then
tmp = y + ((-0.16666666666666666d0) * (y * (x * x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double t_1 = x / (x / y);
double tmp;
if (y <= -480.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = t_1;
} else if (y <= 2.8e+194) {
tmp = t_0;
} else if (y <= 1.52e+255) {
tmp = y + (-0.16666666666666666 * (y * (x * x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = 6.0 * ((y / x) / x) t_1 = x / (x / y) tmp = 0 if y <= -480.0: tmp = t_0 elif y <= 0.175: tmp = t_1 elif y <= 2.8e+194: tmp = t_0 elif y <= 1.52e+255: tmp = y + (-0.16666666666666666 * (y * (x * x))) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(6.0 * Float64(Float64(y / x) / x)) t_1 = Float64(x / Float64(x / y)) tmp = 0.0 if (y <= -480.0) tmp = t_0; elseif (y <= 0.175) tmp = t_1; elseif (y <= 2.8e+194) tmp = t_0; elseif (y <= 1.52e+255) tmp = Float64(y + Float64(-0.16666666666666666 * Float64(y * Float64(x * x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = 6.0 * ((y / x) / x); t_1 = x / (x / y); tmp = 0.0; if (y <= -480.0) tmp = t_0; elseif (y <= 0.175) tmp = t_1; elseif (y <= 2.8e+194) tmp = t_0; elseif (y <= 1.52e+255) tmp = y + (-0.16666666666666666 * (y * (x * x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(6.0 * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -480.0], t$95$0, If[LessEqual[y, 0.175], t$95$1, If[LessEqual[y, 2.8e+194], t$95$0, If[LessEqual[y, 1.52e+255], N[(y + N[(-0.16666666666666666 * N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \frac{\frac{y}{x}}{x}\\
t_1 := \frac{x}{\frac{x}{y}}\\
\mathbf{if}\;y \leq -480:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.175:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+194}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{+255}:\\
\;\;\;\;y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -480 or 0.17499999999999999 < y < 2.8000000000000001e194Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.6%
associate-/l*4.6%
Simplified4.6%
Taylor expanded in x around 0 3.8%
*-commutative3.8%
unpow23.8%
Simplified3.8%
Taylor expanded in x around inf 40.1%
unpow240.1%
associate-/r*40.2%
Simplified40.2%
if -480 < y < 0.17499999999999999 or 1.52000000000000001e255 < y Initial program 85.1%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 79.6%
Taylor expanded in x around 0 39.2%
*-commutative39.2%
Simplified39.2%
div-inv39.1%
associate-*l*51.7%
div-inv51.9%
*-inverses51.9%
*-commutative51.9%
*-un-lft-identity51.9%
log1p-expm1-u57.3%
Applied egg-rr57.3%
log1p-expm1-u51.9%
*-un-lft-identity51.9%
*-commutative51.9%
metadata-eval51.9%
metadata-eval51.9%
pow-prod-up51.7%
inv-pow51.7%
pow151.7%
associate-*l*78.9%
div-inv79.0%
*-commutative79.0%
associate-*r/39.2%
associate-/l*80.6%
Applied egg-rr80.6%
if 2.8000000000000001e194 < y < 1.52000000000000001e255Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 3.7%
associate-/l*3.7%
associate-/r/13.1%
Simplified13.1%
Taylor expanded in x around 0 70.5%
*-commutative70.5%
unpow270.5%
Simplified70.5%
Final simplification62.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 6.0 (/ (/ y x) x))))
(if (<= y -260.0)
t_0
(if (<= y 0.175)
(/ y (+ 1.0 (* x (* x 0.16666666666666666))))
(if (<= y 7.2e+195)
t_0
(if (<= y 5.6e+248)
(+ y (* -0.16666666666666666 (* y (* x x))))
(/ x (/ x y))))))))
double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -260.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = y / (1.0 + (x * (x * 0.16666666666666666)));
} else if (y <= 7.2e+195) {
tmp = t_0;
} else if (y <= 5.6e+248) {
tmp = y + (-0.16666666666666666 * (y * (x * x)));
} else {
tmp = x / (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * ((y / x) / x)
if (y <= (-260.0d0)) then
tmp = t_0
else if (y <= 0.175d0) then
tmp = y / (1.0d0 + (x * (x * 0.16666666666666666d0)))
else if (y <= 7.2d+195) then
tmp = t_0
else if (y <= 5.6d+248) then
tmp = y + ((-0.16666666666666666d0) * (y * (x * x)))
else
tmp = x / (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double tmp;
if (y <= -260.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = y / (1.0 + (x * (x * 0.16666666666666666)));
} else if (y <= 7.2e+195) {
tmp = t_0;
} else if (y <= 5.6e+248) {
tmp = y + (-0.16666666666666666 * (y * (x * x)));
} else {
tmp = x / (x / y);
}
return tmp;
}
def code(x, y): t_0 = 6.0 * ((y / x) / x) tmp = 0 if y <= -260.0: tmp = t_0 elif y <= 0.175: tmp = y / (1.0 + (x * (x * 0.16666666666666666))) elif y <= 7.2e+195: tmp = t_0 elif y <= 5.6e+248: tmp = y + (-0.16666666666666666 * (y * (x * x))) else: tmp = x / (x / y) return tmp
function code(x, y) t_0 = Float64(6.0 * Float64(Float64(y / x) / x)) tmp = 0.0 if (y <= -260.0) tmp = t_0; elseif (y <= 0.175) tmp = Float64(y / Float64(1.0 + Float64(x * Float64(x * 0.16666666666666666)))); elseif (y <= 7.2e+195) tmp = t_0; elseif (y <= 5.6e+248) tmp = Float64(y + Float64(-0.16666666666666666 * Float64(y * Float64(x * x)))); else tmp = Float64(x / Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 6.0 * ((y / x) / x); tmp = 0.0; if (y <= -260.0) tmp = t_0; elseif (y <= 0.175) tmp = y / (1.0 + (x * (x * 0.16666666666666666))); elseif (y <= 7.2e+195) tmp = t_0; elseif (y <= 5.6e+248) tmp = y + (-0.16666666666666666 * (y * (x * x))); else tmp = x / (x / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(6.0 * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -260.0], t$95$0, If[LessEqual[y, 0.175], N[(y / N[(1.0 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+195], t$95$0, If[LessEqual[y, 5.6e+248], N[(y + N[(-0.16666666666666666 * N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \frac{\frac{y}{x}}{x}\\
\mathbf{if}\;y \leq -260:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.175:\\
\;\;\;\;\frac{y}{1 + x \cdot \left(x \cdot 0.16666666666666666\right)}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+195}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+248}:\\
\;\;\;\;y + -0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\
\end{array}
\end{array}
if y < -260 or 0.17499999999999999 < y < 7.1999999999999997e195Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.6%
associate-/l*4.6%
Simplified4.6%
Taylor expanded in x around 0 3.8%
*-commutative3.8%
unpow23.8%
Simplified3.8%
Taylor expanded in x around inf 40.1%
unpow240.1%
associate-/r*40.2%
Simplified40.2%
if -260 < y < 0.17499999999999999Initial program 84.2%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 84.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 82.3%
*-commutative82.3%
unpow282.3%
Simplified82.3%
Taylor expanded in x around 0 82.3%
*-commutative82.3%
unpow282.3%
associate-*r*82.3%
Simplified82.3%
if 7.1999999999999997e195 < y < 5.6000000000000004e248Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 3.7%
associate-/l*3.7%
associate-/r/13.1%
Simplified13.1%
Taylor expanded in x around 0 70.5%
*-commutative70.5%
unpow270.5%
Simplified70.5%
if 5.6000000000000004e248 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 8.0%
Taylor expanded in x around 0 43.7%
*-commutative43.7%
Simplified43.7%
div-inv43.7%
associate-*l*9.5%
div-inv9.5%
*-inverses9.5%
*-commutative9.5%
*-un-lft-identity9.5%
log1p-expm1-u100.0%
Applied egg-rr100.0%
log1p-expm1-u9.5%
*-un-lft-identity9.5%
*-commutative9.5%
metadata-eval9.5%
metadata-eval9.5%
pow-prod-up9.5%
inv-pow9.5%
pow19.5%
associate-*l*65.8%
div-inv65.8%
*-commutative65.8%
associate-*r/43.7%
associate-/l*65.8%
Applied egg-rr65.8%
Final simplification62.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 6.0 (/ (/ y x) x))) (t_1 (/ x (/ x y))))
(if (<= y -310.0)
t_0
(if (<= y 0.175)
t_1
(if (<= y 6e+225)
t_0
(if (<= y 5.2e+248) (* y (* x (* x -0.16666666666666666))) t_1))))))
double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double t_1 = x / (x / y);
double tmp;
if (y <= -310.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = t_1;
} else if (y <= 6e+225) {
tmp = t_0;
} else if (y <= 5.2e+248) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * ((y / x) / x)
t_1 = x / (x / y)
if (y <= (-310.0d0)) then
tmp = t_0
else if (y <= 0.175d0) then
tmp = t_1
else if (y <= 6d+225) then
tmp = t_0
else if (y <= 5.2d+248) then
tmp = y * (x * (x * (-0.16666666666666666d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 6.0 * ((y / x) / x);
double t_1 = x / (x / y);
double tmp;
if (y <= -310.0) {
tmp = t_0;
} else if (y <= 0.175) {
tmp = t_1;
} else if (y <= 6e+225) {
tmp = t_0;
} else if (y <= 5.2e+248) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = 6.0 * ((y / x) / x) t_1 = x / (x / y) tmp = 0 if y <= -310.0: tmp = t_0 elif y <= 0.175: tmp = t_1 elif y <= 6e+225: tmp = t_0 elif y <= 5.2e+248: tmp = y * (x * (x * -0.16666666666666666)) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(6.0 * Float64(Float64(y / x) / x)) t_1 = Float64(x / Float64(x / y)) tmp = 0.0 if (y <= -310.0) tmp = t_0; elseif (y <= 0.175) tmp = t_1; elseif (y <= 6e+225) tmp = t_0; elseif (y <= 5.2e+248) tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = 6.0 * ((y / x) / x); t_1 = x / (x / y); tmp = 0.0; if (y <= -310.0) tmp = t_0; elseif (y <= 0.175) tmp = t_1; elseif (y <= 6e+225) tmp = t_0; elseif (y <= 5.2e+248) tmp = y * (x * (x * -0.16666666666666666)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(6.0 * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -310.0], t$95$0, If[LessEqual[y, 0.175], t$95$1, If[LessEqual[y, 6e+225], t$95$0, If[LessEqual[y, 5.2e+248], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \frac{\frac{y}{x}}{x}\\
t_1 := \frac{x}{\frac{x}{y}}\\
\mathbf{if}\;y \leq -310:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.175:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+225}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+248}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -310 or 0.17499999999999999 < y < 6.000000000000001e225Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.6%
associate-/l*4.6%
Simplified4.6%
Taylor expanded in x around 0 3.8%
*-commutative3.8%
unpow23.8%
Simplified3.8%
Taylor expanded in x around inf 40.0%
unpow240.0%
associate-/r*40.0%
Simplified40.0%
if -310 < y < 0.17499999999999999 or 5.20000000000000019e248 < y Initial program 85.1%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 79.6%
Taylor expanded in x around 0 39.2%
*-commutative39.2%
Simplified39.2%
div-inv39.1%
associate-*l*51.7%
div-inv51.9%
*-inverses51.9%
*-commutative51.9%
*-un-lft-identity51.9%
log1p-expm1-u57.3%
Applied egg-rr57.3%
log1p-expm1-u51.9%
*-un-lft-identity51.9%
*-commutative51.9%
metadata-eval51.9%
metadata-eval51.9%
pow-prod-up51.7%
inv-pow51.7%
pow151.7%
associate-*l*78.9%
div-inv79.0%
*-commutative79.0%
associate-*r/39.2%
associate-/l*80.6%
Applied egg-rr80.6%
if 6.000000000000001e225 < y < 5.20000000000000019e248Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 3.4%
associate-/l*3.4%
associate-/r/3.4%
Simplified3.4%
Taylor expanded in x around 0 85.7%
+-commutative85.7%
remove-double-neg85.7%
unsub-neg85.7%
associate-*r*85.7%
*-commutative85.7%
fma-neg85.7%
unpow285.7%
associate-*r*85.7%
remove-double-neg85.7%
Simplified85.7%
Taylor expanded in x around inf 85.7%
associate-*r*85.7%
*-commutative85.7%
unpow285.7%
associate-*r*85.7%
Simplified85.7%
Final simplification62.4%
(FPCore (x y) :precision binary64 (if (or (<= y -440.0) (not (<= y 0.175))) (* 6.0 (/ (/ y x) x)) (/ x (/ x y))))
double code(double x, double y) {
double tmp;
if ((y <= -440.0) || !(y <= 0.175)) {
tmp = 6.0 * ((y / x) / x);
} else {
tmp = x / (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-440.0d0)) .or. (.not. (y <= 0.175d0))) then
tmp = 6.0d0 * ((y / x) / x)
else
tmp = x / (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -440.0) || !(y <= 0.175)) {
tmp = 6.0 * ((y / x) / x);
} else {
tmp = x / (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -440.0) or not (y <= 0.175): tmp = 6.0 * ((y / x) / x) else: tmp = x / (x / y) return tmp
function code(x, y) tmp = 0.0 if ((y <= -440.0) || !(y <= 0.175)) tmp = Float64(6.0 * Float64(Float64(y / x) / x)); else tmp = Float64(x / Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -440.0) || ~((y <= 0.175))) tmp = 6.0 * ((y / x) / x); else tmp = x / (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -440.0], N[Not[LessEqual[y, 0.175]], $MachinePrecision]], N[(6.0 * N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -440 \lor \neg \left(y \leq 0.175\right):\\
\;\;\;\;6 \cdot \frac{\frac{y}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\
\end{array}
\end{array}
if y < -440 or 0.17499999999999999 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.8%
associate-/l*4.8%
Simplified4.8%
Taylor expanded in x around 0 3.9%
*-commutative3.9%
unpow23.9%
Simplified3.9%
Taylor expanded in x around inf 39.4%
unpow239.4%
associate-/r*39.4%
Simplified39.4%
if -440 < y < 0.17499999999999999Initial program 84.2%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 84.2%
Taylor expanded in x around 0 38.9%
*-commutative38.9%
Simplified38.9%
div-inv38.8%
associate-*l*54.4%
div-inv54.6%
*-inverses54.6%
*-commutative54.6%
*-un-lft-identity54.6%
log1p-expm1-u54.6%
Applied egg-rr54.6%
log1p-expm1-u54.6%
*-un-lft-identity54.6%
*-commutative54.6%
metadata-eval54.6%
metadata-eval54.6%
pow-prod-up54.4%
inv-pow54.4%
pow154.4%
associate-*l*79.8%
div-inv79.9%
*-commutative79.9%
associate-*r/38.9%
associate-/l*81.6%
Applied egg-rr81.6%
Final simplification60.0%
(FPCore (x y) :precision binary64 (* x (/ y x)))
double code(double x, double y) {
return x * (y / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (y / x)
end function
public static double code(double x, double y) {
return x * (y / x);
}
def code(x, y): return x * (y / x)
function code(x, y) return Float64(x * Float64(y / x)) end
function tmp = code(x, y) tmp = x * (y / x); end
code[x_, y_] := N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y}{x}
\end{array}
Initial program 92.3%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in y around 0 43.6%
Taylor expanded in x around 0 27.4%
*-commutative27.4%
Simplified27.4%
associate-/l*28.9%
associate-/r/49.5%
Applied egg-rr49.5%
Final simplification49.5%
(FPCore (x y) :precision binary64 (/ x (/ x y)))
double code(double x, double y) {
return x / (x / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / (x / y)
end function
public static double code(double x, double y) {
return x / (x / y);
}
def code(x, y): return x / (x / y)
function code(x, y) return Float64(x / Float64(x / y)) end
function tmp = code(x, y) tmp = x / (x / y); end
code[x_, y_] := N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{x}{y}}
\end{array}
Initial program 92.3%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in y around 0 43.6%
Taylor expanded in x around 0 27.4%
*-commutative27.4%
Simplified27.4%
div-inv27.4%
associate-*l*28.8%
div-inv28.9%
*-inverses28.9%
*-commutative28.9%
*-un-lft-identity28.9%
log1p-expm1-u66.1%
Applied egg-rr66.1%
log1p-expm1-u28.9%
*-un-lft-identity28.9%
*-commutative28.9%
metadata-eval28.9%
metadata-eval28.9%
pow-prod-up28.8%
inv-pow28.8%
pow128.8%
associate-*l*49.4%
div-inv49.5%
*-commutative49.5%
associate-*r/27.4%
associate-/l*49.9%
Applied egg-rr49.9%
Final simplification49.9%
(FPCore (x y) :precision binary64 y)
double code(double x, double y) {
return y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y
end function
public static double code(double x, double y) {
return y;
}
def code(x, y): return y
function code(x, y) return y end
function tmp = code(x, y) tmp = y; end
code[x_, y_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 92.3%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in y around 0 43.6%
associate-/l*51.2%
associate-/r/59.4%
Simplified59.4%
Taylor expanded in x around 0 28.9%
Final simplification28.9%
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) x)))
double code(double x, double y) {
return sin(x) * (sinh(y) / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / x)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / x);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / x)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / x)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / x); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{x}
\end{array}
herbie shell --seed 2023271
(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))