
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* 0.16666666666666666 (* y y)))))
(if (<= (cos x) 0.976)
(* (cos x) t_0)
(+ t_0 (* 0.008333333333333333 (pow y 4.0))))))
double code(double x, double y) {
double t_0 = 1.0 + (0.16666666666666666 * (y * y));
double tmp;
if (cos(x) <= 0.976) {
tmp = cos(x) * t_0;
} else {
tmp = t_0 + (0.008333333333333333 * pow(y, 4.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 + (0.16666666666666666d0 * (y * y))
if (cos(x) <= 0.976d0) then
tmp = cos(x) * t_0
else
tmp = t_0 + (0.008333333333333333d0 * (y ** 4.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (0.16666666666666666 * (y * y));
double tmp;
if (Math.cos(x) <= 0.976) {
tmp = Math.cos(x) * t_0;
} else {
tmp = t_0 + (0.008333333333333333 * Math.pow(y, 4.0));
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (0.16666666666666666 * (y * y)) tmp = 0 if math.cos(x) <= 0.976: tmp = math.cos(x) * t_0 else: tmp = t_0 + (0.008333333333333333 * math.pow(y, 4.0)) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))) tmp = 0.0 if (cos(x) <= 0.976) tmp = Float64(cos(x) * t_0); else tmp = Float64(t_0 + Float64(0.008333333333333333 * (y ^ 4.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (0.16666666666666666 * (y * y)); tmp = 0.0; if (cos(x) <= 0.976) tmp = cos(x) * t_0; else tmp = t_0 + (0.008333333333333333 * (y ^ 4.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Cos[x], $MachinePrecision], 0.976], N[(N[Cos[x], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 + N[(0.008333333333333333 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;\cos x \leq 0.976:\\
\;\;\;\;\cos x \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 + 0.008333333333333333 \cdot {y}^{4}\\
\end{array}
\end{array}
if (cos.f64 x) < 0.97599999999999998Initial program 100.0%
Taylor expanded in y around 0 91.0%
Taylor expanded in y around 0 77.9%
unpow277.9%
Simplified77.9%
if 0.97599999999999998 < (cos.f64 x) Initial program 100.0%
Taylor expanded in y around 0 89.8%
Taylor expanded in x around 0 88.4%
Taylor expanded in y around 0 87.8%
associate-+r+87.8%
+-commutative87.8%
unpow287.8%
associate-*r*87.8%
fma-udef87.8%
Simplified87.8%
fma-udef74.3%
associate-*l*74.3%
Applied egg-rr87.8%
Final simplification83.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y (* (cos x) y))))
(t_1 (sqrt (* 6.944444444444444e-5 (pow y 8.0)))))
(if (<= y -2.8e+156)
t_0
(if (<= y -1.28e+32)
t_1
(if (<= y 5.5e+44)
(* (cos x) (+ 1.0 (* 0.16666666666666666 (* y y))))
(if (<= y 2.65e+144) t_1 t_0))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * (cos(x) * y));
double t_1 = sqrt((6.944444444444444e-5 * pow(y, 8.0)));
double tmp;
if (y <= -2.8e+156) {
tmp = t_0;
} else if (y <= -1.28e+32) {
tmp = t_1;
} else if (y <= 5.5e+44) {
tmp = cos(x) * (1.0 + (0.16666666666666666 * (y * y)));
} else if (y <= 2.65e+144) {
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 = 0.16666666666666666d0 * (y * (cos(x) * y))
t_1 = sqrt((6.944444444444444d-5 * (y ** 8.0d0)))
if (y <= (-2.8d+156)) then
tmp = t_0
else if (y <= (-1.28d+32)) then
tmp = t_1
else if (y <= 5.5d+44) then
tmp = cos(x) * (1.0d0 + (0.16666666666666666d0 * (y * y)))
else if (y <= 2.65d+144) 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 = 0.16666666666666666 * (y * (Math.cos(x) * y));
double t_1 = Math.sqrt((6.944444444444444e-5 * Math.pow(y, 8.0)));
double tmp;
if (y <= -2.8e+156) {
tmp = t_0;
} else if (y <= -1.28e+32) {
tmp = t_1;
} else if (y <= 5.5e+44) {
tmp = Math.cos(x) * (1.0 + (0.16666666666666666 * (y * y)));
} else if (y <= 2.65e+144) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * (math.cos(x) * y)) t_1 = math.sqrt((6.944444444444444e-5 * math.pow(y, 8.0))) tmp = 0 if y <= -2.8e+156: tmp = t_0 elif y <= -1.28e+32: tmp = t_1 elif y <= 5.5e+44: tmp = math.cos(x) * (1.0 + (0.16666666666666666 * (y * y))) elif y <= 2.65e+144: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * Float64(cos(x) * y))) t_1 = sqrt(Float64(6.944444444444444e-5 * (y ^ 8.0))) tmp = 0.0 if (y <= -2.8e+156) tmp = t_0; elseif (y <= -1.28e+32) tmp = t_1; elseif (y <= 5.5e+44) tmp = Float64(cos(x) * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))); elseif (y <= 2.65e+144) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * (cos(x) * y)); t_1 = sqrt((6.944444444444444e-5 * (y ^ 8.0))); tmp = 0.0; if (y <= -2.8e+156) tmp = t_0; elseif (y <= -1.28e+32) tmp = t_1; elseif (y <= 5.5e+44) tmp = cos(x) * (1.0 + (0.16666666666666666 * (y * y))); elseif (y <= 2.65e+144) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * N[(N[Cos[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(6.944444444444444e-5 * N[Power[y, 8.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -2.8e+156], t$95$0, If[LessEqual[y, -1.28e+32], t$95$1, If[LessEqual[y, 5.5e+44], N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.65e+144], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot \left(\cos x \cdot y\right)\right)\\
t_1 := \sqrt{6.944444444444444 \cdot 10^{-5} \cdot {y}^{8}}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+156}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -1.28 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+44}:\\
\;\;\;\;\cos x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -2.79999999999999988e156 or 2.6499999999999998e144 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in y around 0 98.8%
unpow298.8%
Simplified98.8%
Taylor expanded in y around inf 98.8%
unpow298.8%
*-commutative98.8%
associate-*r*98.8%
Simplified98.8%
if -2.79999999999999988e156 < y < -1.28e32 or 5.5000000000000001e44 < y < 2.6499999999999998e144Initial program 100.0%
Taylor expanded in y around 0 78.4%
Taylor expanded in x around 0 63.5%
Taylor expanded in y around inf 61.7%
add-sqr-sqrt61.7%
sqrt-unprod75.3%
swap-sqr77.3%
metadata-eval77.3%
pow-prod-up77.3%
metadata-eval77.3%
Applied egg-rr77.3%
if -1.28e32 < y < 5.5000000000000001e44Initial program 100.0%
Taylor expanded in y around 0 89.0%
Taylor expanded in y around 0 88.9%
unpow288.9%
Simplified88.9%
Final simplification89.7%
(FPCore (x y) :precision binary64 (if (<= (cos x) 0.976) (* (cos x) (+ 1.0 (* 0.16666666666666666 (* y y)))) (+ 1.0 (* 0.008333333333333333 (pow y 4.0)))))
double code(double x, double y) {
double tmp;
if (cos(x) <= 0.976) {
tmp = cos(x) * (1.0 + (0.16666666666666666 * (y * y)));
} else {
tmp = 1.0 + (0.008333333333333333 * pow(y, 4.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (cos(x) <= 0.976d0) then
tmp = cos(x) * (1.0d0 + (0.16666666666666666d0 * (y * y)))
else
tmp = 1.0d0 + (0.008333333333333333d0 * (y ** 4.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (Math.cos(x) <= 0.976) {
tmp = Math.cos(x) * (1.0 + (0.16666666666666666 * (y * y)));
} else {
tmp = 1.0 + (0.008333333333333333 * Math.pow(y, 4.0));
}
return tmp;
}
def code(x, y): tmp = 0 if math.cos(x) <= 0.976: tmp = math.cos(x) * (1.0 + (0.16666666666666666 * (y * y))) else: tmp = 1.0 + (0.008333333333333333 * math.pow(y, 4.0)) return tmp
function code(x, y) tmp = 0.0 if (cos(x) <= 0.976) tmp = Float64(cos(x) * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))); else tmp = Float64(1.0 + Float64(0.008333333333333333 * (y ^ 4.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (cos(x) <= 0.976) tmp = cos(x) * (1.0 + (0.16666666666666666 * (y * y))); else tmp = 1.0 + (0.008333333333333333 * (y ^ 4.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[Cos[x], $MachinePrecision], 0.976], N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.008333333333333333 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cos x \leq 0.976:\\
\;\;\;\;\cos x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + 0.008333333333333333 \cdot {y}^{4}\\
\end{array}
\end{array}
if (cos.f64 x) < 0.97599999999999998Initial program 100.0%
Taylor expanded in y around 0 91.0%
Taylor expanded in y around 0 77.9%
unpow277.9%
Simplified77.9%
if 0.97599999999999998 < (cos.f64 x) Initial program 100.0%
Taylor expanded in y around 0 89.8%
Taylor expanded in x around 0 88.4%
Taylor expanded in y around 0 87.8%
associate-+r+87.8%
+-commutative87.8%
unpow287.8%
associate-*r*87.8%
fma-udef87.8%
Simplified87.8%
Taylor expanded in y around 0 87.5%
Final simplification83.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y (* (cos x) y)))))
(if (<= y -2.8e+156)
t_0
(if (<= y -2.7e+31)
(/ (* 0.008333333333333333 (pow y 5.0)) y)
(if (<= y 7.2e+50)
(cos x)
(if (<= y 2.65e+144)
(+ 1.0 (* 0.008333333333333333 (pow y 4.0)))
t_0))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * (cos(x) * y));
double tmp;
if (y <= -2.8e+156) {
tmp = t_0;
} else if (y <= -2.7e+31) {
tmp = (0.008333333333333333 * pow(y, 5.0)) / y;
} else if (y <= 7.2e+50) {
tmp = cos(x);
} else if (y <= 2.65e+144) {
tmp = 1.0 + (0.008333333333333333 * pow(y, 4.0));
} 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 = 0.16666666666666666d0 * (y * (cos(x) * y))
if (y <= (-2.8d+156)) then
tmp = t_0
else if (y <= (-2.7d+31)) then
tmp = (0.008333333333333333d0 * (y ** 5.0d0)) / y
else if (y <= 7.2d+50) then
tmp = cos(x)
else if (y <= 2.65d+144) then
tmp = 1.0d0 + (0.008333333333333333d0 * (y ** 4.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * (Math.cos(x) * y));
double tmp;
if (y <= -2.8e+156) {
tmp = t_0;
} else if (y <= -2.7e+31) {
tmp = (0.008333333333333333 * Math.pow(y, 5.0)) / y;
} else if (y <= 7.2e+50) {
tmp = Math.cos(x);
} else if (y <= 2.65e+144) {
tmp = 1.0 + (0.008333333333333333 * Math.pow(y, 4.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * (math.cos(x) * y)) tmp = 0 if y <= -2.8e+156: tmp = t_0 elif y <= -2.7e+31: tmp = (0.008333333333333333 * math.pow(y, 5.0)) / y elif y <= 7.2e+50: tmp = math.cos(x) elif y <= 2.65e+144: tmp = 1.0 + (0.008333333333333333 * math.pow(y, 4.0)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * Float64(cos(x) * y))) tmp = 0.0 if (y <= -2.8e+156) tmp = t_0; elseif (y <= -2.7e+31) tmp = Float64(Float64(0.008333333333333333 * (y ^ 5.0)) / y); elseif (y <= 7.2e+50) tmp = cos(x); elseif (y <= 2.65e+144) tmp = Float64(1.0 + Float64(0.008333333333333333 * (y ^ 4.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * (cos(x) * y)); tmp = 0.0; if (y <= -2.8e+156) tmp = t_0; elseif (y <= -2.7e+31) tmp = (0.008333333333333333 * (y ^ 5.0)) / y; elseif (y <= 7.2e+50) tmp = cos(x); elseif (y <= 2.65e+144) tmp = 1.0 + (0.008333333333333333 * (y ^ 4.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * N[(N[Cos[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+156], t$95$0, If[LessEqual[y, -2.7e+31], N[(N[(0.008333333333333333 * N[Power[y, 5.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.2e+50], N[Cos[x], $MachinePrecision], If[LessEqual[y, 2.65e+144], N[(1.0 + N[(0.008333333333333333 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot \left(\cos x \cdot y\right)\right)\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+156}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{+31}:\\
\;\;\;\;\frac{0.008333333333333333 \cdot {y}^{5}}{y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+50}:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+144}:\\
\;\;\;\;1 + 0.008333333333333333 \cdot {y}^{4}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -2.79999999999999988e156 or 2.6499999999999998e144 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in y around 0 98.8%
unpow298.8%
Simplified98.8%
Taylor expanded in y around inf 98.8%
unpow298.8%
*-commutative98.8%
associate-*r*98.8%
Simplified98.8%
if -2.79999999999999988e156 < y < -2.69999999999999986e31Initial program 100.0%
Taylor expanded in y around 0 72.5%
Taylor expanded in x around 0 65.9%
Taylor expanded in y around inf 65.9%
if -2.69999999999999986e31 < y < 7.19999999999999972e50Initial program 100.0%
Taylor expanded in y around 0 89.0%
Taylor expanded in y around 0 88.6%
if 7.19999999999999972e50 < y < 2.6499999999999998e144Initial program 100.0%
Taylor expanded in y around 0 89.0%
Taylor expanded in x around 0 59.2%
Taylor expanded in y around 0 59.2%
associate-+r+59.2%
+-commutative59.2%
unpow259.2%
associate-*r*59.2%
fma-udef59.2%
Simplified59.2%
Taylor expanded in y around 0 59.2%
Final simplification87.0%
(FPCore (x y) :precision binary64 (let* ((t_0 (* 0.008333333333333333 (pow y 4.0)))) (if (<= y -4.5e+30) t_0 (if (<= y 5.5e+44) (cos x) (+ 1.0 t_0)))))
double code(double x, double y) {
double t_0 = 0.008333333333333333 * pow(y, 4.0);
double tmp;
if (y <= -4.5e+30) {
tmp = t_0;
} else if (y <= 5.5e+44) {
tmp = cos(x);
} else {
tmp = 1.0 + 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 = 0.008333333333333333d0 * (y ** 4.0d0)
if (y <= (-4.5d+30)) then
tmp = t_0
else if (y <= 5.5d+44) then
tmp = cos(x)
else
tmp = 1.0d0 + t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.008333333333333333 * Math.pow(y, 4.0);
double tmp;
if (y <= -4.5e+30) {
tmp = t_0;
} else if (y <= 5.5e+44) {
tmp = Math.cos(x);
} else {
tmp = 1.0 + t_0;
}
return tmp;
}
def code(x, y): t_0 = 0.008333333333333333 * math.pow(y, 4.0) tmp = 0 if y <= -4.5e+30: tmp = t_0 elif y <= 5.5e+44: tmp = math.cos(x) else: tmp = 1.0 + t_0 return tmp
function code(x, y) t_0 = Float64(0.008333333333333333 * (y ^ 4.0)) tmp = 0.0 if (y <= -4.5e+30) tmp = t_0; elseif (y <= 5.5e+44) tmp = cos(x); else tmp = Float64(1.0 + t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.008333333333333333 * (y ^ 4.0); tmp = 0.0; if (y <= -4.5e+30) tmp = t_0; elseif (y <= 5.5e+44) tmp = cos(x); else tmp = 1.0 + t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.008333333333333333 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+30], t$95$0, If[LessEqual[y, 5.5e+44], N[Cos[x], $MachinePrecision], N[(1.0 + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.008333333333333333 \cdot {y}^{4}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+30}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+44}:\\
\;\;\;\;\cos x\\
\mathbf{else}:\\
\;\;\;\;1 + t_0\\
\end{array}
\end{array}
if y < -4.49999999999999995e30Initial program 100.0%
Taylor expanded in y around 0 87.1%
Taylor expanded in x around 0 71.9%
Taylor expanded in y around inf 70.6%
if -4.49999999999999995e30 < y < 5.5000000000000001e44Initial program 100.0%
Taylor expanded in y around 0 89.0%
Taylor expanded in y around 0 88.6%
if 5.5000000000000001e44 < y Initial program 100.0%
Taylor expanded in y around 0 96.8%
Taylor expanded in x around 0 66.2%
Taylor expanded in y around 0 66.2%
associate-+r+66.2%
+-commutative66.2%
unpow266.2%
associate-*r*66.2%
fma-udef66.2%
Simplified66.2%
Taylor expanded in y around 0 66.2%
Final simplification78.8%
(FPCore (x y) :precision binary64 (if (<= y -2.9e+30) (/ (* 0.008333333333333333 (pow y 5.0)) y) (if (<= y 5.5e+44) (cos x) (+ 1.0 (* 0.008333333333333333 (pow y 4.0))))))
double code(double x, double y) {
double tmp;
if (y <= -2.9e+30) {
tmp = (0.008333333333333333 * pow(y, 5.0)) / y;
} else if (y <= 5.5e+44) {
tmp = cos(x);
} else {
tmp = 1.0 + (0.008333333333333333 * pow(y, 4.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2.9d+30)) then
tmp = (0.008333333333333333d0 * (y ** 5.0d0)) / y
else if (y <= 5.5d+44) then
tmp = cos(x)
else
tmp = 1.0d0 + (0.008333333333333333d0 * (y ** 4.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.9e+30) {
tmp = (0.008333333333333333 * Math.pow(y, 5.0)) / y;
} else if (y <= 5.5e+44) {
tmp = Math.cos(x);
} else {
tmp = 1.0 + (0.008333333333333333 * Math.pow(y, 4.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.9e+30: tmp = (0.008333333333333333 * math.pow(y, 5.0)) / y elif y <= 5.5e+44: tmp = math.cos(x) else: tmp = 1.0 + (0.008333333333333333 * math.pow(y, 4.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.9e+30) tmp = Float64(Float64(0.008333333333333333 * (y ^ 5.0)) / y); elseif (y <= 5.5e+44) tmp = cos(x); else tmp = Float64(1.0 + Float64(0.008333333333333333 * (y ^ 4.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.9e+30) tmp = (0.008333333333333333 * (y ^ 5.0)) / y; elseif (y <= 5.5e+44) tmp = cos(x); else tmp = 1.0 + (0.008333333333333333 * (y ^ 4.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.9e+30], N[(N[(0.008333333333333333 * N[Power[y, 5.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 5.5e+44], N[Cos[x], $MachinePrecision], N[(1.0 + N[(0.008333333333333333 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+30}:\\
\;\;\;\;\frac{0.008333333333333333 \cdot {y}^{5}}{y}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+44}:\\
\;\;\;\;\cos x\\
\mathbf{else}:\\
\;\;\;\;1 + 0.008333333333333333 \cdot {y}^{4}\\
\end{array}
\end{array}
if y < -2.8999999999999998e30Initial program 100.0%
Taylor expanded in y around 0 87.1%
Taylor expanded in x around 0 71.9%
Taylor expanded in y around inf 71.9%
if -2.8999999999999998e30 < y < 5.5000000000000001e44Initial program 100.0%
Taylor expanded in y around 0 89.0%
Taylor expanded in y around 0 88.6%
if 5.5000000000000001e44 < y Initial program 100.0%
Taylor expanded in y around 0 96.8%
Taylor expanded in x around 0 66.2%
Taylor expanded in y around 0 66.2%
associate-+r+66.2%
+-commutative66.2%
unpow266.2%
associate-*r*66.2%
fma-udef66.2%
Simplified66.2%
Taylor expanded in y around 0 66.2%
Final simplification79.1%
(FPCore (x y) :precision binary64 (if (or (<= y -3.15e+31) (not (<= y 5.5e+44))) (* 0.008333333333333333 (pow y 4.0)) (cos x)))
double code(double x, double y) {
double tmp;
if ((y <= -3.15e+31) || !(y <= 5.5e+44)) {
tmp = 0.008333333333333333 * pow(y, 4.0);
} else {
tmp = cos(x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-3.15d+31)) .or. (.not. (y <= 5.5d+44))) then
tmp = 0.008333333333333333d0 * (y ** 4.0d0)
else
tmp = cos(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -3.15e+31) || !(y <= 5.5e+44)) {
tmp = 0.008333333333333333 * Math.pow(y, 4.0);
} else {
tmp = Math.cos(x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -3.15e+31) or not (y <= 5.5e+44): tmp = 0.008333333333333333 * math.pow(y, 4.0) else: tmp = math.cos(x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -3.15e+31) || !(y <= 5.5e+44)) tmp = Float64(0.008333333333333333 * (y ^ 4.0)); else tmp = cos(x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -3.15e+31) || ~((y <= 5.5e+44))) tmp = 0.008333333333333333 * (y ^ 4.0); else tmp = cos(x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -3.15e+31], N[Not[LessEqual[y, 5.5e+44]], $MachinePrecision]], N[(0.008333333333333333 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision], N[Cos[x], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.15 \cdot 10^{+31} \lor \neg \left(y \leq 5.5 \cdot 10^{+44}\right):\\
\;\;\;\;0.008333333333333333 \cdot {y}^{4}\\
\mathbf{else}:\\
\;\;\;\;\cos x\\
\end{array}
\end{array}
if y < -3.1499999999999999e31 or 5.5000000000000001e44 < y Initial program 100.0%
Taylor expanded in y around 0 91.7%
Taylor expanded in x around 0 69.2%
Taylor expanded in y around inf 68.5%
if -3.1499999999999999e31 < y < 5.5000000000000001e44Initial program 100.0%
Taylor expanded in y around 0 89.0%
Taylor expanded in y around 0 88.6%
Final simplification78.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y)))
(t_1 (/ (+ (* t_0 t_0) -1.0) (+ t_0 -1.0))))
(if (<= y -1.35e+154)
t_0
(if (<= y -0.00045)
t_1
(if (<= y 7.5e+70) (cos x) (if (<= y 2.65e+144) t_1 (+ 1.0 t_0)))))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double t_1 = ((t_0 * t_0) + -1.0) / (t_0 + -1.0);
double tmp;
if (y <= -1.35e+154) {
tmp = t_0;
} else if (y <= -0.00045) {
tmp = t_1;
} else if (y <= 7.5e+70) {
tmp = cos(x);
} else if (y <= 2.65e+144) {
tmp = t_1;
} else {
tmp = 1.0 + 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 = 0.16666666666666666d0 * (y * y)
t_1 = ((t_0 * t_0) + (-1.0d0)) / (t_0 + (-1.0d0))
if (y <= (-1.35d+154)) then
tmp = t_0
else if (y <= (-0.00045d0)) then
tmp = t_1
else if (y <= 7.5d+70) then
tmp = cos(x)
else if (y <= 2.65d+144) then
tmp = t_1
else
tmp = 1.0d0 + t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double t_1 = ((t_0 * t_0) + -1.0) / (t_0 + -1.0);
double tmp;
if (y <= -1.35e+154) {
tmp = t_0;
} else if (y <= -0.00045) {
tmp = t_1;
} else if (y <= 7.5e+70) {
tmp = Math.cos(x);
} else if (y <= 2.65e+144) {
tmp = t_1;
} else {
tmp = 1.0 + t_0;
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) t_1 = ((t_0 * t_0) + -1.0) / (t_0 + -1.0) tmp = 0 if y <= -1.35e+154: tmp = t_0 elif y <= -0.00045: tmp = t_1 elif y <= 7.5e+70: tmp = math.cos(x) elif y <= 2.65e+144: tmp = t_1 else: tmp = 1.0 + t_0 return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) t_1 = Float64(Float64(Float64(t_0 * t_0) + -1.0) / Float64(t_0 + -1.0)) tmp = 0.0 if (y <= -1.35e+154) tmp = t_0; elseif (y <= -0.00045) tmp = t_1; elseif (y <= 7.5e+70) tmp = cos(x); elseif (y <= 2.65e+144) tmp = t_1; else tmp = Float64(1.0 + t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); t_1 = ((t_0 * t_0) + -1.0) / (t_0 + -1.0); tmp = 0.0; if (y <= -1.35e+154) tmp = t_0; elseif (y <= -0.00045) tmp = t_1; elseif (y <= 7.5e+70) tmp = cos(x); elseif (y <= 2.65e+144) tmp = t_1; else tmp = 1.0 + t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+154], t$95$0, If[LessEqual[y, -0.00045], t$95$1, If[LessEqual[y, 7.5e+70], N[Cos[x], $MachinePrecision], If[LessEqual[y, 2.65e+144], t$95$1, N[(1.0 + t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -0.00045:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+70}:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1 + t_0\\
\end{array}
\end{array}
if y < -1.35000000000000003e154Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in x around 0 77.8%
+-commutative77.8%
unpow277.8%
associate-*r*77.8%
fma-udef77.8%
Simplified77.8%
Taylor expanded in y around inf 77.8%
unpow277.8%
Simplified77.8%
if -1.35000000000000003e154 < y < -4.4999999999999999e-4 or 7.50000000000000031e70 < y < 2.6499999999999998e144Initial program 100.0%
Taylor expanded in y around 0 70.0%
Taylor expanded in y around 0 7.2%
unpow27.2%
Simplified7.2%
Taylor expanded in x around 0 6.3%
+-commutative6.3%
unpow26.3%
associate-*r*6.3%
fma-udef6.3%
Simplified6.3%
fma-udef6.3%
flip-+54.7%
associate-*l*54.7%
associate-*l*54.7%
metadata-eval54.7%
associate-*l*54.7%
Applied egg-rr54.7%
if -4.4999999999999999e-4 < y < 7.50000000000000031e70Initial program 100.0%
Taylor expanded in y around 0 93.1%
Taylor expanded in y around 0 93.0%
if 2.6499999999999998e144 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in y around 0 97.8%
unpow297.8%
Simplified97.8%
Taylor expanded in x around 0 69.0%
+-commutative69.0%
unpow269.0%
associate-*r*69.0%
fma-udef69.0%
Simplified69.0%
fma-udef69.0%
associate-*l*69.0%
Applied egg-rr69.0%
Final simplification78.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 0.16666666666666666 (* y y))))
(if (<= y -1.35e+154)
t_0
(if (<= y 2.65e+144) (/ (+ (* t_0 t_0) -1.0) (+ t_0 -1.0)) (+ 1.0 t_0)))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 * (y * y);
double tmp;
if (y <= -1.35e+154) {
tmp = t_0;
} else if (y <= 2.65e+144) {
tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0);
} else {
tmp = 1.0 + 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 = 0.16666666666666666d0 * (y * y)
if (y <= (-1.35d+154)) then
tmp = t_0
else if (y <= 2.65d+144) then
tmp = ((t_0 * t_0) + (-1.0d0)) / (t_0 + (-1.0d0))
else
tmp = 1.0d0 + t_0
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 <= -1.35e+154) {
tmp = t_0;
} else if (y <= 2.65e+144) {
tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0);
} else {
tmp = 1.0 + t_0;
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 * (y * y) tmp = 0 if y <= -1.35e+154: tmp = t_0 elif y <= 2.65e+144: tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0) else: tmp = 1.0 + t_0 return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 * Float64(y * y)) tmp = 0.0 if (y <= -1.35e+154) tmp = t_0; elseif (y <= 2.65e+144) tmp = Float64(Float64(Float64(t_0 * t_0) + -1.0) / Float64(t_0 + -1.0)); else tmp = Float64(1.0 + t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 * (y * y); tmp = 0.0; if (y <= -1.35e+154) tmp = t_0; elseif (y <= 2.65e+144) tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0); else tmp = 1.0 + t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+154], t$95$0, If[LessEqual[y, 2.65e+144], N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+144}:\\
\;\;\;\;\frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;1 + t_0\\
\end{array}
\end{array}
if y < -1.35000000000000003e154Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in y around 0 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in x around 0 77.8%
+-commutative77.8%
unpow277.8%
associate-*r*77.8%
fma-udef77.8%
Simplified77.8%
Taylor expanded in y around inf 77.8%
unpow277.8%
Simplified77.8%
if -1.35000000000000003e154 < y < 2.6499999999999998e144Initial program 100.0%
Taylor expanded in y around 0 86.1%
Taylor expanded in y around 0 67.0%
unpow267.0%
Simplified67.0%
Taylor expanded in x around 0 37.9%
+-commutative37.9%
unpow237.9%
associate-*r*37.9%
fma-udef37.9%
Simplified37.9%
fma-udef37.9%
flip-+52.6%
associate-*l*52.6%
associate-*l*52.6%
metadata-eval52.6%
associate-*l*52.6%
Applied egg-rr52.6%
if 2.6499999999999998e144 < y Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in y around 0 97.8%
unpow297.8%
Simplified97.8%
Taylor expanded in x around 0 69.0%
+-commutative69.0%
unpow269.0%
associate-*r*69.0%
fma-udef69.0%
Simplified69.0%
fma-udef69.0%
associate-*l*69.0%
Applied egg-rr69.0%
Final simplification58.8%
(FPCore (x y) :precision binary64 (if (or (<= y -2.5) (not (<= y 2.6))) (* 0.16666666666666666 (* y y)) 1.0))
double code(double x, double y) {
double tmp;
if ((y <= -2.5) || !(y <= 2.6)) {
tmp = 0.16666666666666666 * (y * y);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.5d0)) .or. (.not. (y <= 2.6d0))) then
tmp = 0.16666666666666666d0 * (y * y)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.5) || !(y <= 2.6)) {
tmp = 0.16666666666666666 * (y * y);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.5) or not (y <= 2.6): tmp = 0.16666666666666666 * (y * y) else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.5) || !(y <= 2.6)) tmp = Float64(0.16666666666666666 * Float64(y * y)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.5) || ~((y <= 2.6))) tmp = 0.16666666666666666 * (y * y); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.5], N[Not[LessEqual[y, 2.6]], $MachinePrecision]], N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \lor \neg \left(y \leq 2.6\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -2.5 or 2.60000000000000009 < y Initial program 100.0%
Taylor expanded in y around 0 82.3%
Taylor expanded in y around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in x around 0 42.6%
+-commutative42.6%
unpow242.6%
associate-*r*42.6%
fma-udef42.6%
Simplified42.6%
Taylor expanded in y around inf 42.6%
unpow242.6%
Simplified42.6%
if -2.5 < y < 2.60000000000000009Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around 0 55.9%
Taylor expanded in y around 0 55.5%
Final simplification48.4%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.16666666666666666 (* y y))))
double code(double x, double y) {
return 1.0 + (0.16666666666666666 * (y * y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.16666666666666666d0 * (y * y))
end function
public static double code(double x, double y) {
return 1.0 + (0.16666666666666666 * (y * y));
}
def code(x, y): return 1.0 + (0.16666666666666666 * (y * y))
function code(x, y) return Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))) end
function tmp = code(x, y) tmp = 1.0 + (0.16666666666666666 * (y * y)); end
code[x_, y_] := N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.16666666666666666 \cdot \left(y \cdot y\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0 90.3%
Taylor expanded in y around 0 76.7%
unpow276.7%
Simplified76.7%
Taylor expanded in x around 0 48.6%
+-commutative48.6%
unpow248.6%
associate-*r*48.6%
fma-udef48.6%
Simplified48.6%
fma-udef48.6%
associate-*l*48.6%
Applied egg-rr48.6%
Final simplification48.6%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in y around 0 90.3%
Taylor expanded in x around 0 59.3%
Taylor expanded in y around 0 26.5%
Final simplification26.5%
herbie shell --seed 2023196
(FPCore (x y)
:name "Linear.Quaternion:$csin from linear-1.19.1.3"
:precision binary64
(* (cos x) (/ (sinh y) y)))