
(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 14 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 88.3%
associate-*l/100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y) :precision binary64 (if (<= (sinh y) -1e-5) (sinh y) (if (<= (sinh y) 5e-6) (* (sin x) (/ y x)) (sinh y))))
double code(double x, double y) {
double tmp;
if (sinh(y) <= -1e-5) {
tmp = sinh(y);
} else if (sinh(y) <= 5e-6) {
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) <= (-1d-5)) then
tmp = sinh(y)
else if (sinh(y) <= 5d-6) 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) <= -1e-5) {
tmp = Math.sinh(y);
} else if (Math.sinh(y) <= 5e-6) {
tmp = Math.sin(x) * (y / x);
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if math.sinh(y) <= -1e-5: tmp = math.sinh(y) elif math.sinh(y) <= 5e-6: tmp = math.sin(x) * (y / x) else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (sinh(y) <= -1e-5) tmp = sinh(y); elseif (sinh(y) <= 5e-6) 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) <= -1e-5) tmp = sinh(y); elseif (sinh(y) <= 5e-6) tmp = sin(x) * (y / x); else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], -1e-5], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 5e-6], 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 -1 \cdot 10^{-5}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;\sinh y \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\sin x \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (sinh.f64 y) < -1.00000000000000008e-5 or 5.00000000000000041e-6 < (sinh.f64 y) Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 69.9%
if -1.00000000000000008e-5 < (sinh.f64 y) < 5.00000000000000041e-6Initial program 75.1%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in y around 0 74.8%
associate-/l*99.7%
associate-/r/99.5%
Simplified99.5%
Final simplification83.8%
(FPCore (x y) :precision binary64 (if (<= (sinh y) -1e-5) (sinh y) (if (<= (sinh y) 5e-6) (* (/ (sin x) x) y) (sinh y))))
double code(double x, double y) {
double tmp;
if (sinh(y) <= -1e-5) {
tmp = sinh(y);
} else if (sinh(y) <= 5e-6) {
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 (sinh(y) <= (-1d-5)) then
tmp = sinh(y)
else if (sinh(y) <= 5d-6) 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 (Math.sinh(y) <= -1e-5) {
tmp = Math.sinh(y);
} else if (Math.sinh(y) <= 5e-6) {
tmp = (Math.sin(x) / x) * y;
} else {
tmp = Math.sinh(y);
}
return tmp;
}
def code(x, y): tmp = 0 if math.sinh(y) <= -1e-5: tmp = math.sinh(y) elif math.sinh(y) <= 5e-6: tmp = (math.sin(x) / x) * y else: tmp = math.sinh(y) return tmp
function code(x, y) tmp = 0.0 if (sinh(y) <= -1e-5) tmp = sinh(y); elseif (sinh(y) <= 5e-6) 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 (sinh(y) <= -1e-5) tmp = sinh(y); elseif (sinh(y) <= 5e-6) tmp = (sin(x) / x) * y; else tmp = sinh(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Sinh[y], $MachinePrecision], -1e-5], N[Sinh[y], $MachinePrecision], If[LessEqual[N[Sinh[y], $MachinePrecision], 5e-6], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sinh y \leq -1 \cdot 10^{-5}:\\
\;\;\;\;\sinh y\\
\mathbf{elif}\;\sinh y \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (sinh.f64 y) < -1.00000000000000008e-5 or 5.00000000000000041e-6 < (sinh.f64 y) Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 69.9%
if -1.00000000000000008e-5 < (sinh.f64 y) < 5.00000000000000041e-6Initial program 75.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 99.7%
Final simplification83.8%
(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 88.3%
associate-*r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (+ 1.0 (* (* x x) -0.16666666666666666)) (sinh y))))
(if (<= y -1.7e-5)
t_0
(if (<= y 0.00019)
(* (/ (sin x) x) y)
(if (<= y 1.18e+132) (sinh y) t_0)))))
double code(double x, double y) {
double t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * sinh(y);
double tmp;
if (y <= -1.7e-5) {
tmp = t_0;
} else if (y <= 0.00019) {
tmp = (sin(x) / x) * y;
} else if (y <= 1.18e+132) {
tmp = sinh(y);
} else {
tmp = t_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 * x) * (-0.16666666666666666d0))) * sinh(y)
if (y <= (-1.7d-5)) then
tmp = t_0
else if (y <= 0.00019d0) then
tmp = (sin(x) / x) * y
else if (y <= 1.18d+132) then
tmp = sinh(y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * Math.sinh(y);
double tmp;
if (y <= -1.7e-5) {
tmp = t_0;
} else if (y <= 0.00019) {
tmp = (Math.sin(x) / x) * y;
} else if (y <= 1.18e+132) {
tmp = Math.sinh(y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * math.sinh(y) tmp = 0 if y <= -1.7e-5: tmp = t_0 elif y <= 0.00019: tmp = (math.sin(x) / x) * y elif y <= 1.18e+132: tmp = math.sinh(y) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)) * sinh(y)) tmp = 0.0 if (y <= -1.7e-5) tmp = t_0; elseif (y <= 0.00019) tmp = Float64(Float64(sin(x) / x) * y); elseif (y <= 1.18e+132) tmp = sinh(y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * sinh(y); tmp = 0.0; if (y <= -1.7e-5) tmp = t_0; elseif (y <= 0.00019) tmp = (sin(x) / x) * y; elseif (y <= 1.18e+132) tmp = sinh(y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e-5], t$95$0, If[LessEqual[y, 0.00019], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.18e+132], N[Sinh[y], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot \sinh y\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.00019:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{+132}:\\
\;\;\;\;\sinh y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -1.7e-5 or 1.17999999999999997e132 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 81.4%
*-commutative26.2%
unpow226.2%
Simplified81.4%
if -1.7e-5 < y < 1.9000000000000001e-4Initial program 75.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 99.7%
if 1.9000000000000001e-4 < y < 1.17999999999999997e132Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 87.2%
Final simplification90.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (+ 1.0 (* (* x x) -0.16666666666666666)) (sinh y))))
(if (<= y -0.036)
t_0
(if (<= y 0.00032)
(/ (/ (sin x) x) (+ (/ 1.0 y) (* y -0.16666666666666666)))
(if (<= y 1e+126) (sinh y) t_0)))))
double code(double x, double y) {
double t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * sinh(y);
double tmp;
if (y <= -0.036) {
tmp = t_0;
} else if (y <= 0.00032) {
tmp = (sin(x) / x) / ((1.0 / y) + (y * -0.16666666666666666));
} else if (y <= 1e+126) {
tmp = sinh(y);
} else {
tmp = t_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 * x) * (-0.16666666666666666d0))) * sinh(y)
if (y <= (-0.036d0)) then
tmp = t_0
else if (y <= 0.00032d0) then
tmp = (sin(x) / x) / ((1.0d0 / y) + (y * (-0.16666666666666666d0)))
else if (y <= 1d+126) then
tmp = sinh(y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * Math.sinh(y);
double tmp;
if (y <= -0.036) {
tmp = t_0;
} else if (y <= 0.00032) {
tmp = (Math.sin(x) / x) / ((1.0 / y) + (y * -0.16666666666666666));
} else if (y <= 1e+126) {
tmp = Math.sinh(y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * math.sinh(y) tmp = 0 if y <= -0.036: tmp = t_0 elif y <= 0.00032: tmp = (math.sin(x) / x) / ((1.0 / y) + (y * -0.16666666666666666)) elif y <= 1e+126: tmp = math.sinh(y) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)) * sinh(y)) tmp = 0.0 if (y <= -0.036) tmp = t_0; elseif (y <= 0.00032) tmp = Float64(Float64(sin(x) / x) / Float64(Float64(1.0 / y) + Float64(y * -0.16666666666666666))); elseif (y <= 1e+126) tmp = sinh(y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 + ((x * x) * -0.16666666666666666)) * sinh(y); tmp = 0.0; if (y <= -0.036) tmp = t_0; elseif (y <= 0.00032) tmp = (sin(x) / x) / ((1.0 / y) + (y * -0.16666666666666666)); elseif (y <= 1e+126) tmp = sinh(y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.036], t$95$0, If[LessEqual[y, 0.00032], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] / N[(N[(1.0 / y), $MachinePrecision] + N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+126], N[Sinh[y], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot \sinh y\\
\mathbf{if}\;y \leq -0.036:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.00032:\\
\;\;\;\;\frac{\frac{\sin x}{x}}{\frac{1}{y} + y \cdot -0.16666666666666666}\\
\mathbf{elif}\;y \leq 10^{+126}:\\
\;\;\;\;\sinh y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -0.0359999999999999973 or 9.99999999999999925e125 < y Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 81.3%
*-commutative25.7%
unpow225.7%
Simplified81.3%
if -0.0359999999999999973 < y < 3.20000000000000026e-4Initial program 75.3%
associate-*r/99.8%
Simplified99.8%
associate-*r/75.3%
associate-/l*98.7%
div-inv98.5%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 99.8%
*-commutative99.8%
Simplified99.8%
if 3.20000000000000026e-4 < y < 9.99999999999999925e125Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 87.2%
Final simplification90.9%
(FPCore (x y) :precision binary64 (if (<= x -4.9e+123) (/ (* y (- y)) (- (* y (* x (* x -0.16666666666666666))) y)) (if (<= x 1.15e+128) (sinh y) (* -0.16666666666666666 (* x (* x y))))))
double code(double x, double y) {
double tmp;
if (x <= -4.9e+123) {
tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y);
} else if (x <= 1.15e+128) {
tmp = sinh(y);
} else {
tmp = -0.16666666666666666 * (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 (x <= (-4.9d+123)) then
tmp = (y * -y) / ((y * (x * (x * (-0.16666666666666666d0)))) - y)
else if (x <= 1.15d+128) then
tmp = sinh(y)
else
tmp = (-0.16666666666666666d0) * (x * (x * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -4.9e+123) {
tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y);
} else if (x <= 1.15e+128) {
tmp = Math.sinh(y);
} else {
tmp = -0.16666666666666666 * (x * (x * y));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.9e+123: tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y) elif x <= 1.15e+128: tmp = math.sinh(y) else: tmp = -0.16666666666666666 * (x * (x * y)) return tmp
function code(x, y) tmp = 0.0 if (x <= -4.9e+123) tmp = Float64(Float64(y * Float64(-y)) / Float64(Float64(y * Float64(x * Float64(x * -0.16666666666666666))) - y)); elseif (x <= 1.15e+128) tmp = sinh(y); else tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -4.9e+123) tmp = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y); elseif (x <= 1.15e+128) tmp = sinh(y); else tmp = -0.16666666666666666 * (x * (x * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.9e+123], N[(N[(y * (-y)), $MachinePrecision] / N[(N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+128], N[Sinh[y], $MachinePrecision], N[(-0.16666666666666666 * N[(x * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+123}:\\
\;\;\;\;\frac{y \cdot \left(-y\right)}{y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) - y}\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+128}:\\
\;\;\;\;\sinh y\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -4.89999999999999976e123Initial program 99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 60.3%
Taylor expanded in x around 0 18.3%
*-commutative18.3%
unpow218.3%
Simplified18.3%
*-commutative18.3%
+-commutative18.3%
distribute-rgt-in18.3%
*-commutative18.3%
associate-*r*18.3%
associate-*r*18.3%
*-un-lft-identity18.3%
flip-+0.7%
associate-*r*0.7%
associate-*r*0.7%
*-commutative0.7%
associate-*l*0.7%
associate-*r*0.7%
associate-*r*0.7%
*-commutative0.7%
associate-*l*0.7%
Applied egg-rr0.4%
Taylor expanded in x around 0 42.0%
unpow242.0%
mul-1-neg42.0%
distribute-rgt-neg-out42.0%
Simplified42.0%
if -4.89999999999999976e123 < x < 1.14999999999999999e128Initial program 83.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 77.6%
if 1.14999999999999999e128 < x Initial program 99.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around 0 42.0%
Taylor expanded in x around 0 36.5%
*-commutative36.5%
unpow236.5%
Simplified36.5%
Taylor expanded in x around inf 36.5%
unpow236.5%
Simplified36.5%
Taylor expanded in y around 0 36.5%
unpow236.5%
associate-*r*36.5%
Simplified36.5%
Final simplification66.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* x (* x -0.16666666666666666))))
(t_1 (- t_0 y))
(t_2 (/ (* y (- y)) t_1)))
(if (<= x -2.2e+30)
t_2
(if (<= x -4.4e-177)
(* y (+ 1.0 (* (* x x) -0.16666666666666666)))
(if (<= x 2.8e-248)
t_2
(if (<= x 2.2e-111)
y
(if (<= x 1.4e+64)
(/ (- (* t_0 t_0) (* y y)) t_1)
(* -0.16666666666666666 (* x (* x y))))))))))
double code(double x, double y) {
double t_0 = y * (x * (x * -0.16666666666666666));
double t_1 = t_0 - y;
double t_2 = (y * -y) / t_1;
double tmp;
if (x <= -2.2e+30) {
tmp = t_2;
} else if (x <= -4.4e-177) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else if (x <= 2.8e-248) {
tmp = t_2;
} else if (x <= 2.2e-111) {
tmp = y;
} else if (x <= 1.4e+64) {
tmp = ((t_0 * t_0) - (y * y)) / t_1;
} else {
tmp = -0.16666666666666666 * (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y * (x * (x * (-0.16666666666666666d0)))
t_1 = t_0 - y
t_2 = (y * -y) / t_1
if (x <= (-2.2d+30)) then
tmp = t_2
else if (x <= (-4.4d-177)) then
tmp = y * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))
else if (x <= 2.8d-248) then
tmp = t_2
else if (x <= 2.2d-111) then
tmp = y
else if (x <= 1.4d+64) then
tmp = ((t_0 * t_0) - (y * y)) / t_1
else
tmp = (-0.16666666666666666d0) * (x * (x * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (x * (x * -0.16666666666666666));
double t_1 = t_0 - y;
double t_2 = (y * -y) / t_1;
double tmp;
if (x <= -2.2e+30) {
tmp = t_2;
} else if (x <= -4.4e-177) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else if (x <= 2.8e-248) {
tmp = t_2;
} else if (x <= 2.2e-111) {
tmp = y;
} else if (x <= 1.4e+64) {
tmp = ((t_0 * t_0) - (y * y)) / t_1;
} else {
tmp = -0.16666666666666666 * (x * (x * y));
}
return tmp;
}
def code(x, y): t_0 = y * (x * (x * -0.16666666666666666)) t_1 = t_0 - y t_2 = (y * -y) / t_1 tmp = 0 if x <= -2.2e+30: tmp = t_2 elif x <= -4.4e-177: tmp = y * (1.0 + ((x * x) * -0.16666666666666666)) elif x <= 2.8e-248: tmp = t_2 elif x <= 2.2e-111: tmp = y elif x <= 1.4e+64: tmp = ((t_0 * t_0) - (y * y)) / t_1 else: tmp = -0.16666666666666666 * (x * (x * y)) return tmp
function code(x, y) t_0 = Float64(y * Float64(x * Float64(x * -0.16666666666666666))) t_1 = Float64(t_0 - y) t_2 = Float64(Float64(y * Float64(-y)) / t_1) tmp = 0.0 if (x <= -2.2e+30) tmp = t_2; elseif (x <= -4.4e-177) tmp = Float64(y * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))); elseif (x <= 2.8e-248) tmp = t_2; elseif (x <= 2.2e-111) tmp = y; elseif (x <= 1.4e+64) tmp = Float64(Float64(Float64(t_0 * t_0) - Float64(y * y)) / t_1); else tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * y))); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (x * (x * -0.16666666666666666)); t_1 = t_0 - y; t_2 = (y * -y) / t_1; tmp = 0.0; if (x <= -2.2e+30) tmp = t_2; elseif (x <= -4.4e-177) tmp = y * (1.0 + ((x * x) * -0.16666666666666666)); elseif (x <= 2.8e-248) tmp = t_2; elseif (x <= 2.2e-111) tmp = y; elseif (x <= 1.4e+64) tmp = ((t_0 * t_0) - (y * y)) / t_1; else tmp = -0.16666666666666666 * (x * (x * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * (-y)), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x, -2.2e+30], t$95$2, If[LessEqual[x, -4.4e-177], N[(y * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e-248], t$95$2, If[LessEqual[x, 2.2e-111], y, If[LessEqual[x, 1.4e+64], N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(y * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(-0.16666666666666666 * N[(x * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
t_1 := t_0 - y\\
t_2 := \frac{y \cdot \left(-y\right)}{t_1}\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+30}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.4 \cdot 10^{-177}:\\
\;\;\;\;y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-248}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-111}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+64}:\\
\;\;\;\;\frac{t_0 \cdot t_0 - y \cdot y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -2.2e30 or -4.40000000000000023e-177 < x < 2.8000000000000001e-248Initial program 86.9%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 56.1%
Taylor expanded in x around 0 32.3%
*-commutative32.3%
unpow232.3%
Simplified32.3%
*-commutative32.3%
+-commutative32.3%
distribute-rgt-in32.3%
*-commutative32.3%
associate-*r*32.3%
associate-*r*32.3%
*-un-lft-identity32.3%
flip-+33.8%
associate-*r*33.8%
associate-*r*33.8%
*-commutative33.8%
associate-*l*33.8%
associate-*r*33.8%
associate-*r*33.8%
*-commutative33.8%
associate-*l*33.8%
Applied egg-rr33.7%
Taylor expanded in x around 0 47.7%
unpow247.7%
mul-1-neg47.7%
distribute-rgt-neg-out47.7%
Simplified47.7%
if -2.2e30 < x < -4.40000000000000023e-177Initial program 87.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 45.0%
Taylor expanded in x around 0 43.1%
*-commutative43.1%
unpow243.1%
Simplified43.1%
if 2.8000000000000001e-248 < x < 2.2e-111Initial program 65.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 64.1%
Taylor expanded in x around 0 64.1%
if 2.2e-111 < x < 1.40000000000000012e64Initial program 96.9%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 37.7%
Taylor expanded in x around 0 20.5%
*-commutative20.5%
unpow220.5%
Simplified20.5%
*-commutative20.5%
+-commutative20.5%
distribute-rgt-in20.5%
*-commutative20.5%
associate-*r*20.5%
associate-*r*20.5%
*-un-lft-identity20.5%
flip-+36.7%
associate-*r*36.7%
associate-*r*36.7%
*-commutative36.7%
associate-*l*36.7%
associate-*r*36.7%
associate-*r*36.7%
*-commutative36.7%
associate-*l*36.7%
Applied egg-rr36.7%
if 1.40000000000000012e64 < x Initial program 99.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 40.5%
Taylor expanded in x around 0 32.1%
*-commutative32.1%
unpow232.1%
Simplified32.1%
Taylor expanded in x around inf 32.1%
unpow232.1%
Simplified32.1%
Taylor expanded in y around 0 32.1%
unpow232.1%
associate-*r*32.1%
Simplified32.1%
Final simplification44.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* y (- y)) (- (* y (* x (* x -0.16666666666666666))) y))))
(if (<= x -2.2e+30)
t_0
(if (<= x -6.3e-173)
(* y (+ 1.0 (* (* x x) -0.16666666666666666)))
(if (<= x 6.6e-248)
t_0
(+ y (* -0.16666666666666666 (* x (* x y)))))))))
double code(double x, double y) {
double t_0 = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y);
double tmp;
if (x <= -2.2e+30) {
tmp = t_0;
} else if (x <= -6.3e-173) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else if (x <= 6.6e-248) {
tmp = t_0;
} else {
tmp = y + (-0.16666666666666666 * (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 = (y * -y) / ((y * (x * (x * (-0.16666666666666666d0)))) - y)
if (x <= (-2.2d+30)) then
tmp = t_0
else if (x <= (-6.3d-173)) then
tmp = y * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))
else if (x <= 6.6d-248) then
tmp = t_0
else
tmp = y + ((-0.16666666666666666d0) * (x * (x * y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y);
double tmp;
if (x <= -2.2e+30) {
tmp = t_0;
} else if (x <= -6.3e-173) {
tmp = y * (1.0 + ((x * x) * -0.16666666666666666));
} else if (x <= 6.6e-248) {
tmp = t_0;
} else {
tmp = y + (-0.16666666666666666 * (x * (x * y)));
}
return tmp;
}
def code(x, y): t_0 = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y) tmp = 0 if x <= -2.2e+30: tmp = t_0 elif x <= -6.3e-173: tmp = y * (1.0 + ((x * x) * -0.16666666666666666)) elif x <= 6.6e-248: tmp = t_0 else: tmp = y + (-0.16666666666666666 * (x * (x * y))) return tmp
function code(x, y) t_0 = Float64(Float64(y * Float64(-y)) / Float64(Float64(y * Float64(x * Float64(x * -0.16666666666666666))) - y)) tmp = 0.0 if (x <= -2.2e+30) tmp = t_0; elseif (x <= -6.3e-173) tmp = Float64(y * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))); elseif (x <= 6.6e-248) tmp = t_0; else tmp = Float64(y + Float64(-0.16666666666666666 * Float64(x * Float64(x * y)))); end return tmp end
function tmp_2 = code(x, y) t_0 = (y * -y) / ((y * (x * (x * -0.16666666666666666))) - y); tmp = 0.0; if (x <= -2.2e+30) tmp = t_0; elseif (x <= -6.3e-173) tmp = y * (1.0 + ((x * x) * -0.16666666666666666)); elseif (x <= 6.6e-248) tmp = t_0; else tmp = y + (-0.16666666666666666 * (x * (x * y))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * (-y)), $MachinePrecision] / N[(N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.2e+30], t$95$0, If[LessEqual[x, -6.3e-173], N[(y * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.6e-248], t$95$0, N[(y + N[(-0.16666666666666666 * N[(x * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y \cdot \left(-y\right)}{y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right) - y}\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+30}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -6.3 \cdot 10^{-173}:\\
\;\;\;\;y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{-248}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y + -0.16666666666666666 \cdot \left(x \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -2.2e30 or -6.29999999999999968e-173 < x < 6.6000000000000004e-248Initial program 86.9%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 56.1%
Taylor expanded in x around 0 32.3%
*-commutative32.3%
unpow232.3%
Simplified32.3%
*-commutative32.3%
+-commutative32.3%
distribute-rgt-in32.3%
*-commutative32.3%
associate-*r*32.3%
associate-*r*32.3%
*-un-lft-identity32.3%
flip-+33.8%
associate-*r*33.8%
associate-*r*33.8%
*-commutative33.8%
associate-*l*33.8%
associate-*r*33.8%
associate-*r*33.8%
*-commutative33.8%
associate-*l*33.8%
Applied egg-rr33.7%
Taylor expanded in x around 0 47.7%
unpow247.7%
mul-1-neg47.7%
distribute-rgt-neg-out47.7%
Simplified47.7%
if -2.2e30 < x < -6.29999999999999968e-173Initial program 87.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 45.0%
Taylor expanded in x around 0 43.1%
*-commutative43.1%
unpow243.1%
Simplified43.1%
if 6.6000000000000004e-248 < x Initial program 89.8%
associate-*r/99.9%
Simplified99.9%
associate-*r/89.8%
associate-/l*98.7%
div-inv98.6%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 46.0%
Taylor expanded in x around 0 37.4%
unpow237.4%
associate-*r*37.4%
Simplified37.4%
Final simplification42.4%
(FPCore (x y) :precision binary64 (if (or (<= x -2800.0) (not (<= x 105000.0))) (* -0.16666666666666666 (* y (* x x))) y))
double code(double x, double y) {
double tmp;
if ((x <= -2800.0) || !(x <= 105000.0)) {
tmp = -0.16666666666666666 * (y * (x * x));
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-2800.0d0)) .or. (.not. (x <= 105000.0d0))) then
tmp = (-0.16666666666666666d0) * (y * (x * x))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -2800.0) || !(x <= 105000.0)) {
tmp = -0.16666666666666666 * (y * (x * x));
} else {
tmp = y;
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -2800.0) or not (x <= 105000.0): tmp = -0.16666666666666666 * (y * (x * x)) else: tmp = y return tmp
function code(x, y) tmp = 0.0 if ((x <= -2800.0) || !(x <= 105000.0)) tmp = Float64(-0.16666666666666666 * Float64(y * Float64(x * x))); else tmp = y; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -2800.0) || ~((x <= 105000.0))) tmp = -0.16666666666666666 * (y * (x * x)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -2800.0], N[Not[LessEqual[x, 105000.0]], $MachinePrecision]], N[(-0.16666666666666666 * N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2800 \lor \neg \left(x \leq 105000\right):\\
\;\;\;\;-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -2800 or 105000 < x Initial program 99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 46.2%
Taylor expanded in x around 0 20.1%
*-commutative20.1%
unpow220.1%
Simplified20.1%
Taylor expanded in x around inf 20.1%
unpow220.1%
Simplified20.1%
if -2800 < x < 105000Initial program 76.4%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 53.4%
Taylor expanded in x around 0 53.1%
Final simplification36.3%
(FPCore (x y) :precision binary64 (if (or (<= x -2800.0) (not (<= x 105000.0))) (* -0.16666666666666666 (* x (* x y))) y))
double code(double x, double y) {
double tmp;
if ((x <= -2800.0) || !(x <= 105000.0)) {
tmp = -0.16666666666666666 * (x * (x * y));
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x <= (-2800.0d0)) .or. (.not. (x <= 105000.0d0))) then
tmp = (-0.16666666666666666d0) * (x * (x * y))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x <= -2800.0) || !(x <= 105000.0)) {
tmp = -0.16666666666666666 * (x * (x * y));
} else {
tmp = y;
}
return tmp;
}
def code(x, y): tmp = 0 if (x <= -2800.0) or not (x <= 105000.0): tmp = -0.16666666666666666 * (x * (x * y)) else: tmp = y return tmp
function code(x, y) tmp = 0.0 if ((x <= -2800.0) || !(x <= 105000.0)) tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * y))); else tmp = y; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x <= -2800.0) || ~((x <= 105000.0))) tmp = -0.16666666666666666 * (x * (x * y)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[x, -2800.0], N[Not[LessEqual[x, 105000.0]], $MachinePrecision]], N[(-0.16666666666666666 * N[(x * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2800 \lor \neg \left(x \leq 105000\right):\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -2800 or 105000 < x Initial program 99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 46.2%
Taylor expanded in x around 0 20.1%
*-commutative20.1%
unpow220.1%
Simplified20.1%
Taylor expanded in x around inf 20.1%
unpow220.1%
Simplified20.1%
Taylor expanded in y around 0 20.1%
unpow220.1%
associate-*r*20.1%
Simplified20.1%
if -2800 < x < 105000Initial program 76.4%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 53.4%
Taylor expanded in x around 0 53.1%
Final simplification36.3%
(FPCore (x y) :precision binary64 (* y (+ 1.0 (* (* x x) -0.16666666666666666))))
double code(double x, double y) {
return y * (1.0 + ((x * x) * -0.16666666666666666));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))
end function
public static double code(double x, double y) {
return y * (1.0 + ((x * x) * -0.16666666666666666));
}
def code(x, y): return y * (1.0 + ((x * x) * -0.16666666666666666))
function code(x, y) return Float64(y * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))) end
function tmp = code(x, y) tmp = y * (1.0 + ((x * x) * -0.16666666666666666)); end
code[x_, y_] := N[(y * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)
\end{array}
Initial program 88.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 49.7%
Taylor expanded in x around 0 36.5%
*-commutative36.5%
unpow236.5%
Simplified36.5%
Final simplification36.5%
(FPCore (x y) :precision binary64 (+ y (* -0.16666666666666666 (* x (* x y)))))
double code(double x, double y) {
return y + (-0.16666666666666666 * (x * (x * y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y + ((-0.16666666666666666d0) * (x * (x * y)))
end function
public static double code(double x, double y) {
return y + (-0.16666666666666666 * (x * (x * y)));
}
def code(x, y): return y + (-0.16666666666666666 * (x * (x * y)))
function code(x, y) return Float64(y + Float64(-0.16666666666666666 * Float64(x * Float64(x * y)))) end
function tmp = code(x, y) tmp = y + (-0.16666666666666666 * (x * (x * y))); end
code[x_, y_] := N[(y + N[(-0.16666666666666666 * N[(x * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y + -0.16666666666666666 \cdot \left(x \cdot \left(x \cdot y\right)\right)
\end{array}
Initial program 88.3%
associate-*r/99.9%
Simplified99.9%
associate-*r/88.3%
associate-/l*99.4%
div-inv99.3%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 49.7%
Taylor expanded in x around 0 36.5%
unpow236.5%
associate-*r*36.5%
Simplified36.5%
Final simplification36.5%
(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 88.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 49.7%
Taylor expanded in x around 0 27.9%
Final simplification27.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 2023195
(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))