
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* 0.16666666666666666 (* x y))))
(t_1 (* 0.16666666666666666 (* y y))))
(if (<= y -6.5e+150)
(* (sin x) t_1)
(if (<= y -3.5e+85)
(/ (* x (- (* (pow y 4.0) (* x 0.027777777777777776)) x)) (- t_0 x))
(if (<= y -7.8e+58)
(fabs t_0)
(if (or (<= y -90000000.0)
(and (not (<= y 200000000000.0)) (<= y 2.5e+150)))
(*
(* y y)
(+
(* x 0.16666666666666666)
(* (pow x 3.0) -0.027777777777777776)))
(* (sin x) (+ t_1 1.0))))))))
double code(double x, double y) {
double t_0 = y * (0.16666666666666666 * (x * y));
double t_1 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= -6.5e+150) {
tmp = sin(x) * t_1;
} else if (y <= -3.5e+85) {
tmp = (x * ((pow(y, 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x);
} else if (y <= -7.8e+58) {
tmp = fabs(t_0);
} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 2.5e+150))) {
tmp = (y * y) * ((x * 0.16666666666666666) + (pow(x, 3.0) * -0.027777777777777776));
} else {
tmp = sin(x) * (t_1 + 1.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) :: t_1
real(8) :: tmp
t_0 = y * (0.16666666666666666d0 * (x * y))
t_1 = 0.16666666666666666d0 * (y * y)
if (y <= (-6.5d+150)) then
tmp = sin(x) * t_1
else if (y <= (-3.5d+85)) then
tmp = (x * (((y ** 4.0d0) * (x * 0.027777777777777776d0)) - x)) / (t_0 - x)
else if (y <= (-7.8d+58)) then
tmp = abs(t_0)
else if ((y <= (-90000000.0d0)) .or. (.not. (y <= 200000000000.0d0)) .and. (y <= 2.5d+150)) then
tmp = (y * y) * ((x * 0.16666666666666666d0) + ((x ** 3.0d0) * (-0.027777777777777776d0)))
else
tmp = sin(x) * (t_1 + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (0.16666666666666666 * (x * y));
double t_1 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= -6.5e+150) {
tmp = Math.sin(x) * t_1;
} else if (y <= -3.5e+85) {
tmp = (x * ((Math.pow(y, 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x);
} else if (y <= -7.8e+58) {
tmp = Math.abs(t_0);
} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 2.5e+150))) {
tmp = (y * y) * ((x * 0.16666666666666666) + (Math.pow(x, 3.0) * -0.027777777777777776));
} else {
tmp = Math.sin(x) * (t_1 + 1.0);
}
return tmp;
}
def code(x, y): t_0 = y * (0.16666666666666666 * (x * y)) t_1 = 0.16666666666666666 * (y * y) tmp = 0 if y <= -6.5e+150: tmp = math.sin(x) * t_1 elif y <= -3.5e+85: tmp = (x * ((math.pow(y, 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x) elif y <= -7.8e+58: tmp = math.fabs(t_0) elif (y <= -90000000.0) or (not (y <= 200000000000.0) and (y <= 2.5e+150)): tmp = (y * y) * ((x * 0.16666666666666666) + (math.pow(x, 3.0) * -0.027777777777777776)) else: tmp = math.sin(x) * (t_1 + 1.0) return tmp
function code(x, y) t_0 = Float64(y * Float64(0.16666666666666666 * Float64(x * y))) t_1 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= -6.5e+150) tmp = Float64(sin(x) * t_1); elseif (y <= -3.5e+85) tmp = Float64(Float64(x * Float64(Float64((y ^ 4.0) * Float64(x * 0.027777777777777776)) - x)) / Float64(t_0 - x)); elseif (y <= -7.8e+58) tmp = abs(t_0); elseif ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 2.5e+150))) tmp = Float64(Float64(y * y) * Float64(Float64(x * 0.16666666666666666) + Float64((x ^ 3.0) * -0.027777777777777776))); else tmp = Float64(sin(x) * Float64(t_1 + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (0.16666666666666666 * (x * y)); t_1 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= -6.5e+150) tmp = sin(x) * t_1; elseif (y <= -3.5e+85) tmp = (x * (((y ^ 4.0) * (x * 0.027777777777777776)) - x)) / (t_0 - x); elseif (y <= -7.8e+58) tmp = abs(t_0); elseif ((y <= -90000000.0) || (~((y <= 200000000000.0)) && (y <= 2.5e+150))) tmp = (y * y) * ((x * 0.16666666666666666) + ((x ^ 3.0) * -0.027777777777777776)); else tmp = sin(x) * (t_1 + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(0.16666666666666666 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+150], N[(N[Sin[x], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y, -3.5e+85], N[(N[(x * N[(N[(N[Power[y, 4.0], $MachinePrecision] * N[(x * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.8e+58], N[Abs[t$95$0], $MachinePrecision], If[Or[LessEqual[y, -90000000.0], And[N[Not[LessEqual[y, 200000000000.0]], $MachinePrecision], LessEqual[y, 2.5e+150]]], N[(N[(y * y), $MachinePrecision] * N[(N[(x * 0.16666666666666666), $MachinePrecision] + N[(N[Power[x, 3.0], $MachinePrecision] * -0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\\
t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\
\;\;\;\;\sin x \cdot t_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{+85}:\\
\;\;\;\;\frac{x \cdot \left({y}^{4} \cdot \left(x \cdot 0.027777777777777776\right) - x\right)}{t_0 - x}\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{+58}:\\
\;\;\;\;\left|t_0\right|\\
\mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(t_1 + 1\right)\\
\end{array}
\end{array}
if y < -6.50000000000000033e150Initial program 100.0%
Taylor expanded in y around 0 96.9%
unpow296.9%
Simplified96.9%
Taylor expanded in y around inf 96.9%
unpow296.9%
associate-*r*96.9%
*-commutative96.9%
Simplified96.9%
if -6.50000000000000033e150 < y < -3.50000000000000005e85Initial program 100.0%
Taylor expanded in y around 0 5.4%
unpow25.4%
Simplified5.4%
Taylor expanded in x around 0 8.8%
+-commutative8.8%
unpow28.8%
fma-udef8.8%
Simplified8.8%
*-commutative8.8%
fma-udef8.8%
distribute-rgt-in8.8%
*-un-lft-identity8.8%
Applied egg-rr8.8%
flip-+29.3%
div-sub29.3%
swap-sqr50.0%
swap-sqr50.0%
metadata-eval50.0%
pow250.0%
pow250.0%
pow-prod-up50.0%
metadata-eval50.0%
fma-neg50.0%
fma-neg50.0%
Applied egg-rr50.0%
div-sub50.0%
associate-*r*66.7%
distribute-rgt-out--66.7%
*-commutative66.7%
associate-*l*66.7%
fma-neg66.7%
associate-*r*66.7%
associate-*r*66.7%
associate-*r*66.7%
associate-*r*66.7%
*-commutative66.7%
associate-*l*66.7%
Simplified66.7%
if -3.50000000000000005e85 < y < -7.8000000000000002e58Initial program 100.0%
Taylor expanded in y around 0 4.1%
unpow24.1%
Simplified4.1%
Taylor expanded in x around 0 43.7%
+-commutative43.7%
unpow243.7%
fma-udef43.7%
Simplified43.7%
Taylor expanded in y around inf 43.7%
unpow243.7%
Simplified43.7%
add-sqr-sqrt43.7%
sqrt-unprod58.0%
swap-sqr57.9%
swap-sqr57.9%
metadata-eval57.9%
pow257.9%
pow257.9%
pow-prod-up57.9%
metadata-eval57.9%
Applied egg-rr57.9%
associate-*l*57.9%
metadata-eval57.9%
metadata-eval57.9%
pow-sqr57.9%
swap-sqr58.0%
unpow258.0%
associate-*r*58.0%
unpow258.0%
associate-*r*58.0%
swap-sqr58.0%
rem-sqrt-square58.0%
associate-*r*58.0%
*-commutative58.0%
associate-*l*58.0%
Simplified58.0%
if -7.8000000000000002e58 < y < -9e7 or 2e11 < y < 2.50000000000000004e150Initial program 100.0%
Taylor expanded in y around 0 4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in y around inf 4.3%
unpow24.3%
associate-*l*4.3%
Simplified4.3%
Taylor expanded in x around 0 18.2%
*-commutative18.2%
associate-*l*18.2%
*-commutative18.2%
associate-*l*18.2%
distribute-lft-out39.1%
unpow239.1%
*-commutative39.1%
Simplified39.1%
if -9e7 < y < 2e11 or 2.50000000000000004e150 < y Initial program 100.0%
Taylor expanded in y around 0 98.2%
unpow298.2%
Simplified98.2%
Final simplification84.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (<= y -6.5e+150)
(* (sin x) t_0)
(if (or (<= y -90000000.0)
(and (not (<= y 410000000000.0)) (<= y 2.5e+150)))
(*
(* y y)
(+ (* x 0.16666666666666666) (* (pow x 3.0) -0.027777777777777776)))
(* (sin x) (+ t_0 1.0))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= -6.5e+150) {
tmp = sin(x) * t_0;
} else if ((y <= -90000000.0) || (!(y <= 410000000000.0) && (y <= 2.5e+150))) {
tmp = (y * y) * ((x * 0.16666666666666666) + (pow(x, 3.0) * -0.027777777777777776));
} else {
tmp = sin(x) * (t_0 + 1.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 = 0.16666666666666666d0 * (y * y)
if (y <= (-6.5d+150)) then
tmp = sin(x) * t_0
else if ((y <= (-90000000.0d0)) .or. (.not. (y <= 410000000000.0d0)) .and. (y <= 2.5d+150)) then
tmp = (y * y) * ((x * 0.16666666666666666d0) + ((x ** 3.0d0) * (-0.027777777777777776d0)))
else
tmp = sin(x) * (t_0 + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= -6.5e+150) {
tmp = Math.sin(x) * t_0;
} else if ((y <= -90000000.0) || (!(y <= 410000000000.0) && (y <= 2.5e+150))) {
tmp = (y * y) * ((x * 0.16666666666666666) + (Math.pow(x, 3.0) * -0.027777777777777776));
} else {
tmp = Math.sin(x) * (t_0 + 1.0);
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if y <= -6.5e+150: tmp = math.sin(x) * t_0 elif (y <= -90000000.0) or (not (y <= 410000000000.0) and (y <= 2.5e+150)): tmp = (y * y) * ((x * 0.16666666666666666) + (math.pow(x, 3.0) * -0.027777777777777776)) else: tmp = math.sin(x) * (t_0 + 1.0) return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= -6.5e+150) tmp = Float64(sin(x) * t_0); elseif ((y <= -90000000.0) || (!(y <= 410000000000.0) && (y <= 2.5e+150))) tmp = Float64(Float64(y * y) * Float64(Float64(x * 0.16666666666666666) + Float64((x ^ 3.0) * -0.027777777777777776))); else tmp = Float64(sin(x) * Float64(t_0 + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= -6.5e+150) tmp = sin(x) * t_0; elseif ((y <= -90000000.0) || (~((y <= 410000000000.0)) && (y <= 2.5e+150))) tmp = (y * y) * ((x * 0.16666666666666666) + ((x ^ 3.0) * -0.027777777777777776)); else tmp = sin(x) * (t_0 + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+150], N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision], If[Or[LessEqual[y, -90000000.0], And[N[Not[LessEqual[y, 410000000000.0]], $MachinePrecision], LessEqual[y, 2.5e+150]]], N[(N[(y * y), $MachinePrecision] * N[(N[(x * 0.16666666666666666), $MachinePrecision] + N[(N[Power[x, 3.0], $MachinePrecision] * -0.027777777777777776), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+150}:\\
\;\;\;\;\sin x \cdot t_0\\
\mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 410000000000\right) \land y \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(x \cdot 0.16666666666666666 + {x}^{3} \cdot -0.027777777777777776\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(t_0 + 1\right)\\
\end{array}
\end{array}
if y < -6.50000000000000033e150Initial program 100.0%
Taylor expanded in y around 0 96.9%
unpow296.9%
Simplified96.9%
Taylor expanded in y around inf 96.9%
unpow296.9%
associate-*r*96.9%
*-commutative96.9%
Simplified96.9%
if -6.50000000000000033e150 < y < -9e7 or 4.1e11 < y < 2.50000000000000004e150Initial program 100.0%
Taylor expanded in y around 0 4.5%
unpow24.5%
Simplified4.5%
Taylor expanded in y around inf 4.5%
unpow24.5%
associate-*l*4.5%
Simplified4.5%
Taylor expanded in x around 0 13.8%
*-commutative13.8%
associate-*l*13.8%
*-commutative13.8%
associate-*l*13.8%
distribute-lft-out35.9%
unpow235.9%
*-commutative35.9%
Simplified35.9%
if -9e7 < y < 4.1e11 or 2.50000000000000004e150 < y Initial program 100.0%
Taylor expanded in y around 0 98.2%
unpow298.2%
Simplified98.2%
Final simplification81.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (<= y -3e+144)
(* (sin x) t_0)
(if (or (<= y -90000000.0)
(and (not (<= y 200000000000.0)) (<= y 4.6e+149)))
(* 0.16666666666666666 (* y (* -0.16666666666666666 (* y (pow x 3.0)))))
(* (sin x) (+ t_0 1.0))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= -3e+144) {
tmp = sin(x) * t_0;
} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 4.6e+149))) {
tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * pow(x, 3.0))));
} else {
tmp = sin(x) * (t_0 + 1.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 = 0.16666666666666666d0 * (y * y)
if (y <= (-3d+144)) then
tmp = sin(x) * t_0
else if ((y <= (-90000000.0d0)) .or. (.not. (y <= 200000000000.0d0)) .and. (y <= 4.6d+149)) then
tmp = 0.16666666666666666d0 * (y * ((-0.16666666666666666d0) * (y * (x ** 3.0d0))))
else
tmp = sin(x) * (t_0 + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= -3e+144) {
tmp = Math.sin(x) * t_0;
} else if ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 4.6e+149))) {
tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * Math.pow(x, 3.0))));
} else {
tmp = Math.sin(x) * (t_0 + 1.0);
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if y <= -3e+144: tmp = math.sin(x) * t_0 elif (y <= -90000000.0) or (not (y <= 200000000000.0) and (y <= 4.6e+149)): tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * math.pow(x, 3.0)))) else: tmp = math.sin(x) * (t_0 + 1.0) return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= -3e+144) tmp = Float64(sin(x) * t_0); elseif ((y <= -90000000.0) || (!(y <= 200000000000.0) && (y <= 4.6e+149))) tmp = Float64(0.16666666666666666 * Float64(y * Float64(-0.16666666666666666 * Float64(y * (x ^ 3.0))))); else tmp = Float64(sin(x) * Float64(t_0 + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= -3e+144) tmp = sin(x) * t_0; elseif ((y <= -90000000.0) || (~((y <= 200000000000.0)) && (y <= 4.6e+149))) tmp = 0.16666666666666666 * (y * (-0.16666666666666666 * (y * (x ^ 3.0)))); else tmp = sin(x) * (t_0 + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+144], N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision], If[Or[LessEqual[y, -90000000.0], And[N[Not[LessEqual[y, 200000000000.0]], $MachinePrecision], LessEqual[y, 4.6e+149]]], N[(0.16666666666666666 * N[(y * N[(-0.16666666666666666 * N[(y * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -3 \cdot 10^{+144}:\\
\;\;\;\;\sin x \cdot t_0\\
\mathbf{elif}\;y \leq -90000000 \lor \neg \left(y \leq 200000000000\right) \land y \leq 4.6 \cdot 10^{+149}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(-0.16666666666666666 \cdot \left(y \cdot {x}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(t_0 + 1\right)\\
\end{array}
\end{array}
if y < -2.9999999999999999e144Initial program 100.0%
Taylor expanded in y around 0 88.3%
unpow288.3%
Simplified88.3%
Taylor expanded in y around inf 88.3%
unpow288.3%
associate-*r*88.3%
*-commutative88.3%
Simplified88.3%
if -2.9999999999999999e144 < y < -9e7 or 2e11 < y < 4.5999999999999997e149Initial program 100.0%
Taylor expanded in y around 0 4.5%
unpow24.5%
Simplified4.5%
Taylor expanded in y around inf 4.5%
unpow24.5%
associate-*l*4.5%
Simplified4.5%
Taylor expanded in x around 0 25.0%
Taylor expanded in x around inf 36.3%
if -9e7 < y < 2e11 or 4.5999999999999997e149 < y Initial program 100.0%
Taylor expanded in y around 0 98.2%
unpow298.2%
Simplified98.2%
Final simplification81.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (* 0.16666666666666666 (* y y))))
(t_1 (fabs (* y (* 0.16666666666666666 (* x y))))))
(if (<= y -1.4e+154)
t_0
(if (<= y -340000000.0)
t_1
(if (<= y 12200000000000.0) (sin x) (if (<= y 2.5e+150) t_1 t_0))))))
double code(double x, double y) {
double t_0 = sin(x) * (0.16666666666666666 * (y * y));
double t_1 = fabs((y * (0.16666666666666666 * (x * y))));
double tmp;
if (y <= -1.4e+154) {
tmp = t_0;
} else if (y <= -340000000.0) {
tmp = t_1;
} else if (y <= 12200000000000.0) {
tmp = sin(x);
} else if (y <= 2.5e+150) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = sin(x) * (0.16666666666666666d0 * (y * y))
t_1 = abs((y * (0.16666666666666666d0 * (x * y))))
if (y <= (-1.4d+154)) then
tmp = t_0
else if (y <= (-340000000.0d0)) then
tmp = t_1
else if (y <= 12200000000000.0d0) then
tmp = sin(x)
else if (y <= 2.5d+150) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(x) * (0.16666666666666666 * (y * y));
double t_1 = Math.abs((y * (0.16666666666666666 * (x * y))));
double tmp;
if (y <= -1.4e+154) {
tmp = t_0;
} else if (y <= -340000000.0) {
tmp = t_1;
} else if (y <= 12200000000000.0) {
tmp = Math.sin(x);
} else if (y <= 2.5e+150) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sin(x) * (0.16666666666666666 * (y * y)) t_1 = math.fabs((y * (0.16666666666666666 * (x * y)))) tmp = 0 if y <= -1.4e+154: tmp = t_0 elif y <= -340000000.0: tmp = t_1 elif y <= 12200000000000.0: tmp = math.sin(x) elif y <= 2.5e+150: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sin(x) * Float64(0.16666666666666666 * Float64(y * y))) t_1 = abs(Float64(y * Float64(0.16666666666666666 * Float64(x * y)))) tmp = 0.0 if (y <= -1.4e+154) tmp = t_0; elseif (y <= -340000000.0) tmp = t_1; elseif (y <= 12200000000000.0) tmp = sin(x); elseif (y <= 2.5e+150) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sin(x) * (0.16666666666666666 * (y * y)); t_1 = abs((y * (0.16666666666666666 * (x * y)))); tmp = 0.0; if (y <= -1.4e+154) tmp = t_0; elseif (y <= -340000000.0) tmp = t_1; elseif (y <= 12200000000000.0) tmp = sin(x); elseif (y <= 2.5e+150) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[x], $MachinePrecision] * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(y * N[(0.16666666666666666 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -1.4e+154], t$95$0, If[LessEqual[y, -340000000.0], t$95$1, If[LessEqual[y, 12200000000000.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 2.5e+150], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
t_1 := \left|y \cdot \left(0.16666666666666666 \cdot \left(x \cdot y\right)\right)\right|\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -340000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 12200000000000:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -1.4e154 or 2.50000000000000004e150 < y Initial program 100.0%
Taylor expanded in y around 0 98.4%
unpow298.4%
Simplified98.4%
Taylor expanded in y around inf 98.4%
unpow298.4%
associate-*r*98.4%
*-commutative98.4%
Simplified98.4%
if -1.4e154 < y < -3.4e8 or 1.22e13 < y < 2.50000000000000004e150Initial program 100.0%
Taylor expanded in y around 0 4.6%
unpow24.6%
Simplified4.6%
Taylor expanded in x around 0 13.6%
+-commutative13.6%
unpow213.6%
fma-udef13.6%
Simplified13.6%
Taylor expanded in y around inf 13.6%
unpow213.6%
Simplified13.6%
add-sqr-sqrt8.4%
sqrt-unprod35.8%
swap-sqr39.7%
swap-sqr39.7%
metadata-eval39.7%
pow239.7%
pow239.7%
pow-prod-up39.7%
metadata-eval39.7%
Applied egg-rr39.7%
associate-*l*39.7%
metadata-eval39.7%
metadata-eval39.7%
pow-sqr39.7%
swap-sqr35.8%
unpow235.8%
associate-*r*35.8%
unpow235.8%
associate-*r*35.8%
swap-sqr35.8%
rem-sqrt-square20.9%
associate-*r*20.9%
*-commutative20.9%
associate-*l*20.9%
Simplified20.9%
if -3.4e8 < y < 1.22e13Initial program 100.0%
Taylor expanded in y around 0 98.5%
unpow298.5%
Simplified98.5%
Taylor expanded in y around 0 98.3%
Final simplification77.5%
(FPCore (x y)
:precision binary64
(if (<= y -8.2e+158)
(* 0.16666666666666666 (* y (* (sin x) y)))
(if (<= y -3.8e+43)
(* 0.16666666666666666 (* x (* y y)))
(if (<= y 3.1e+58) (sin x) (+ x (* x (* 0.16666666666666666 (* y y))))))))
double code(double x, double y) {
double tmp;
if (y <= -8.2e+158) {
tmp = 0.16666666666666666 * (y * (sin(x) * y));
} else if (y <= -3.8e+43) {
tmp = 0.16666666666666666 * (x * (y * y));
} else if (y <= 3.1e+58) {
tmp = sin(x);
} else {
tmp = x + (x * (0.16666666666666666 * (y * y)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-8.2d+158)) then
tmp = 0.16666666666666666d0 * (y * (sin(x) * y))
else if (y <= (-3.8d+43)) then
tmp = 0.16666666666666666d0 * (x * (y * y))
else if (y <= 3.1d+58) then
tmp = sin(x)
else
tmp = x + (x * (0.16666666666666666d0 * (y * y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8.2e+158) {
tmp = 0.16666666666666666 * (y * (Math.sin(x) * y));
} else if (y <= -3.8e+43) {
tmp = 0.16666666666666666 * (x * (y * y));
} else if (y <= 3.1e+58) {
tmp = Math.sin(x);
} else {
tmp = x + (x * (0.16666666666666666 * (y * y)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.2e+158: tmp = 0.16666666666666666 * (y * (math.sin(x) * y)) elif y <= -3.8e+43: tmp = 0.16666666666666666 * (x * (y * y)) elif y <= 3.1e+58: tmp = math.sin(x) else: tmp = x + (x * (0.16666666666666666 * (y * y))) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.2e+158) tmp = Float64(0.16666666666666666 * Float64(y * Float64(sin(x) * y))); elseif (y <= -3.8e+43) tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); elseif (y <= 3.1e+58) tmp = sin(x); else tmp = Float64(x + Float64(x * Float64(0.16666666666666666 * Float64(y * y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8.2e+158) tmp = 0.16666666666666666 * (y * (sin(x) * y)); elseif (y <= -3.8e+43) tmp = 0.16666666666666666 * (x * (y * y)); elseif (y <= 3.1e+58) tmp = sin(x); else tmp = x + (x * (0.16666666666666666 * (y * y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.2e+158], N[(0.16666666666666666 * N[(y * N[(N[Sin[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e+43], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+58], N[Sin[x], $MachinePrecision], N[(x + N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+158}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\sin x \cdot y\right)\right)\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+43}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+58}:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -8.20000000000000008e158Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
unpow2100.0%
associate-*l*89.1%
Simplified89.1%
if -8.20000000000000008e158 < y < -3.80000000000000008e43Initial program 100.0%
Taylor expanded in y around 0 10.6%
unpow210.6%
Simplified10.6%
Taylor expanded in y around inf 10.6%
unpow210.6%
associate-*l*7.8%
Simplified7.8%
Taylor expanded in x around 0 23.3%
unpow223.3%
Simplified23.3%
if -3.80000000000000008e43 < y < 3.0999999999999999e58Initial program 100.0%
Taylor expanded in y around 0 85.4%
unpow285.4%
Simplified85.4%
Taylor expanded in y around 0 85.3%
if 3.0999999999999999e58 < y Initial program 100.0%
Taylor expanded in y around 0 66.0%
unpow266.0%
Simplified66.0%
Taylor expanded in x around 0 58.4%
+-commutative58.4%
unpow258.4%
fma-udef58.4%
Simplified58.4%
*-commutative58.4%
fma-udef58.4%
distribute-rgt-in58.4%
*-un-lft-identity58.4%
Applied egg-rr58.4%
Final simplification72.2%
(FPCore (x y) :precision binary64 (* (sin x) (+ (* 0.16666666666666666 (* y y)) 1.0)))
double code(double x, double y) {
return sin(x) * ((0.16666666666666666 * (y * y)) + 1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * ((0.16666666666666666d0 * (y * y)) + 1.0d0)
end function
public static double code(double x, double y) {
return Math.sin(x) * ((0.16666666666666666 * (y * y)) + 1.0);
}
def code(x, y): return math.sin(x) * ((0.16666666666666666 * (y * y)) + 1.0)
function code(x, y) return Float64(sin(x) * Float64(Float64(0.16666666666666666 * Float64(y * y)) + 1.0)) end
function tmp = code(x, y) tmp = sin(x) * ((0.16666666666666666 * (y * y)) + 1.0); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0 73.2%
unpow273.2%
Simplified73.2%
Final simplification73.2%
(FPCore (x y) :precision binary64 (if (<= y -2.5e+44) (* 0.16666666666666666 (* x (* y y))) (if (<= y 8.5e+63) (sin x) (+ x (* x (* 0.16666666666666666 (* y y)))))))
double code(double x, double y) {
double tmp;
if (y <= -2.5e+44) {
tmp = 0.16666666666666666 * (x * (y * y));
} else if (y <= 8.5e+63) {
tmp = sin(x);
} else {
tmp = x + (x * (0.16666666666666666 * (y * y)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2.5d+44)) then
tmp = 0.16666666666666666d0 * (x * (y * y))
else if (y <= 8.5d+63) then
tmp = sin(x)
else
tmp = x + (x * (0.16666666666666666d0 * (y * y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.5e+44) {
tmp = 0.16666666666666666 * (x * (y * y));
} else if (y <= 8.5e+63) {
tmp = Math.sin(x);
} else {
tmp = x + (x * (0.16666666666666666 * (y * y)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.5e+44: tmp = 0.16666666666666666 * (x * (y * y)) elif y <= 8.5e+63: tmp = math.sin(x) else: tmp = x + (x * (0.16666666666666666 * (y * y))) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.5e+44) tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); elseif (y <= 8.5e+63) tmp = sin(x); else tmp = Float64(x + Float64(x * Float64(0.16666666666666666 * Float64(y * y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.5e+44) tmp = 0.16666666666666666 * (x * (y * y)); elseif (y <= 8.5e+63) tmp = sin(x); else tmp = x + (x * (0.16666666666666666 * (y * y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.5e+44], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+63], N[Sin[x], $MachinePrecision], N[(x + N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+44}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -2.4999999999999998e44Initial program 100.0%
Taylor expanded in y around 0 49.3%
unpow249.3%
Simplified49.3%
Taylor expanded in y around inf 49.3%
unpow249.3%
associate-*l*43.0%
Simplified43.0%
Taylor expanded in x around 0 38.2%
unpow238.2%
Simplified38.2%
if -2.4999999999999998e44 < y < 8.5000000000000004e63Initial program 100.0%
Taylor expanded in y around 0 85.4%
unpow285.4%
Simplified85.4%
Taylor expanded in y around 0 85.3%
if 8.5000000000000004e63 < y Initial program 100.0%
Taylor expanded in y around 0 66.0%
unpow266.0%
Simplified66.0%
Taylor expanded in x around 0 58.4%
+-commutative58.4%
unpow258.4%
fma-udef58.4%
Simplified58.4%
*-commutative58.4%
fma-udef58.4%
distribute-rgt-in58.4%
*-un-lft-identity58.4%
Applied egg-rr58.4%
Final simplification69.0%
(FPCore (x y) :precision binary64 (if (or (<= y -6.8e-24) (not (<= y 2.5))) (* 0.16666666666666666 (* y (* x y))) x))
double code(double x, double y) {
double tmp;
if ((y <= -6.8e-24) || !(y <= 2.5)) {
tmp = 0.16666666666666666 * (y * (x * y));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-6.8d-24)) .or. (.not. (y <= 2.5d0))) then
tmp = 0.16666666666666666d0 * (y * (x * y))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -6.8e-24) || !(y <= 2.5)) {
tmp = 0.16666666666666666 * (y * (x * y));
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -6.8e-24) or not (y <= 2.5): tmp = 0.16666666666666666 * (y * (x * y)) else: tmp = x return tmp
function code(x, y) tmp = 0.0 if ((y <= -6.8e-24) || !(y <= 2.5)) tmp = Float64(0.16666666666666666 * Float64(y * Float64(x * y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -6.8e-24) || ~((y <= 2.5))) tmp = 0.16666666666666666 * (y * (x * y)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -6.8e-24], N[Not[LessEqual[y, 2.5]], $MachinePrecision]], N[(0.16666666666666666 * N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.79999999999999985e-24 or 2.5 < y Initial program 100.0%
Taylor expanded in y around 0 49.5%
unpow249.5%
Simplified49.5%
Taylor expanded in y around inf 46.8%
unpow246.8%
associate-*l*36.5%
Simplified36.5%
Taylor expanded in x around 0 38.7%
unpow238.7%
associate-*l*28.4%
Simplified28.4%
if -6.79999999999999985e-24 < y < 2.5Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in x around 0 49.6%
+-commutative49.6%
unpow249.6%
fma-udef49.6%
Simplified49.6%
Taylor expanded in y around 0 49.6%
Final simplification38.3%
(FPCore (x y) :precision binary64 (if (or (<= y -6.8e-24) (not (<= y 2.5))) (* 0.16666666666666666 (* x (* y y))) x))
double code(double x, double y) {
double tmp;
if ((y <= -6.8e-24) || !(y <= 2.5)) {
tmp = 0.16666666666666666 * (x * (y * y));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-6.8d-24)) .or. (.not. (y <= 2.5d0))) then
tmp = 0.16666666666666666d0 * (x * (y * y))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -6.8e-24) || !(y <= 2.5)) {
tmp = 0.16666666666666666 * (x * (y * y));
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -6.8e-24) or not (y <= 2.5): tmp = 0.16666666666666666 * (x * (y * y)) else: tmp = x return tmp
function code(x, y) tmp = 0.0 if ((y <= -6.8e-24) || !(y <= 2.5)) tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -6.8e-24) || ~((y <= 2.5))) tmp = 0.16666666666666666 * (x * (y * y)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -6.8e-24], N[Not[LessEqual[y, 2.5]], $MachinePrecision]], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-24} \lor \neg \left(y \leq 2.5\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.79999999999999985e-24 or 2.5 < y Initial program 100.0%
Taylor expanded in y around 0 49.5%
unpow249.5%
Simplified49.5%
Taylor expanded in y around inf 46.8%
unpow246.8%
associate-*l*36.5%
Simplified36.5%
Taylor expanded in x around 0 38.7%
unpow238.7%
Simplified38.7%
if -6.79999999999999985e-24 < y < 2.5Initial program 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in x around 0 49.6%
+-commutative49.6%
unpow249.6%
fma-udef49.6%
Simplified49.6%
Taylor expanded in y around 0 49.6%
Final simplification43.8%
(FPCore (x y) :precision binary64 (+ x (* x (* 0.16666666666666666 (* y y)))))
double code(double x, double y) {
return x + (x * (0.16666666666666666 * (y * y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x + (x * (0.16666666666666666d0 * (y * y)))
end function
public static double code(double x, double y) {
return x + (x * (0.16666666666666666 * (y * y)));
}
def code(x, y): return x + (x * (0.16666666666666666 * (y * y)))
function code(x, y) return Float64(x + Float64(x * Float64(0.16666666666666666 * Float64(y * y)))) end
function tmp = code(x, y) tmp = x + (x * (0.16666666666666666 * (y * y))); end
code[x_, y_] := N[(x + N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0 73.2%
unpow273.2%
Simplified73.2%
Taylor expanded in x around 0 43.8%
+-commutative43.8%
unpow243.8%
fma-udef43.8%
Simplified43.8%
*-commutative43.8%
fma-udef43.8%
distribute-rgt-in43.8%
*-un-lft-identity43.8%
Applied egg-rr43.8%
Final simplification43.8%
(FPCore (x y) :precision binary64 x)
double code(double x, double y) {
return x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x
end function
public static double code(double x, double y) {
return x;
}
def code(x, y): return x
function code(x, y) return x end
function tmp = code(x, y) tmp = x; end
code[x_, y_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in y around 0 73.2%
unpow273.2%
Simplified73.2%
Taylor expanded in x around 0 43.8%
+-commutative43.8%
unpow243.8%
fma-udef43.8%
Simplified43.8%
Taylor expanded in y around 0 24.6%
Final simplification24.6%
herbie shell --seed 2023195
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))