
(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 13 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) x) (sinh y)))
double code(double x, double y) {
return (sin(x) / x) * sinh(y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) / x) * sinh(y)
end function
public static double code(double x, double y) {
return (Math.sin(x) / x) * Math.sinh(y);
}
def code(x, y): return (math.sin(x) / x) * math.sinh(y)
function code(x, y) return Float64(Float64(sin(x) / x) * sinh(y)) end
function tmp = code(x, y) tmp = (sin(x) / x) * sinh(y); end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x}{x} \cdot \sinh y
\end{array}
Initial program 90.2%
associate-*l/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y) :precision binary64 (if (<= (sinh y) -5e-5) (sinh y) (if (<= (sinh y) 0.001) (* (sin x) (/ y x)) (sinh y))))
double code(double x, double y) {
double tmp;
if (sinh(y) <= -5e-5) {
tmp = sinh(y);
} else if (sinh(y) <= 0.001) {
tmp = sin(x) * (y / x);
} else {
tmp = sinh(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (sinh(y) <= (-5d-5)) then
tmp = sinh(y)
else if (sinh(y) <= 0.001d0) then
tmp = sin(x) * (y / x)
else
tmp = sinh(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (Math.sinh(y) <= -5e-5) {
tmp = Math.sinh(y);
} else if (Math.sinh(y) <= 0.001) {
tmp = Math.sin(x) * (y / x);
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if math.sinh(y) <= -5e-5: tmp = math.sinh(y) elif math.sinh(y) <= 0.001: tmp = math.sin(x) * (y / x) else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (sinh(y) <= -5e-5) tmp = sinh(y); elseif (sinh(y) <= 0.001) tmp = Float64(sin(x) * Float64(y / x)); else tmp = sinh(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (sinh(y) <= -5e-5) tmp = sinh(y); elseif (sinh(y) <= 0.001) tmp = sin(x) * (y / x); else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], -5e-5], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 0.001], N[(N[Sin[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -5 \cdot 10^{-5}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;\sinh y \leq 0.001:\\
\;\;\;\;\sin x \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (sinh.f64 y) < -5.00000000000000024e-5 or 1e-3 < (sinh.f64 y) Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 73.4%
if -5.00000000000000024e-5 < (sinh.f64 y) < 1e-3Initial program 81.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.7%
associate-/l*99.5%
associate-/r/99.4%
Simplified99.4%
Final simplification86.8%
(FPCore (x y)
:precision binary64
(if (<= (sinh y) -5e-5)
(sinh y)
(if (<= (sinh y) 0.001)
(/ y (* x (+ (* x 0.16666666666666666) (/ 1.0 x))))
(sinh y))))
double code(double x, double y) {
double tmp;
if (sinh(y) <= -5e-5) {
tmp = sinh(y);
} else if (sinh(y) <= 0.001) {
tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x)));
} else {
tmp = sinh(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (sinh(y) <= (-5d-5)) then
tmp = sinh(y)
else if (sinh(y) <= 0.001d0) then
tmp = y / (x * ((x * 0.16666666666666666d0) + (1.0d0 / x)))
else
tmp = sinh(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (Math.sinh(y) <= -5e-5) {
tmp = Math.sinh(y);
} else if (Math.sinh(y) <= 0.001) {
tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x)));
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if math.sinh(y) <= -5e-5: tmp = math.sinh(y) elif math.sinh(y) <= 0.001: tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x))) else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (sinh(y) <= -5e-5) tmp = sinh(y); elseif (sinh(y) <= 0.001) tmp = Float64(y / Float64(x * Float64(Float64(x * 0.16666666666666666) + Float64(1.0 / x)))); else tmp = sinh(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (sinh(y) <= -5e-5) tmp = sinh(y); elseif (sinh(y) <= 0.001) tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x))); else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], -5e-5], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 0.001], N[(y / N[(x * N[(N[(x * 0.16666666666666666), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -5 \cdot 10^{-5}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;\sinh y \leq 0.001:\\
\;\;\;\;\frac{y}{x \cdot \left(x \cdot 0.16666666666666666 + \frac{1}{x}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (sinh.f64 y) < -5.00000000000000024e-5 or 1e-3 < (sinh.f64 y) Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 73.4%
if -5.00000000000000024e-5 < (sinh.f64 y) < 1e-3Initial program 81.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.7%
associate-/l*99.5%
Simplified99.5%
clear-num99.5%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in x around 0 76.8%
Final simplification75.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 6.0 (/ y (* x x)))) (t_1 (sqrt (* y y))))
(if (<= y -1.7e+217)
(* x (/ y x))
(if (<= y -2.4e+155)
t_1
(if (<= y -245.0)
t_0
(if (<= y 245.0)
(/ y (* x (+ (* x 0.16666666666666666) (/ 1.0 x))))
(if (<= y 8e+150) t_0 t_1)))))))
double code(double x, double y) {
double t_0 = 6.0 * (y / (x * x));
double t_1 = sqrt((y * y));
double tmp;
if (y <= -1.7e+217) {
tmp = x * (y / x);
} else if (y <= -2.4e+155) {
tmp = t_1;
} else if (y <= -245.0) {
tmp = t_0;
} else if (y <= 245.0) {
tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x)));
} else if (y <= 8e+150) {
tmp = t_0;
} 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 = sqrt((y * y))
if (y <= (-1.7d+217)) then
tmp = x * (y / x)
else if (y <= (-2.4d+155)) then
tmp = t_1
else if (y <= (-245.0d0)) then
tmp = t_0
else if (y <= 245.0d0) then
tmp = y / (x * ((x * 0.16666666666666666d0) + (1.0d0 / x)))
else if (y <= 8d+150) then
tmp = t_0
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 = Math.sqrt((y * y));
double tmp;
if (y <= -1.7e+217) {
tmp = x * (y / x);
} else if (y <= -2.4e+155) {
tmp = t_1;
} else if (y <= -245.0) {
tmp = t_0;
} else if (y <= 245.0) {
tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x)));
} else if (y <= 8e+150) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = 6.0 * (y / (x * x)) t_1 = math.sqrt((y * y)) tmp = 0 if y <= -1.7e+217: tmp = x * (y / x) elif y <= -2.4e+155: tmp = t_1 elif y <= -245.0: tmp = t_0 elif y <= 245.0: tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x))) elif y <= 8e+150: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(6.0 * Float64(y / Float64(x * x))) t_1 = sqrt(Float64(y * y)) tmp = 0.0 if (y <= -1.7e+217) tmp = Float64(x * Float64(y / x)); elseif (y <= -2.4e+155) tmp = t_1; elseif (y <= -245.0) tmp = t_0; elseif (y <= 245.0) tmp = Float64(y / Float64(x * Float64(Float64(x * 0.16666666666666666) + Float64(1.0 / x)))); elseif (y <= 8e+150) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = 6.0 * (y / (x * x)); t_1 = sqrt((y * y)); tmp = 0.0; if (y <= -1.7e+217) tmp = x * (y / x); elseif (y <= -2.4e+155) tmp = t_1; elseif (y <= -245.0) tmp = t_0; elseif (y <= 245.0) tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x))); elseif (y <= 8e+150) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(6.0 * N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(y * y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -1.7e+217], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e+155], t$95$1, If[LessEqual[y, -245.0], t$95$0, If[LessEqual[y, 245.0], N[(y / N[(x * N[(N[(x * 0.16666666666666666), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+150], t$95$0, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \frac{y}{x \cdot x}\\
t_1 := \sqrt{y \cdot y}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+217}:\\
\;\;\;\;x \cdot \frac{y}{x}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -245:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 245:\\
\;\;\;\;\frac{y}{x \cdot \left(x \cdot 0.16666666666666666 + \frac{1}{x}\right)}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+150}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.6999999999999999e217Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 6.9%
Taylor expanded in x around 0 34.1%
associate-/l*7.7%
associate-/r/56.4%
Applied egg-rr56.4%
if -1.6999999999999999e217 < y < -2.40000000000000021e155 or 7.99999999999999985e150 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.5%
Taylor expanded in x around 0 24.7%
div-inv24.7%
associate-*l*4.4%
div-inv4.4%
*-inverses4.4%
*-commutative4.4%
*-un-lft-identity4.4%
add-sqr-sqrt3.3%
sqrt-unprod58.6%
Applied egg-rr58.6%
if -2.40000000000000021e155 < y < -245 or 245 < y < 7.99999999999999985e150Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 3.2%
associate-/l*3.2%
Simplified3.2%
clear-num3.2%
associate-/r/3.2%
Applied egg-rr3.2%
Taylor expanded in x around 0 2.6%
Taylor expanded in x around inf 34.9%
unpow234.9%
Simplified34.9%
if -245 < y < 245Initial program 81.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.2%
associate-/l*98.6%
Simplified98.6%
clear-num98.6%
associate-/r/98.5%
Applied egg-rr98.5%
Taylor expanded in x around 0 76.4%
Final simplification62.5%
(FPCore (x y)
:precision binary64
(if (<= y -3e+217)
(sinh y)
(if (<= y -5.6e-5)
(* (sinh y) (+ 1.0 (* -0.16666666666666666 (* x x))))
(if (<= y 0.00195) (* (/ (sin x) x) y) (sinh y)))))
double code(double x, double y) {
double tmp;
if (y <= -3e+217) {
tmp = sinh(y);
} else if (y <= -5.6e-5) {
tmp = sinh(y) * (1.0 + (-0.16666666666666666 * (x * x)));
} else if (y <= 0.00195) {
tmp = (sin(x) / x) * y;
} else {
tmp = 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 <= (-3d+217)) then
tmp = sinh(y)
else if (y <= (-5.6d-5)) then
tmp = sinh(y) * (1.0d0 + ((-0.16666666666666666d0) * (x * x)))
else if (y <= 0.00195d0) then
tmp = (sin(x) / x) * y
else
tmp = sinh(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3e+217) {
tmp = Math.sinh(y);
} else if (y <= -5.6e-5) {
tmp = Math.sinh(y) * (1.0 + (-0.16666666666666666 * (x * x)));
} else if (y <= 0.00195) {
tmp = (Math.sin(x) / x) * y;
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3e+217: tmp = math.sinh(y) elif y <= -5.6e-5: tmp = math.sinh(y) * (1.0 + (-0.16666666666666666 * (x * x))) elif y <= 0.00195: tmp = (math.sin(x) / x) * y else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (y <= -3e+217) tmp = sinh(y); elseif (y <= -5.6e-5) tmp = Float64(sinh(y) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(x * x)))); elseif (y <= 0.00195) tmp = Float64(Float64(sin(x) / x) * y); else tmp = sinh(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3e+217) tmp = sinh(y); elseif (y <= -5.6e-5) tmp = sinh(y) * (1.0 + (-0.16666666666666666 * (x * x))); elseif (y <= 0.00195) tmp = (sin(x) / x) * y; else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3e+217], N[Sinh[y], $MachinePrecision], If[LessEqual[y, -5.6e-5], N[(N[Sinh[y], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00195], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+217}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-5}:\\
\;\;\;\;\sinh y \cdot \left(1 + -0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\mathbf{elif}\;y \leq 0.00195:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if y < -2.99999999999999976e217 or 0.0019499999999999999 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 81.1%
if -2.99999999999999976e217 < y < -5.59999999999999992e-5Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 82.0%
unpow282.0%
Simplified82.0%
if -5.59999999999999992e-5 < y < 0.0019499999999999999Initial program 81.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.7%
associate-/l*99.5%
Simplified99.5%
clear-num99.3%
associate-/r/99.5%
clear-num99.5%
Applied egg-rr99.5%
Final simplification90.8%
(FPCore (x y) :precision binary64 (if (<= y -4.2e-6) (sinh y) (if (<= y 0.055) (* (/ (sin x) x) y) (sinh y))))
double code(double x, double y) {
double tmp;
if (y <= -4.2e-6) {
tmp = sinh(y);
} else if (y <= 0.055) {
tmp = (sin(x) / x) * y;
} else {
tmp = 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 <= (-4.2d-6)) then
tmp = sinh(y)
else if (y <= 0.055d0) then
tmp = (sin(x) / x) * y
else
tmp = sinh(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -4.2e-6) {
tmp = Math.sinh(y);
} else if (y <= 0.055) {
tmp = (Math.sin(x) / x) * y;
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.2e-6: tmp = math.sinh(y) elif y <= 0.055: tmp = (math.sin(x) / x) * y else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.2e-6) tmp = sinh(y); elseif (y <= 0.055) tmp = Float64(Float64(sin(x) / x) * y); else tmp = sinh(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.2e-6) tmp = sinh(y); elseif (y <= 0.055) tmp = (sin(x) / x) * y; else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.2e-6], N[Sinh[y], $MachinePrecision], If[LessEqual[y, 0.055], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-6}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;y \leq 0.055:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if y < -4.1999999999999996e-6 or 0.0550000000000000003 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 73.4%
if -4.1999999999999996e-6 < y < 0.0550000000000000003Initial program 81.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.7%
associate-/l*99.5%
Simplified99.5%
clear-num99.3%
associate-/r/99.5%
clear-num99.5%
Applied egg-rr99.5%
Final simplification86.9%
(FPCore (x y)
:precision binary64
(if (<= y -8.5e+217)
(* x (/ y x))
(if (<= y -2e+153)
(+ y (* x (* y (* x -0.16666666666666666))))
(if (or (<= y -260.0) (not (<= y 250.0)))
(* 6.0 (/ y (* x x)))
(/ y (* x (+ (* x 0.16666666666666666) (/ 1.0 x))))))))
double code(double x, double y) {
double tmp;
if (y <= -8.5e+217) {
tmp = x * (y / x);
} else if (y <= -2e+153) {
tmp = y + (x * (y * (x * -0.16666666666666666)));
} else if ((y <= -260.0) || !(y <= 250.0)) {
tmp = 6.0 * (y / (x * x));
} else {
tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-8.5d+217)) then
tmp = x * (y / x)
else if (y <= (-2d+153)) then
tmp = y + (x * (y * (x * (-0.16666666666666666d0))))
else if ((y <= (-260.0d0)) .or. (.not. (y <= 250.0d0))) then
tmp = 6.0d0 * (y / (x * x))
else
tmp = y / (x * ((x * 0.16666666666666666d0) + (1.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8.5e+217) {
tmp = x * (y / x);
} else if (y <= -2e+153) {
tmp = y + (x * (y * (x * -0.16666666666666666)));
} else if ((y <= -260.0) || !(y <= 250.0)) {
tmp = 6.0 * (y / (x * x));
} else {
tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.5e+217: tmp = x * (y / x) elif y <= -2e+153: tmp = y + (x * (y * (x * -0.16666666666666666))) elif (y <= -260.0) or not (y <= 250.0): tmp = 6.0 * (y / (x * x)) else: tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.5e+217) tmp = Float64(x * Float64(y / x)); elseif (y <= -2e+153) tmp = Float64(y + Float64(x * Float64(y * Float64(x * -0.16666666666666666)))); elseif ((y <= -260.0) || !(y <= 250.0)) tmp = Float64(6.0 * Float64(y / Float64(x * x))); else tmp = Float64(y / Float64(x * Float64(Float64(x * 0.16666666666666666) + Float64(1.0 / x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8.5e+217) tmp = x * (y / x); elseif (y <= -2e+153) tmp = y + (x * (y * (x * -0.16666666666666666))); elseif ((y <= -260.0) || ~((y <= 250.0))) tmp = 6.0 * (y / (x * x)); else tmp = y / (x * ((x * 0.16666666666666666) + (1.0 / x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.5e+217], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e+153], N[(y + N[(x * N[(y * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -260.0], N[Not[LessEqual[y, 250.0]], $MachinePrecision]], N[(6.0 * N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(x * N[(N[(x * 0.16666666666666666), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+217}:\\
\;\;\;\;x \cdot \frac{y}{x}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+153}:\\
\;\;\;\;y + x \cdot \left(y \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq -260 \lor \neg \left(y \leq 250\right):\\
\;\;\;\;6 \cdot \frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x \cdot \left(x \cdot 0.16666666666666666 + \frac{1}{x}\right)}\\
\end{array}
\end{array}
if y < -8.50000000000000021e217Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 6.9%
Taylor expanded in x around 0 34.1%
associate-/l*7.7%
associate-/r/56.4%
Applied egg-rr56.4%
if -8.50000000000000021e217 < y < -2e153Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.2%
associate-/l*4.2%
associate-/r/17.7%
Simplified17.7%
Taylor expanded in x around 0 44.9%
expm1-log1p-u44.9%
expm1-udef44.9%
*-commutative44.9%
associate-*l*44.9%
unpow244.9%
Applied egg-rr44.9%
expm1-def44.9%
expm1-log1p44.9%
*-commutative44.9%
associate-*l*44.9%
associate-*l*44.9%
*-commutative44.9%
Simplified44.9%
if -2e153 < y < -260 or 250 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 3.6%
associate-/l*3.6%
Simplified3.6%
clear-num3.6%
associate-/r/3.6%
Applied egg-rr3.6%
Taylor expanded in x around 0 2.8%
Taylor expanded in x around inf 32.1%
unpow232.1%
Simplified32.1%
if -260 < y < 250Initial program 81.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.2%
associate-/l*98.6%
Simplified98.6%
clear-num98.6%
associate-/r/98.5%
Applied egg-rr98.5%
Taylor expanded in x around 0 76.4%
Final simplification58.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.95e+217)
(* x (/ y x))
(if (<= y -1.1e+155)
(+ y (* x (* y (* x -0.16666666666666666))))
(if (or (<= y -135.0) (not (<= y 200.0)))
(* 6.0 (/ y (* x x)))
(/ y (+ 1.0 (* x (* x -0.16666666666666666))))))))
double code(double x, double y) {
double tmp;
if (y <= -1.95e+217) {
tmp = x * (y / x);
} else if (y <= -1.1e+155) {
tmp = y + (x * (y * (x * -0.16666666666666666)));
} else if ((y <= -135.0) || !(y <= 200.0)) {
tmp = 6.0 * (y / (x * x));
} else {
tmp = y / (1.0 + (x * (x * -0.16666666666666666)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.95d+217)) then
tmp = x * (y / x)
else if (y <= (-1.1d+155)) then
tmp = y + (x * (y * (x * (-0.16666666666666666d0))))
else if ((y <= (-135.0d0)) .or. (.not. (y <= 200.0d0))) then
tmp = 6.0d0 * (y / (x * x))
else
tmp = y / (1.0d0 + (x * (x * (-0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.95e+217) {
tmp = x * (y / x);
} else if (y <= -1.1e+155) {
tmp = y + (x * (y * (x * -0.16666666666666666)));
} else if ((y <= -135.0) || !(y <= 200.0)) {
tmp = 6.0 * (y / (x * x));
} else {
tmp = y / (1.0 + (x * (x * -0.16666666666666666)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.95e+217: tmp = x * (y / x) elif y <= -1.1e+155: tmp = y + (x * (y * (x * -0.16666666666666666))) elif (y <= -135.0) or not (y <= 200.0): tmp = 6.0 * (y / (x * x)) else: tmp = y / (1.0 + (x * (x * -0.16666666666666666))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.95e+217) tmp = Float64(x * Float64(y / x)); elseif (y <= -1.1e+155) tmp = Float64(y + Float64(x * Float64(y * Float64(x * -0.16666666666666666)))); elseif ((y <= -135.0) || !(y <= 200.0)) tmp = Float64(6.0 * Float64(y / Float64(x * x))); else tmp = Float64(y / Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.95e+217) tmp = x * (y / x); elseif (y <= -1.1e+155) tmp = y + (x * (y * (x * -0.16666666666666666))); elseif ((y <= -135.0) || ~((y <= 200.0))) tmp = 6.0 * (y / (x * x)); else tmp = y / (1.0 + (x * (x * -0.16666666666666666))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.95e+217], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e+155], N[(y + N[(x * N[(y * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -135.0], N[Not[LessEqual[y, 200.0]], $MachinePrecision]], N[(6.0 * N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+217}:\\
\;\;\;\;x \cdot \frac{y}{x}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+155}:\\
\;\;\;\;y + x \cdot \left(y \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq -135 \lor \neg \left(y \leq 200\right):\\
\;\;\;\;6 \cdot \frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{1 + x \cdot \left(x \cdot -0.16666666666666666\right)}\\
\end{array}
\end{array}
if y < -1.94999999999999997e217Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 6.9%
Taylor expanded in x around 0 34.1%
associate-/l*7.7%
associate-/r/56.4%
Applied egg-rr56.4%
if -1.94999999999999997e217 < y < -1.1000000000000001e155Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.2%
associate-/l*4.2%
associate-/r/17.7%
Simplified17.7%
Taylor expanded in x around 0 44.9%
expm1-log1p-u44.9%
expm1-udef44.9%
*-commutative44.9%
associate-*l*44.9%
unpow244.9%
Applied egg-rr44.9%
expm1-def44.9%
expm1-log1p44.9%
*-commutative44.9%
associate-*l*44.9%
associate-*l*44.9%
*-commutative44.9%
Simplified44.9%
if -1.1000000000000001e155 < y < -135 or 200 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 3.6%
associate-/l*3.6%
Simplified3.6%
clear-num3.6%
associate-/r/3.6%
Applied egg-rr3.6%
Taylor expanded in x around 0 2.8%
Taylor expanded in x around inf 32.1%
unpow232.1%
Simplified32.1%
if -135 < y < 200Initial program 81.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.2%
associate-/l*98.6%
Simplified98.6%
clear-num98.6%
associate-/r/98.5%
Applied egg-rr98.5%
Taylor expanded in x around 0 76.4%
*-commutative76.4%
distribute-lft-in76.4%
add-sqr-sqrt38.8%
sqrt-unprod75.9%
*-commutative75.9%
*-commutative75.9%
swap-sqr75.9%
metadata-eval75.9%
metadata-eval75.9%
swap-sqr75.9%
sqrt-unprod37.1%
add-sqr-sqrt75.7%
*-commutative75.7%
lft-mult-inverse75.9%
Applied egg-rr75.9%
Final simplification58.5%
(FPCore (x y)
:precision binary64
(if (<= y -4.8e+218)
(* x (/ y x))
(if (<= y -1.45e+151)
(+ y (* x (* y (* x -0.16666666666666666))))
(if (or (<= y -245.0) (not (<= y 7e-11)))
(* 6.0 (/ y (* x x)))
(/ x (/ x y))))))
double code(double x, double y) {
double tmp;
if (y <= -4.8e+218) {
tmp = x * (y / x);
} else if (y <= -1.45e+151) {
tmp = y + (x * (y * (x * -0.16666666666666666)));
} else if ((y <= -245.0) || !(y <= 7e-11)) {
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 <= (-4.8d+218)) then
tmp = x * (y / x)
else if (y <= (-1.45d+151)) then
tmp = y + (x * (y * (x * (-0.16666666666666666d0))))
else if ((y <= (-245.0d0)) .or. (.not. (y <= 7d-11))) 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 <= -4.8e+218) {
tmp = x * (y / x);
} else if (y <= -1.45e+151) {
tmp = y + (x * (y * (x * -0.16666666666666666)));
} else if ((y <= -245.0) || !(y <= 7e-11)) {
tmp = 6.0 * (y / (x * x));
} else {
tmp = x / (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.8e+218: tmp = x * (y / x) elif y <= -1.45e+151: tmp = y + (x * (y * (x * -0.16666666666666666))) elif (y <= -245.0) or not (y <= 7e-11): tmp = 6.0 * (y / (x * x)) else: tmp = x / (x / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.8e+218) tmp = Float64(x * Float64(y / x)); elseif (y <= -1.45e+151) tmp = Float64(y + Float64(x * Float64(y * Float64(x * -0.16666666666666666)))); elseif ((y <= -245.0) || !(y <= 7e-11)) tmp = Float64(6.0 * Float64(y / Float64(x * x))); else tmp = Float64(x / Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.8e+218) tmp = x * (y / x); elseif (y <= -1.45e+151) tmp = y + (x * (y * (x * -0.16666666666666666))); elseif ((y <= -245.0) || ~((y <= 7e-11))) tmp = 6.0 * (y / (x * x)); else tmp = x / (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.8e+218], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e+151], N[(y + N[(x * N[(y * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -245.0], N[Not[LessEqual[y, 7e-11]], $MachinePrecision]], N[(6.0 * N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+218}:\\
\;\;\;\;x \cdot \frac{y}{x}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{+151}:\\
\;\;\;\;y + x \cdot \left(y \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq -245 \lor \neg \left(y \leq 7 \cdot 10^{-11}\right):\\
\;\;\;\;6 \cdot \frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\
\end{array}
\end{array}
if y < -4.79999999999999961e218Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 6.9%
Taylor expanded in x around 0 34.1%
associate-/l*7.7%
associate-/r/56.4%
Applied egg-rr56.4%
if -4.79999999999999961e218 < y < -1.45000000000000009e151Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.2%
associate-/l*4.2%
associate-/r/17.7%
Simplified17.7%
Taylor expanded in x around 0 44.9%
expm1-log1p-u44.9%
expm1-udef44.9%
*-commutative44.9%
associate-*l*44.9%
unpow244.9%
Applied egg-rr44.9%
expm1-def44.9%
expm1-log1p44.9%
*-commutative44.9%
associate-*l*44.9%
associate-*l*44.9%
*-commutative44.9%
Simplified44.9%
if -1.45000000000000009e151 < y < -245 or 7.00000000000000038e-11 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 5.4%
associate-/l*5.4%
Simplified5.4%
clear-num5.4%
associate-/r/5.4%
Applied egg-rr5.4%
Taylor expanded in x around 0 2.9%
Taylor expanded in x around inf 31.4%
unpow231.4%
Simplified31.4%
if -245 < y < 7.00000000000000038e-11Initial program 81.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.3%
Taylor expanded in x around 0 31.8%
associate-/l*50.4%
associate-/r/76.0%
Applied egg-rr76.0%
*-commutative76.0%
clear-num76.6%
un-div-inv76.8%
Applied egg-rr76.8%
Final simplification58.4%
(FPCore (x y) :precision binary64 (if (or (<= y -252.0) (not (<= y 7e-11))) (* 6.0 (/ y (* x x))) (/ x (/ x y))))
double code(double x, double y) {
double tmp;
if ((y <= -252.0) || !(y <= 7e-11)) {
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 <= (-252.0d0)) .or. (.not. (y <= 7d-11))) 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 <= -252.0) || !(y <= 7e-11)) {
tmp = 6.0 * (y / (x * x));
} else {
tmp = x / (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -252.0) or not (y <= 7e-11): tmp = 6.0 * (y / (x * x)) else: tmp = x / (x / y) return tmp
function code(x, y) tmp = 0.0 if ((y <= -252.0) || !(y <= 7e-11)) tmp = Float64(6.0 * Float64(y / Float64(x * x))); else tmp = Float64(x / Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -252.0) || ~((y <= 7e-11))) tmp = 6.0 * (y / (x * x)); else tmp = x / (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -252.0], N[Not[LessEqual[y, 7e-11]], $MachinePrecision]], N[(6.0 * N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -252 \lor \neg \left(y \leq 7 \cdot 10^{-11}\right):\\
\;\;\;\;6 \cdot \frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{x}{y}}\\
\end{array}
\end{array}
if y < -252 or 7.00000000000000038e-11 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 5.6%
associate-/l*5.6%
Simplified5.6%
clear-num5.6%
associate-/r/5.6%
Applied egg-rr5.6%
Taylor expanded in x around 0 3.7%
Taylor expanded in x around inf 35.1%
unpow235.1%
Simplified35.1%
if -252 < y < 7.00000000000000038e-11Initial program 81.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.3%
Taylor expanded in x around 0 31.8%
associate-/l*50.4%
associate-/r/76.0%
Applied egg-rr76.0%
*-commutative76.0%
clear-num76.6%
un-div-inv76.8%
Applied egg-rr76.8%
Final simplification56.8%
(FPCore (x y) :precision binary64 (if (<= y 1.8e+148) (* x (/ y x)) (/ (* x y) x)))
double code(double x, double y) {
double tmp;
if (y <= 1.8e+148) {
tmp = x * (y / x);
} else {
tmp = (x * y) / x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.8d+148) then
tmp = x * (y / x)
else
tmp = (x * y) / x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e+148) {
tmp = x * (y / x);
} else {
tmp = (x * y) / x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.8e+148: tmp = x * (y / x) else: tmp = (x * y) / x return tmp
function code(x, y) tmp = 0.0 if (y <= 1.8e+148) tmp = Float64(x * Float64(y / x)); else tmp = Float64(Float64(x * y) / x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.8e+148) tmp = x * (y / x); else tmp = (x * y) / x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.8e+148], N[(x * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{+148}:\\
\;\;\;\;x \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{x}\\
\end{array}
\end{array}
if y < 1.80000000000000003e148Initial program 89.3%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 48.1%
Taylor expanded in x around 0 25.0%
associate-/l*30.4%
associate-/r/54.5%
Applied egg-rr54.5%
if 1.80000000000000003e148 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.6%
Taylor expanded in x around 0 38.7%
Final simplification53.1%
(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 90.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 44.4%
Taylor expanded in x around 0 26.2%
associate-/l*28.3%
associate-/r/51.4%
Applied egg-rr51.4%
Final simplification51.4%
(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 90.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 44.4%
associate-/l*54.1%
associate-/r/63.8%
Simplified63.8%
Taylor expanded in x around 0 28.3%
Final simplification28.3%
(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 2023214
(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))