
(FPCore (x y) :precision binary64 (* x (/ (sin y) y)))
double code(double x, double y) {
return x * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (sin(y) / y)
end function
public static double code(double x, double y) {
return x * (Math.sin(y) / y);
}
def code(x, y): return x * (math.sin(y) / y)
function code(x, y) return Float64(x * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = x * (sin(y) / y); end
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{\sin y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* x (/ (sin y) y)))
double code(double x, double y) {
return x * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (sin(y) / y)
end function
public static double code(double x, double y) {
return x * (Math.sin(y) / y);
}
def code(x, y): return x * (math.sin(y) / y)
function code(x, y) return Float64(x * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = x * (sin(y) / y); end
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{\sin y}{y}
\end{array}
(FPCore (x y) :precision binary64 (/ x (/ y (sin y))))
double code(double x, double y) {
return x / (y / sin(y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / (y / sin(y))
end function
public static double code(double x, double y) {
return x / (y / Math.sin(y));
}
def code(x, y): return x / (y / math.sin(y))
function code(x, y) return Float64(x / Float64(y / sin(y))) end
function tmp = code(x, y) tmp = x / (y / sin(y)); end
code[x_, y_] := N[(x / N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{y}{\sin y}}
\end{array}
Initial program 99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y) :precision binary64 (* x (/ (sin y) y)))
double code(double x, double y) {
return x * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (sin(y) / y)
end function
public static double code(double x, double y) {
return x * (Math.sin(y) / y);
}
def code(x, y): return x * (math.sin(y) / y)
function code(x, y) return Float64(x * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = x * (sin(y) / y); end
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{\sin y}{y}
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= y -6.2)
(* (/ 6.0 y) (/ x y))
(if (<= y 3e+28)
(* x (+ 1.0 (* (* y y) -0.16666666666666666)))
(/ (* x 6.0) (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= -6.2) {
tmp = (6.0 / y) * (x / y);
} else if (y <= 3e+28) {
tmp = x * (1.0 + ((y * y) * -0.16666666666666666));
} else {
tmp = (x * 6.0) / (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 <= (-6.2d0)) then
tmp = (6.0d0 / y) * (x / y)
else if (y <= 3d+28) then
tmp = x * (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
else
tmp = (x * 6.0d0) / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -6.2) {
tmp = (6.0 / y) * (x / y);
} else if (y <= 3e+28) {
tmp = x * (1.0 + ((y * y) * -0.16666666666666666));
} else {
tmp = (x * 6.0) / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -6.2: tmp = (6.0 / y) * (x / y) elif y <= 3e+28: tmp = x * (1.0 + ((y * y) * -0.16666666666666666)) else: tmp = (x * 6.0) / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= -6.2) tmp = Float64(Float64(6.0 / y) * Float64(x / y)); elseif (y <= 3e+28) tmp = Float64(x * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))); else tmp = Float64(Float64(x * 6.0) / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -6.2) tmp = (6.0 / y) * (x / y); elseif (y <= 3e+28) tmp = x * (1.0 + ((y * y) * -0.16666666666666666)); else tmp = (x * 6.0) / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -6.2], N[(N[(6.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+28], N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 6.0), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2:\\
\;\;\;\;\frac{6}{y} \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+28}:\\
\;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 6}{y \cdot y}\\
\end{array}
\end{array}
if y < -6.20000000000000018Initial program 99.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 30.4%
unpow230.4%
Simplified30.4%
Taylor expanded in y around inf 30.4%
associate-*r/30.4%
unpow230.4%
times-frac30.5%
Simplified30.5%
if -6.20000000000000018 < y < 3.0000000000000001e28Initial program 100.0%
Taylor expanded in y around 0 96.4%
unpow296.4%
Simplified96.4%
if 3.0000000000000001e28 < y Initial program 99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 29.2%
unpow229.2%
Simplified29.2%
Taylor expanded in y around inf 29.2%
associate-*r/29.2%
unpow229.2%
Simplified29.2%
Final simplification63.2%
(FPCore (x y)
:precision binary64
(if (<= y -6.2)
(* (/ 6.0 y) (/ x y))
(if (<= y 2.1e+28)
(+ x (* -0.16666666666666666 (* x (* y y))))
(/ (* x 6.0) (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= -6.2) {
tmp = (6.0 / y) * (x / y);
} else if (y <= 2.1e+28) {
tmp = x + (-0.16666666666666666 * (x * (y * y)));
} else {
tmp = (x * 6.0) / (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 <= (-6.2d0)) then
tmp = (6.0d0 / y) * (x / y)
else if (y <= 2.1d+28) then
tmp = x + ((-0.16666666666666666d0) * (x * (y * y)))
else
tmp = (x * 6.0d0) / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -6.2) {
tmp = (6.0 / y) * (x / y);
} else if (y <= 2.1e+28) {
tmp = x + (-0.16666666666666666 * (x * (y * y)));
} else {
tmp = (x * 6.0) / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -6.2: tmp = (6.0 / y) * (x / y) elif y <= 2.1e+28: tmp = x + (-0.16666666666666666 * (x * (y * y))) else: tmp = (x * 6.0) / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= -6.2) tmp = Float64(Float64(6.0 / y) * Float64(x / y)); elseif (y <= 2.1e+28) tmp = Float64(x + Float64(-0.16666666666666666 * Float64(x * Float64(y * y)))); else tmp = Float64(Float64(x * 6.0) / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -6.2) tmp = (6.0 / y) * (x / y); elseif (y <= 2.1e+28) tmp = x + (-0.16666666666666666 * (x * (y * y))); else tmp = (x * 6.0) / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -6.2], N[(N[(6.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+28], N[(x + N[(-0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 6.0), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2:\\
\;\;\;\;\frac{6}{y} \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+28}:\\
\;\;\;\;x + -0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 6}{y \cdot y}\\
\end{array}
\end{array}
if y < -6.20000000000000018Initial program 99.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 30.4%
unpow230.4%
Simplified30.4%
Taylor expanded in y around inf 30.4%
associate-*r/30.4%
unpow230.4%
times-frac30.5%
Simplified30.5%
if -6.20000000000000018 < y < 2.09999999999999989e28Initial program 100.0%
add-cube-cbrt98.0%
pow398.1%
*-commutative98.1%
Applied egg-rr98.1%
Taylor expanded in y around 0 96.4%
pow-base-196.4%
*-lft-identity96.4%
unpow296.4%
distribute-rgt-out96.4%
pow-base-196.4%
*-lft-identity96.4%
metadata-eval96.4%
Simplified96.4%
Taylor expanded in y around 0 96.4%
unpow296.4%
*-commutative96.4%
Simplified96.4%
if 2.09999999999999989e28 < y Initial program 99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 29.2%
unpow229.2%
Simplified29.2%
Taylor expanded in y around inf 29.2%
associate-*r/29.2%
unpow229.2%
Simplified29.2%
Final simplification63.2%
(FPCore (x y) :precision binary64 (if (or (<= y -2.5) (not (<= y 2.4))) (* (/ 6.0 y) (/ x y)) x))
double code(double x, double y) {
double tmp;
if ((y <= -2.5) || !(y <= 2.4)) {
tmp = (6.0 / 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 <= (-2.5d0)) .or. (.not. (y <= 2.4d0))) then
tmp = (6.0d0 / y) * (x / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.5) || !(y <= 2.4)) {
tmp = (6.0 / y) * (x / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.5) or not (y <= 2.4): tmp = (6.0 / y) * (x / y) else: tmp = x return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.5) || !(y <= 2.4)) tmp = Float64(Float64(6.0 / y) * Float64(x / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.5) || ~((y <= 2.4))) tmp = (6.0 / y) * (x / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.5], N[Not[LessEqual[y, 2.4]], $MachinePrecision]], N[(N[(6.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \lor \neg \left(y \leq 2.4\right):\\
\;\;\;\;\frac{6}{y} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.5 or 2.39999999999999991 < y Initial program 99.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 29.4%
unpow229.4%
Simplified29.4%
Taylor expanded in y around inf 29.4%
associate-*r/29.4%
unpow229.4%
times-frac29.4%
Simplified29.4%
if -2.5 < y < 2.39999999999999991Initial program 100.0%
Taylor expanded in y around 0 97.7%
Final simplification62.7%
(FPCore (x y) :precision binary64 (if (<= y -2.5) (* (/ 6.0 y) (/ x y)) (if (<= y 2.4) x (/ (* x 6.0) (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= -2.5) {
tmp = (6.0 / y) * (x / y);
} else if (y <= 2.4) {
tmp = x;
} else {
tmp = (x * 6.0) / (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.5d0)) then
tmp = (6.0d0 / y) * (x / y)
else if (y <= 2.4d0) then
tmp = x
else
tmp = (x * 6.0d0) / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.5) {
tmp = (6.0 / y) * (x / y);
} else if (y <= 2.4) {
tmp = x;
} else {
tmp = (x * 6.0) / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.5: tmp = (6.0 / y) * (x / y) elif y <= 2.4: tmp = x else: tmp = (x * 6.0) / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.5) tmp = Float64(Float64(6.0 / y) * Float64(x / y)); elseif (y <= 2.4) tmp = x; else tmp = Float64(Float64(x * 6.0) / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.5) tmp = (6.0 / y) * (x / y); elseif (y <= 2.4) tmp = x; else tmp = (x * 6.0) / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.5], N[(N[(6.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4], x, N[(N[(x * 6.0), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5:\\
\;\;\;\;\frac{6}{y} \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 2.4:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 6}{y \cdot y}\\
\end{array}
\end{array}
if y < -2.5Initial program 99.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 30.4%
unpow230.4%
Simplified30.4%
Taylor expanded in y around inf 30.4%
associate-*r/30.4%
unpow230.4%
times-frac30.5%
Simplified30.5%
if -2.5 < y < 2.39999999999999991Initial program 100.0%
Taylor expanded in y around 0 97.7%
if 2.39999999999999991 < y Initial program 99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 28.1%
unpow228.1%
Simplified28.1%
Taylor expanded in y around inf 28.1%
associate-*r/28.1%
unpow228.1%
Simplified28.1%
Final simplification62.8%
(FPCore (x y) :precision binary64 (if (or (<= y -2.2e+89) (not (<= y 1.2e-23))) (* y (/ x y)) x))
double code(double x, double y) {
double tmp;
if ((y <= -2.2e+89) || !(y <= 1.2e-23)) {
tmp = 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 <= (-2.2d+89)) .or. (.not. (y <= 1.2d-23))) then
tmp = y * (x / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.2e+89) || !(y <= 1.2e-23)) {
tmp = y * (x / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.2e+89) or not (y <= 1.2e-23): tmp = y * (x / y) else: tmp = x return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.2e+89) || !(y <= 1.2e-23)) tmp = Float64(y * Float64(x / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.2e+89) || ~((y <= 1.2e-23))) tmp = y * (x / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.2e+89], N[Not[LessEqual[y, 1.2e-23]], $MachinePrecision]], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+89} \lor \neg \left(y \leq 1.2 \cdot 10^{-23}\right):\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.2e89 or 1.19999999999999998e-23 < y Initial program 99.6%
associate-*r/99.5%
clear-num98.9%
*-commutative98.9%
Applied egg-rr98.9%
Taylor expanded in y around 0 6.5%
clear-num6.5%
*-inverses6.5%
associate-/l*6.3%
*-commutative6.3%
clear-num6.3%
associate-/r/6.3%
*-commutative6.3%
associate-*r*33.8%
associate-/r/34.8%
clear-num33.8%
Applied egg-rr33.8%
if -2.2e89 < y < 1.19999999999999998e-23Initial program 99.9%
Taylor expanded in y around 0 82.8%
Final simplification61.7%
(FPCore (x y) :precision binary64 (if (<= y -2.2e+89) (/ y (/ y x)) (if (<= y 1.2e-23) x (* y (/ x y)))))
double code(double x, double y) {
double tmp;
if (y <= -2.2e+89) {
tmp = y / (y / x);
} else if (y <= 1.2e-23) {
tmp = x;
} else {
tmp = y * (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2.2d+89)) then
tmp = y / (y / x)
else if (y <= 1.2d-23) then
tmp = x
else
tmp = y * (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.2e+89) {
tmp = y / (y / x);
} else if (y <= 1.2e-23) {
tmp = x;
} else {
tmp = y * (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.2e+89: tmp = y / (y / x) elif y <= 1.2e-23: tmp = x else: tmp = y * (x / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.2e+89) tmp = Float64(y / Float64(y / x)); elseif (y <= 1.2e-23) tmp = x; else tmp = Float64(y * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.2e+89) tmp = y / (y / x); elseif (y <= 1.2e-23) tmp = x; else tmp = y * (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.2e+89], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-23], x, N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+89}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -2.2e89Initial program 99.6%
associate-*r/99.5%
clear-num98.0%
*-commutative98.0%
Applied egg-rr98.0%
Taylor expanded in y around 0 4.2%
clear-num4.2%
*-inverses4.2%
associate-/l*4.0%
*-commutative4.0%
clear-num4.0%
associate-/r/4.0%
*-commutative4.0%
associate-*r*38.7%
associate-/r/41.0%
clear-num38.7%
Applied egg-rr38.7%
*-commutative38.7%
clear-num41.0%
un-div-inv41.0%
Applied egg-rr41.0%
if -2.2e89 < y < 1.19999999999999998e-23Initial program 99.9%
Taylor expanded in y around 0 82.8%
if 1.19999999999999998e-23 < y Initial program 99.5%
associate-*r/99.4%
clear-num99.5%
*-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in y around 0 8.3%
clear-num8.3%
*-inverses8.3%
associate-/l*8.2%
*-commutative8.2%
clear-num8.2%
associate-/r/8.2%
*-commutative8.2%
associate-*r*29.8%
associate-/r/29.8%
clear-num29.8%
Applied egg-rr29.8%
Final simplification62.2%
(FPCore (x y) :precision binary64 (/ x (+ 1.0 (* 0.16666666666666666 (* y y)))))
double code(double x, double y) {
return x / (1.0 + (0.16666666666666666 * (y * y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / (1.0d0 + (0.16666666666666666d0 * (y * y)))
end function
public static double code(double x, double y) {
return x / (1.0 + (0.16666666666666666 * (y * y)));
}
def code(x, y): return x / (1.0 + (0.16666666666666666 * (y * y)))
function code(x, y) return Float64(x / Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))) end
function tmp = code(x, y) tmp = x / (1.0 + (0.16666666666666666 * (y * y))); end
code[x_, y_] := N[(x / N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{1 + 0.16666666666666666 \cdot \left(y \cdot y\right)}
\end{array}
Initial program 99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 63.1%
unpow263.1%
Simplified63.1%
Final simplification63.1%
(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 99.8%
Taylor expanded in y around 0 50.0%
Final simplification50.0%
herbie shell --seed 2023176
(FPCore (x y)
:name "Linear.Quaternion:$cexp from linear-1.19.1.3"
:precision binary64
(* x (/ (sin y) y)))