
(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 11 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 87.5%
associate-*r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y) :precision binary64 (if (<= (sinh y) -7e-5) (sinh y) (if (<= (sinh y) 40000000.0) (* (sin x) (/ y x)) (sinh y))))
double code(double x, double y) {
double tmp;
if (sinh(y) <= -7e-5) {
tmp = sinh(y);
} else if (sinh(y) <= 40000000.0) {
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) <= (-7d-5)) then
tmp = sinh(y)
else if (sinh(y) <= 40000000.0d0) 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) <= -7e-5) {
tmp = Math.sinh(y);
} else if (Math.sinh(y) <= 40000000.0) {
tmp = Math.sin(x) * (y / x);
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if math.sinh(y) <= -7e-5: tmp = math.sinh(y) elif math.sinh(y) <= 40000000.0: tmp = math.sin(x) * (y / x) else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (sinh(y) <= -7e-5) tmp = sinh(y); elseif (sinh(y) <= 40000000.0) 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) <= -7e-5) tmp = sinh(y); elseif (sinh(y) <= 40000000.0) tmp = sin(x) * (y / x); else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], -7e-5], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 40000000.0], 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 -7 \cdot 10^{-5}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;\sinh y \leq 40000000:\\
\;\;\;\;\sin x \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (sinh.f64 y) < -6.9999999999999994e-5 or 4e7 < (sinh.f64 y) Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 76.1%
if -6.9999999999999994e-5 < (sinh.f64 y) < 4e7Initial program 73.9%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 97.5%
Final simplification86.3%
(FPCore (x y) :precision binary64 (if (<= (sinh y) -7e-5) (sinh y) (if (<= (sinh y) 40000000.0) (/ y (/ x (sin x))) (sinh y))))
double code(double x, double y) {
double tmp;
if (sinh(y) <= -7e-5) {
tmp = sinh(y);
} else if (sinh(y) <= 40000000.0) {
tmp = y / (x / sin(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) <= (-7d-5)) then
tmp = sinh(y)
else if (sinh(y) <= 40000000.0d0) then
tmp = y / (x / sin(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) <= -7e-5) {
tmp = Math.sinh(y);
} else if (Math.sinh(y) <= 40000000.0) {
tmp = y / (x / Math.sin(x));
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if math.sinh(y) <= -7e-5: tmp = math.sinh(y) elif math.sinh(y) <= 40000000.0: tmp = y / (x / math.sin(x)) else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (sinh(y) <= -7e-5) tmp = sinh(y); elseif (sinh(y) <= 40000000.0) tmp = Float64(y / Float64(x / sin(x))); else tmp = sinh(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (sinh(y) <= -7e-5) tmp = sinh(y); elseif (sinh(y) <= 40000000.0) tmp = y / (x / sin(x)); else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], -7e-5], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 40000000.0], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -7 \cdot 10^{-5}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;\sinh y \leq 40000000:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (sinh.f64 y) < -6.9999999999999994e-5 or 4e7 < (sinh.f64 y) Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 76.1%
if -6.9999999999999994e-5 < (sinh.f64 y) < 4e7Initial program 73.9%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 71.5%
associate-/l*97.5%
Simplified97.5%
Final simplification86.3%
(FPCore (x y)
:precision binary64
(if (<= (sinh y) -1e-17)
(sinh y)
(if (<= (sinh y) 40000000.0)
(/ 1.0 (/ (+ 1.0 (* x (* x 0.16666666666666666))) y))
(sinh y))))
double code(double x, double y) {
double tmp;
if (sinh(y) <= -1e-17) {
tmp = sinh(y);
} else if (sinh(y) <= 40000000.0) {
tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / 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 (sinh(y) <= (-1d-17)) then
tmp = sinh(y)
else if (sinh(y) <= 40000000.0d0) then
tmp = 1.0d0 / ((1.0d0 + (x * (x * 0.16666666666666666d0))) / y)
else
tmp = sinh(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (Math.sinh(y) <= -1e-17) {
tmp = Math.sinh(y);
} else if (Math.sinh(y) <= 40000000.0) {
tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / y);
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if math.sinh(y) <= -1e-17: tmp = math.sinh(y) elif math.sinh(y) <= 40000000.0: tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / y) else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (sinh(y) <= -1e-17) tmp = sinh(y); elseif (sinh(y) <= 40000000.0) tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(x * Float64(x * 0.16666666666666666))) / y)); else tmp = sinh(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (sinh(y) <= -1e-17) tmp = sinh(y); elseif (sinh(y) <= 40000000.0) tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / y); else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], -1e-17], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 40000000.0], N[(1.0 / N[(N[(1.0 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -1 \cdot 10^{-17}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;\sinh y \leq 40000000:\\
\;\;\;\;\frac{1}{\frac{1 + x \cdot \left(x \cdot 0.16666666666666666\right)}{y}}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (sinh.f64 y) < -1.00000000000000007e-17 or 4e7 < (sinh.f64 y) Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 75.8%
if -1.00000000000000007e-17 < (sinh.f64 y) < 4e7Initial program 73.4%
associate-*r/99.8%
Simplified99.8%
associate-*r/73.4%
clear-num72.2%
Applied egg-rr72.2%
Taylor expanded in y around 0 70.1%
associate-/r*96.3%
Simplified96.3%
Taylor expanded in x around 0 78.3%
associate-*r/78.3%
metadata-eval78.3%
distribute-lft-neg-in78.3%
*-commutative78.3%
unpow278.3%
associate-*r*78.3%
distribute-frac-neg78.3%
sub-neg78.3%
div-sub78.3%
associate-*r*78.3%
unpow278.3%
*-commutative78.3%
cancel-sign-sub-inv78.3%
metadata-eval78.3%
*-commutative78.3%
unpow278.3%
associate-*l*78.3%
Simplified78.3%
Final simplification76.9%
(FPCore (x y)
:precision binary64
(if (<= y -7.2e-5)
(sinh y)
(if (<= y 18.0)
(/ y (/ x (sin x)))
(if (<= y 5e+226)
(sinh y)
(* (sinh y) (+ 1.0 (* (* x x) -0.16666666666666666)))))))
double code(double x, double y) {
double tmp;
if (y <= -7.2e-5) {
tmp = sinh(y);
} else if (y <= 18.0) {
tmp = y / (x / sin(x));
} else if (y <= 5e+226) {
tmp = sinh(y);
} else {
tmp = sinh(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 <= (-7.2d-5)) then
tmp = sinh(y)
else if (y <= 18.0d0) then
tmp = y / (x / sin(x))
else if (y <= 5d+226) then
tmp = sinh(y)
else
tmp = sinh(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 <= -7.2e-5) {
tmp = Math.sinh(y);
} else if (y <= 18.0) {
tmp = y / (x / Math.sin(x));
} else if (y <= 5e+226) {
tmp = Math.sinh(y);
} else {
tmp = Math.sinh(y) * (1.0 + ((x * x) * -0.16666666666666666));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.2e-5: tmp = math.sinh(y) elif y <= 18.0: tmp = y / (x / math.sin(x)) elif y <= 5e+226: tmp = math.sinh(y) else: tmp = math.sinh(y) * (1.0 + ((x * x) * -0.16666666666666666)) return tmp
function code(x, y) tmp = 0.0 if (y <= -7.2e-5) tmp = sinh(y); elseif (y <= 18.0) tmp = Float64(y / Float64(x / sin(x))); elseif (y <= 5e+226) tmp = sinh(y); else tmp = Float64(sinh(y) * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -7.2e-5) tmp = sinh(y); elseif (y <= 18.0) tmp = y / (x / sin(x)); elseif (y <= 5e+226) tmp = sinh(y); else tmp = sinh(y) * (1.0 + ((x * x) * -0.16666666666666666)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.2e-5], N[Sinh[y], $MachinePrecision], If[LessEqual[y, 18.0], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+226], N[Sinh[y], $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-5}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;y \leq 18:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+226}:\\
\;\;\;\;\sinh y\\
\mathbf{else}:\\
\;\;\;\;\sinh y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if y < -7.20000000000000018e-5 or 18 < y < 5.0000000000000005e226Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 79.3%
if -7.20000000000000018e-5 < y < 18Initial program 73.9%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 71.5%
associate-/l*97.5%
Simplified97.5%
if 5.0000000000000005e226 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 88.9%
*-commutative43.2%
unpow243.2%
Simplified88.9%
Final simplification88.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ 1.0 (/ (/ x y) x))))
(if (<= y -2.2e+163)
t_0
(if (<= y -5.8e+135)
(/ 1.0 0.0)
(if (<= y -1.9e+107)
t_0
(if (<= y -41000.0)
(/ 1.0 0.0)
(if (<= y 540.0)
t_0
(if (<= y 5.2e+226)
(/ 1.0 0.0)
(if (<= y 1e+262)
(* y (+ 1.0 (* (* x x) -0.16666666666666666)))
(/ 1.0 0.0))))))))))
double code(double x, double y) {
double t_0 = 1.0 / ((x / y) / x);
double tmp;
if (y <= -2.2e+163) {
tmp = t_0;
} else if (y <= -5.8e+135) {
tmp = 1.0 / 0.0;
} else if (y <= -1.9e+107) {
tmp = t_0;
} else if (y <= -41000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 540.0) {
tmp = t_0;
} else if (y <= 5.2e+226) {
tmp = 1.0 / 0.0;
} else if (y <= 1e+262) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else {
tmp = 1.0 / 0.0;
}
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 = 1.0d0 / ((x / y) / x)
if (y <= (-2.2d+163)) then
tmp = t_0
else if (y <= (-5.8d+135)) then
tmp = 1.0d0 / 0.0d0
else if (y <= (-1.9d+107)) then
tmp = t_0
else if (y <= (-41000.0d0)) then
tmp = 1.0d0 / 0.0d0
else if (y <= 540.0d0) then
tmp = t_0
else if (y <= 5.2d+226) then
tmp = 1.0d0 / 0.0d0
else if (y <= 1d+262) then
tmp = y * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))
else
tmp = 1.0d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 / ((x / y) / x);
double tmp;
if (y <= -2.2e+163) {
tmp = t_0;
} else if (y <= -5.8e+135) {
tmp = 1.0 / 0.0;
} else if (y <= -1.9e+107) {
tmp = t_0;
} else if (y <= -41000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 540.0) {
tmp = t_0;
} else if (y <= 5.2e+226) {
tmp = 1.0 / 0.0;
} else if (y <= 1e+262) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else {
tmp = 1.0 / 0.0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 / ((x / y) / x) tmp = 0 if y <= -2.2e+163: tmp = t_0 elif y <= -5.8e+135: tmp = 1.0 / 0.0 elif y <= -1.9e+107: tmp = t_0 elif y <= -41000.0: tmp = 1.0 / 0.0 elif y <= 540.0: tmp = t_0 elif y <= 5.2e+226: tmp = 1.0 / 0.0 elif y <= 1e+262: tmp = y * (1.0 + ((x * x) * -0.16666666666666666)) else: tmp = 1.0 / 0.0 return tmp
function code(x, y) t_0 = Float64(1.0 / Float64(Float64(x / y) / x)) tmp = 0.0 if (y <= -2.2e+163) tmp = t_0; elseif (y <= -5.8e+135) tmp = Float64(1.0 / 0.0); elseif (y <= -1.9e+107) tmp = t_0; elseif (y <= -41000.0) tmp = Float64(1.0 / 0.0); elseif (y <= 540.0) tmp = t_0; elseif (y <= 5.2e+226) tmp = Float64(1.0 / 0.0); elseif (y <= 1e+262) tmp = Float64(y * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))); else tmp = Float64(1.0 / 0.0); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 / ((x / y) / x); tmp = 0.0; if (y <= -2.2e+163) tmp = t_0; elseif (y <= -5.8e+135) tmp = 1.0 / 0.0; elseif (y <= -1.9e+107) tmp = t_0; elseif (y <= -41000.0) tmp = 1.0 / 0.0; elseif (y <= 540.0) tmp = t_0; elseif (y <= 5.2e+226) tmp = 1.0 / 0.0; elseif (y <= 1e+262) tmp = y * (1.0 + ((x * x) * -0.16666666666666666)); else tmp = 1.0 / 0.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 / N[(N[(x / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+163], t$95$0, If[LessEqual[y, -5.8e+135], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, -1.9e+107], t$95$0, If[LessEqual[y, -41000.0], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 540.0], t$95$0, If[LessEqual[y, 5.2e+226], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 1e+262], N[(y * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / 0.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\frac{\frac{x}{y}}{x}}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+163}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+135}:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{+107}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -41000:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 540:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+226}:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 10^{+262}:\\
\;\;\;\;y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{0}\\
\end{array}
\end{array}
if y < -2.19999999999999986e163 or -5.7999999999999997e135 < y < -1.8999999999999999e107 or -41000 < y < 540Initial program 80.3%
associate-*r/99.9%
Simplified99.9%
associate-*r/80.3%
clear-num79.4%
Applied egg-rr79.4%
Taylor expanded in y around 0 54.7%
associate-/r*85.6%
Simplified85.6%
Taylor expanded in x around 0 71.0%
if -2.19999999999999986e163 < y < -5.7999999999999997e135 or -1.8999999999999999e107 < y < -41000 or 540 < y < 5.2000000000000005e226 or 1e262 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
associate-*r/100.0%
clear-num100.0%
Applied egg-rr100.0%
Applied egg-rr66.3%
if 5.2000000000000005e226 < y < 1e262Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.7%
Taylor expanded in x around 0 66.1%
*-commutative66.1%
unpow266.1%
Simplified66.1%
Final simplification69.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ 1.0 (/ (/ x y) x))))
(if (<= y -7e+160)
t_0
(if (<= y -7.2e+134)
(/ 1.0 0.0)
(if (<= y -1.75e+107)
t_0
(if (<= y -45000.0)
(/ 1.0 0.0)
(if (<= y 410.0)
(/ 1.0 (/ (+ 1.0 (* x (* x 0.16666666666666666))) y))
(if (<= y 5.2e+226)
(/ 1.0 0.0)
(if (<= y 1e+262)
(* y (+ 1.0 (* (* x x) -0.16666666666666666)))
(/ 1.0 0.0))))))))))
double code(double x, double y) {
double t_0 = 1.0 / ((x / y) / x);
double tmp;
if (y <= -7e+160) {
tmp = t_0;
} else if (y <= -7.2e+134) {
tmp = 1.0 / 0.0;
} else if (y <= -1.75e+107) {
tmp = t_0;
} else if (y <= -45000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 410.0) {
tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / y);
} else if (y <= 5.2e+226) {
tmp = 1.0 / 0.0;
} else if (y <= 1e+262) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else {
tmp = 1.0 / 0.0;
}
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 = 1.0d0 / ((x / y) / x)
if (y <= (-7d+160)) then
tmp = t_0
else if (y <= (-7.2d+134)) then
tmp = 1.0d0 / 0.0d0
else if (y <= (-1.75d+107)) then
tmp = t_0
else if (y <= (-45000.0d0)) then
tmp = 1.0d0 / 0.0d0
else if (y <= 410.0d0) then
tmp = 1.0d0 / ((1.0d0 + (x * (x * 0.16666666666666666d0))) / y)
else if (y <= 5.2d+226) then
tmp = 1.0d0 / 0.0d0
else if (y <= 1d+262) then
tmp = y * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))
else
tmp = 1.0d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 / ((x / y) / x);
double tmp;
if (y <= -7e+160) {
tmp = t_0;
} else if (y <= -7.2e+134) {
tmp = 1.0 / 0.0;
} else if (y <= -1.75e+107) {
tmp = t_0;
} else if (y <= -45000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 410.0) {
tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / y);
} else if (y <= 5.2e+226) {
tmp = 1.0 / 0.0;
} else if (y <= 1e+262) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else {
tmp = 1.0 / 0.0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 / ((x / y) / x) tmp = 0 if y <= -7e+160: tmp = t_0 elif y <= -7.2e+134: tmp = 1.0 / 0.0 elif y <= -1.75e+107: tmp = t_0 elif y <= -45000.0: tmp = 1.0 / 0.0 elif y <= 410.0: tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / y) elif y <= 5.2e+226: tmp = 1.0 / 0.0 elif y <= 1e+262: tmp = y * (1.0 + ((x * x) * -0.16666666666666666)) else: tmp = 1.0 / 0.0 return tmp
function code(x, y) t_0 = Float64(1.0 / Float64(Float64(x / y) / x)) tmp = 0.0 if (y <= -7e+160) tmp = t_0; elseif (y <= -7.2e+134) tmp = Float64(1.0 / 0.0); elseif (y <= -1.75e+107) tmp = t_0; elseif (y <= -45000.0) tmp = Float64(1.0 / 0.0); elseif (y <= 410.0) tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(x * Float64(x * 0.16666666666666666))) / y)); elseif (y <= 5.2e+226) tmp = Float64(1.0 / 0.0); elseif (y <= 1e+262) tmp = Float64(y * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))); else tmp = Float64(1.0 / 0.0); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 / ((x / y) / x); tmp = 0.0; if (y <= -7e+160) tmp = t_0; elseif (y <= -7.2e+134) tmp = 1.0 / 0.0; elseif (y <= -1.75e+107) tmp = t_0; elseif (y <= -45000.0) tmp = 1.0 / 0.0; elseif (y <= 410.0) tmp = 1.0 / ((1.0 + (x * (x * 0.16666666666666666))) / y); elseif (y <= 5.2e+226) tmp = 1.0 / 0.0; elseif (y <= 1e+262) tmp = y * (1.0 + ((x * x) * -0.16666666666666666)); else tmp = 1.0 / 0.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 / N[(N[(x / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+160], t$95$0, If[LessEqual[y, -7.2e+134], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, -1.75e+107], t$95$0, If[LessEqual[y, -45000.0], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 410.0], N[(1.0 / N[(N[(1.0 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+226], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 1e+262], N[(y * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / 0.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\frac{\frac{x}{y}}{x}}\\
\mathbf{if}\;y \leq -7 \cdot 10^{+160}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{+134}:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{+107}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -45000:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 410:\\
\;\;\;\;\frac{1}{\frac{1 + x \cdot \left(x \cdot 0.16666666666666666\right)}{y}}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+226}:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 10^{+262}:\\
\;\;\;\;y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{0}\\
\end{array}
\end{array}
if y < -7.00000000000000051e160 or -7.19999999999999976e134 < y < -1.7499999999999999e107Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
associate-*r/100.0%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 5.6%
associate-/r*57.3%
Simplified57.3%
Taylor expanded in x around 0 57.4%
if -7.00000000000000051e160 < y < -7.19999999999999976e134 or -1.7499999999999999e107 < y < -45000 or 410 < y < 5.2000000000000005e226 or 1e262 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
associate-*r/100.0%
clear-num100.0%
Applied egg-rr100.0%
Applied egg-rr66.3%
if -45000 < y < 410Initial program 74.7%
associate-*r/99.9%
Simplified99.9%
associate-*r/74.7%
clear-num73.5%
Applied egg-rr73.5%
Taylor expanded in y around 0 68.7%
associate-/r*93.6%
Simplified93.6%
Taylor expanded in x around 0 75.9%
associate-*r/75.9%
metadata-eval75.9%
distribute-lft-neg-in75.9%
*-commutative75.9%
unpow275.9%
associate-*r*75.9%
distribute-frac-neg75.9%
sub-neg75.9%
div-sub75.9%
associate-*r*75.9%
unpow275.9%
*-commutative75.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
*-commutative75.9%
unpow275.9%
associate-*l*75.9%
Simplified75.9%
if 5.2000000000000005e226 < y < 1e262Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.7%
Taylor expanded in x around 0 66.1%
*-commutative66.1%
unpow266.1%
Simplified66.1%
Final simplification69.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ 1.0 (/ (/ x y) x))))
(if (<= y -6e+161)
t_0
(if (<= y -4e+135)
(/ 1.0 0.0)
(if (<= y -8.8e+111)
t_0
(if (<= y -42000.0)
(/ 1.0 0.0)
(if (<= y 520.0)
t_0
(if (<= y 5.2e+226)
(/ 1.0 0.0)
(if (<= y 1.1e+262)
(* y (* x (* x -0.16666666666666666)))
(/ 1.0 0.0))))))))))
double code(double x, double y) {
double t_0 = 1.0 / ((x / y) / x);
double tmp;
if (y <= -6e+161) {
tmp = t_0;
} else if (y <= -4e+135) {
tmp = 1.0 / 0.0;
} else if (y <= -8.8e+111) {
tmp = t_0;
} else if (y <= -42000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 520.0) {
tmp = t_0;
} else if (y <= 5.2e+226) {
tmp = 1.0 / 0.0;
} else if (y <= 1.1e+262) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = 1.0 / 0.0;
}
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 = 1.0d0 / ((x / y) / x)
if (y <= (-6d+161)) then
tmp = t_0
else if (y <= (-4d+135)) then
tmp = 1.0d0 / 0.0d0
else if (y <= (-8.8d+111)) then
tmp = t_0
else if (y <= (-42000.0d0)) then
tmp = 1.0d0 / 0.0d0
else if (y <= 520.0d0) then
tmp = t_0
else if (y <= 5.2d+226) then
tmp = 1.0d0 / 0.0d0
else if (y <= 1.1d+262) then
tmp = y * (x * (x * (-0.16666666666666666d0)))
else
tmp = 1.0d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 / ((x / y) / x);
double tmp;
if (y <= -6e+161) {
tmp = t_0;
} else if (y <= -4e+135) {
tmp = 1.0 / 0.0;
} else if (y <= -8.8e+111) {
tmp = t_0;
} else if (y <= -42000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 520.0) {
tmp = t_0;
} else if (y <= 5.2e+226) {
tmp = 1.0 / 0.0;
} else if (y <= 1.1e+262) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = 1.0 / 0.0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 / ((x / y) / x) tmp = 0 if y <= -6e+161: tmp = t_0 elif y <= -4e+135: tmp = 1.0 / 0.0 elif y <= -8.8e+111: tmp = t_0 elif y <= -42000.0: tmp = 1.0 / 0.0 elif y <= 520.0: tmp = t_0 elif y <= 5.2e+226: tmp = 1.0 / 0.0 elif y <= 1.1e+262: tmp = y * (x * (x * -0.16666666666666666)) else: tmp = 1.0 / 0.0 return tmp
function code(x, y) t_0 = Float64(1.0 / Float64(Float64(x / y) / x)) tmp = 0.0 if (y <= -6e+161) tmp = t_0; elseif (y <= -4e+135) tmp = Float64(1.0 / 0.0); elseif (y <= -8.8e+111) tmp = t_0; elseif (y <= -42000.0) tmp = Float64(1.0 / 0.0); elseif (y <= 520.0) tmp = t_0; elseif (y <= 5.2e+226) tmp = Float64(1.0 / 0.0); elseif (y <= 1.1e+262) tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); else tmp = Float64(1.0 / 0.0); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 / ((x / y) / x); tmp = 0.0; if (y <= -6e+161) tmp = t_0; elseif (y <= -4e+135) tmp = 1.0 / 0.0; elseif (y <= -8.8e+111) tmp = t_0; elseif (y <= -42000.0) tmp = 1.0 / 0.0; elseif (y <= 520.0) tmp = t_0; elseif (y <= 5.2e+226) tmp = 1.0 / 0.0; elseif (y <= 1.1e+262) tmp = y * (x * (x * -0.16666666666666666)); else tmp = 1.0 / 0.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 / N[(N[(x / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e+161], t$95$0, If[LessEqual[y, -4e+135], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, -8.8e+111], t$95$0, If[LessEqual[y, -42000.0], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 520.0], t$95$0, If[LessEqual[y, 5.2e+226], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 1.1e+262], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / 0.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\frac{\frac{x}{y}}{x}}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+161}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+135}:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq -8.8 \cdot 10^{+111}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -42000:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 520:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+226}:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+262}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{0}\\
\end{array}
\end{array}
if y < -6.00000000000000023e161 or -3.99999999999999985e135 < y < -8.79999999999999994e111 or -42000 < y < 520Initial program 80.3%
associate-*r/99.9%
Simplified99.9%
associate-*r/80.3%
clear-num79.4%
Applied egg-rr79.4%
Taylor expanded in y around 0 54.7%
associate-/r*85.6%
Simplified85.6%
Taylor expanded in x around 0 71.0%
if -6.00000000000000023e161 < y < -3.99999999999999985e135 or -8.79999999999999994e111 < y < -42000 or 520 < y < 5.2000000000000005e226 or 1.10000000000000005e262 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
associate-*r/100.0%
clear-num100.0%
Applied egg-rr100.0%
Applied egg-rr66.3%
if 5.2000000000000005e226 < y < 1.10000000000000005e262Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.7%
Taylor expanded in x around 0 66.1%
*-commutative66.1%
unpow266.1%
Simplified66.1%
Taylor expanded in x around inf 64.6%
*-commutative64.6%
associate-*r*64.6%
unpow264.6%
associate-*r*64.6%
Simplified64.6%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(if (<= y -41000.0)
(/ 1.0 0.0)
(if (<= y 430.0)
y
(if (or (<= y 5.2e+226) (not (<= y 8.2e+264)))
(/ 1.0 0.0)
(* y (* x (* x -0.16666666666666666)))))))
double code(double x, double y) {
double tmp;
if (y <= -41000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 430.0) {
tmp = y;
} else if ((y <= 5.2e+226) || !(y <= 8.2e+264)) {
tmp = 1.0 / 0.0;
} else {
tmp = y * (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 <= (-41000.0d0)) then
tmp = 1.0d0 / 0.0d0
else if (y <= 430.0d0) then
tmp = y
else if ((y <= 5.2d+226) .or. (.not. (y <= 8.2d+264))) then
tmp = 1.0d0 / 0.0d0
else
tmp = y * (x * (x * (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -41000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 430.0) {
tmp = y;
} else if ((y <= 5.2e+226) || !(y <= 8.2e+264)) {
tmp = 1.0 / 0.0;
} else {
tmp = y * (x * (x * -0.16666666666666666));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -41000.0: tmp = 1.0 / 0.0 elif y <= 430.0: tmp = y elif (y <= 5.2e+226) or not (y <= 8.2e+264): tmp = 1.0 / 0.0 else: tmp = y * (x * (x * -0.16666666666666666)) return tmp
function code(x, y) tmp = 0.0 if (y <= -41000.0) tmp = Float64(1.0 / 0.0); elseif (y <= 430.0) tmp = y; elseif ((y <= 5.2e+226) || !(y <= 8.2e+264)) tmp = Float64(1.0 / 0.0); else tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -41000.0) tmp = 1.0 / 0.0; elseif (y <= 430.0) tmp = y; elseif ((y <= 5.2e+226) || ~((y <= 8.2e+264))) tmp = 1.0 / 0.0; else tmp = y * (x * (x * -0.16666666666666666)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -41000.0], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 430.0], y, If[Or[LessEqual[y, 5.2e+226], N[Not[LessEqual[y, 8.2e+264]], $MachinePrecision]], N[(1.0 / 0.0), $MachinePrecision], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -41000:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 430:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+226} \lor \neg \left(y \leq 8.2 \cdot 10^{+264}\right):\\
\;\;\;\;\frac{1}{0}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if y < -41000 or 430 < y < 5.2000000000000005e226 or 8.1999999999999999e264 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
associate-*r/100.0%
clear-num100.0%
Applied egg-rr100.0%
Applied egg-rr51.3%
if -41000 < y < 430Initial program 74.7%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around 0 94.9%
Taylor expanded in x around 0 51.1%
if 5.2000000000000005e226 < y < 8.1999999999999999e264Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 4.7%
Taylor expanded in x around 0 66.1%
*-commutative66.1%
unpow266.1%
Simplified66.1%
Taylor expanded in x around inf 64.6%
*-commutative64.6%
associate-*r*64.6%
unpow264.6%
associate-*r*64.6%
Simplified64.6%
Final simplification51.8%
(FPCore (x y) :precision binary64 (if (<= y -41000.0) (/ 1.0 0.0) (if (<= y 510.0) y (/ 1.0 0.0))))
double code(double x, double y) {
double tmp;
if (y <= -41000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 510.0) {
tmp = y;
} else {
tmp = 1.0 / 0.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-41000.0d0)) then
tmp = 1.0d0 / 0.0d0
else if (y <= 510.0d0) then
tmp = y
else
tmp = 1.0d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -41000.0) {
tmp = 1.0 / 0.0;
} else if (y <= 510.0) {
tmp = y;
} else {
tmp = 1.0 / 0.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -41000.0: tmp = 1.0 / 0.0 elif y <= 510.0: tmp = y else: tmp = 1.0 / 0.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -41000.0) tmp = Float64(1.0 / 0.0); elseif (y <= 510.0) tmp = y; else tmp = Float64(1.0 / 0.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -41000.0) tmp = 1.0 / 0.0; elseif (y <= 510.0) tmp = y; else tmp = 1.0 / 0.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -41000.0], N[(1.0 / 0.0), $MachinePrecision], If[LessEqual[y, 510.0], y, N[(1.0 / 0.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -41000:\\
\;\;\;\;\frac{1}{0}\\
\mathbf{elif}\;y \leq 510:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{0}\\
\end{array}
\end{array}
if y < -41000 or 510 < y Initial program 100.0%
associate-*r/100.0%
Simplified100.0%
associate-*r/100.0%
clear-num100.0%
Applied egg-rr100.0%
Applied egg-rr49.2%
if -41000 < y < 510Initial program 74.7%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around 0 94.9%
Taylor expanded in x around 0 51.1%
Final simplification50.2%
(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 87.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 49.0%
Taylor expanded in x around 0 27.3%
Final simplification27.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 2024034
(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))