
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
(FPCore (x y z) :precision binary64 (fma z (cos y) (+ x (sin y))))
double code(double x, double y, double z) {
return fma(z, cos(y), (x + sin(y)));
}
function code(x, y, z) return fma(z, cos(y), Float64(x + sin(y))) end
code[x_, y_, z_] := N[(z * N[Cos[y], $MachinePrecision] + N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, \cos y, x + \sin y\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
(FPCore (x y z) :precision binary64 (+ (* z (cos y)) (+ x (sin y))))
double code(double x, double y, double z) {
return (z * cos(y)) + (x + sin(y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (z * cos(y)) + (x + sin(y))
end function
public static double code(double x, double y, double z) {
return (z * Math.cos(y)) + (x + Math.sin(y));
}
def code(x, y, z): return (z * math.cos(y)) + (x + math.sin(y))
function code(x, y, z) return Float64(Float64(z * cos(y)) + Float64(x + sin(y))) end
function tmp = code(x, y, z) tmp = (z * cos(y)) + (x + sin(y)); end
code[x_, y_, z_] := N[(N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision] + N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \cos y + \left(x + \sin y\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (cos y))))
(if (<= z -2.8e+136)
t_0
(if (<= z -3.1e-6)
(+ z x)
(if (<= z 9e-54) (+ x (sin y)) (if (<= z 9.2e+79) (+ z x) t_0))))))
double code(double x, double y, double z) {
double t_0 = z * cos(y);
double tmp;
if (z <= -2.8e+136) {
tmp = t_0;
} else if (z <= -3.1e-6) {
tmp = z + x;
} else if (z <= 9e-54) {
tmp = x + sin(y);
} else if (z <= 9.2e+79) {
tmp = z + x;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * cos(y)
if (z <= (-2.8d+136)) then
tmp = t_0
else if (z <= (-3.1d-6)) then
tmp = z + x
else if (z <= 9d-54) then
tmp = x + sin(y)
else if (z <= 9.2d+79) then
tmp = z + x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * Math.cos(y);
double tmp;
if (z <= -2.8e+136) {
tmp = t_0;
} else if (z <= -3.1e-6) {
tmp = z + x;
} else if (z <= 9e-54) {
tmp = x + Math.sin(y);
} else if (z <= 9.2e+79) {
tmp = z + x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.cos(y) tmp = 0 if z <= -2.8e+136: tmp = t_0 elif z <= -3.1e-6: tmp = z + x elif z <= 9e-54: tmp = x + math.sin(y) elif z <= 9.2e+79: tmp = z + x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * cos(y)) tmp = 0.0 if (z <= -2.8e+136) tmp = t_0; elseif (z <= -3.1e-6) tmp = Float64(z + x); elseif (z <= 9e-54) tmp = Float64(x + sin(y)); elseif (z <= 9.2e+79) tmp = Float64(z + x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * cos(y); tmp = 0.0; if (z <= -2.8e+136) tmp = t_0; elseif (z <= -3.1e-6) tmp = z + x; elseif (z <= 9e-54) tmp = x + sin(y); elseif (z <= 9.2e+79) tmp = z + x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+136], t$95$0, If[LessEqual[z, -3.1e-6], N[(z + x), $MachinePrecision], If[LessEqual[z, 9e-54], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+79], N[(z + x), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-6}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-54}:\\
\;\;\;\;x + \sin y\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+79}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.8000000000000002e136 or 9.2000000000000002e79 < z Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 86.0%
if -2.8000000000000002e136 < z < -3.1e-6 or 8.9999999999999997e-54 < z < 9.2000000000000002e79Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around 0 84.2%
if -3.1e-6 < z < 8.9999999999999997e-54Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 94.3%
+-commutative94.3%
Simplified94.3%
Final simplification89.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (cos y))))
(if (<= z -3e+136)
t_0
(if (<= z -4.8e-255)
(+ z x)
(if (<= z 5.8e-202) (sin y) (if (<= z 9.2e+79) (+ z x) t_0))))))
double code(double x, double y, double z) {
double t_0 = z * cos(y);
double tmp;
if (z <= -3e+136) {
tmp = t_0;
} else if (z <= -4.8e-255) {
tmp = z + x;
} else if (z <= 5.8e-202) {
tmp = sin(y);
} else if (z <= 9.2e+79) {
tmp = z + x;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * cos(y)
if (z <= (-3d+136)) then
tmp = t_0
else if (z <= (-4.8d-255)) then
tmp = z + x
else if (z <= 5.8d-202) then
tmp = sin(y)
else if (z <= 9.2d+79) then
tmp = z + x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * Math.cos(y);
double tmp;
if (z <= -3e+136) {
tmp = t_0;
} else if (z <= -4.8e-255) {
tmp = z + x;
} else if (z <= 5.8e-202) {
tmp = Math.sin(y);
} else if (z <= 9.2e+79) {
tmp = z + x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.cos(y) tmp = 0 if z <= -3e+136: tmp = t_0 elif z <= -4.8e-255: tmp = z + x elif z <= 5.8e-202: tmp = math.sin(y) elif z <= 9.2e+79: tmp = z + x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * cos(y)) tmp = 0.0 if (z <= -3e+136) tmp = t_0; elseif (z <= -4.8e-255) tmp = Float64(z + x); elseif (z <= 5.8e-202) tmp = sin(y); elseif (z <= 9.2e+79) tmp = Float64(z + x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * cos(y); tmp = 0.0; if (z <= -3e+136) tmp = t_0; elseif (z <= -4.8e-255) tmp = z + x; elseif (z <= 5.8e-202) tmp = sin(y); elseif (z <= 9.2e+79) tmp = z + x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+136], t$95$0, If[LessEqual[z, -4.8e-255], N[(z + x), $MachinePrecision], If[LessEqual[z, 5.8e-202], N[Sin[y], $MachinePrecision], If[LessEqual[z, 9.2e+79], N[(z + x), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;z \leq -3 \cdot 10^{+136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-255}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-202}:\\
\;\;\;\;\sin y\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+79}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.99999999999999979e136 or 9.2000000000000002e79 < z Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 86.0%
if -2.99999999999999979e136 < z < -4.7999999999999997e-255 or 5.79999999999999976e-202 < z < 9.2000000000000002e79Initial program 99.9%
+-commutative99.9%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 71.3%
if -4.7999999999999997e-255 < z < 5.79999999999999976e-202Initial program 99.9%
Taylor expanded in x around 0 66.2%
Taylor expanded in z around 0 66.2%
Final simplification75.2%
(FPCore (x y z) :precision binary64 (if (<= y -3e+74) (sin y) (if (<= y 550000.0) (+ z (+ y x)) (if (<= y 4.9e+125) (sin y) (+ z x)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -3e+74) {
tmp = sin(y);
} else if (y <= 550000.0) {
tmp = z + (y + x);
} else if (y <= 4.9e+125) {
tmp = sin(y);
} else {
tmp = z + x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-3d+74)) then
tmp = sin(y)
else if (y <= 550000.0d0) then
tmp = z + (y + x)
else if (y <= 4.9d+125) then
tmp = sin(y)
else
tmp = z + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -3e+74) {
tmp = Math.sin(y);
} else if (y <= 550000.0) {
tmp = z + (y + x);
} else if (y <= 4.9e+125) {
tmp = Math.sin(y);
} else {
tmp = z + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -3e+74: tmp = math.sin(y) elif y <= 550000.0: tmp = z + (y + x) elif y <= 4.9e+125: tmp = math.sin(y) else: tmp = z + x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -3e+74) tmp = sin(y); elseif (y <= 550000.0) tmp = Float64(z + Float64(y + x)); elseif (y <= 4.9e+125) tmp = sin(y); else tmp = Float64(z + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -3e+74) tmp = sin(y); elseif (y <= 550000.0) tmp = z + (y + x); elseif (y <= 4.9e+125) tmp = sin(y); else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -3e+74], N[Sin[y], $MachinePrecision], If[LessEqual[y, 550000.0], N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e+125], N[Sin[y], $MachinePrecision], N[(z + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+74}:\\
\;\;\;\;\sin y\\
\mathbf{elif}\;y \leq 550000:\\
\;\;\;\;z + \left(y + x\right)\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+125}:\\
\;\;\;\;\sin y\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if y < -3e74 or 5.5e5 < y < 4.90000000000000016e125Initial program 99.8%
Taylor expanded in x around 0 75.1%
Taylor expanded in z around 0 40.9%
if -3e74 < y < 5.5e5Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 94.5%
associate-+r+94.5%
+-commutative94.5%
Simplified94.5%
if 4.90000000000000016e125 < y Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around 0 47.0%
Final simplification70.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -3.6e+17) (not (<= z 1.25e-5))) (+ x (* z (cos y))) (+ z (+ x (sin y)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.6e+17) || !(z <= 1.25e-5)) {
tmp = x + (z * cos(y));
} else {
tmp = z + (x + sin(y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-3.6d+17)) .or. (.not. (z <= 1.25d-5))) then
tmp = x + (z * cos(y))
else
tmp = z + (x + sin(y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3.6e+17) || !(z <= 1.25e-5)) {
tmp = x + (z * Math.cos(y));
} else {
tmp = z + (x + Math.sin(y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.6e+17) or not (z <= 1.25e-5): tmp = x + (z * math.cos(y)) else: tmp = z + (x + math.sin(y)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.6e+17) || !(z <= 1.25e-5)) tmp = Float64(x + Float64(z * cos(y))); else tmp = Float64(z + Float64(x + sin(y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.6e+17) || ~((z <= 1.25e-5))) tmp = x + (z * cos(y)); else tmp = z + (x + sin(y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.6e+17], N[Not[LessEqual[z, 1.25e-5]], $MachinePrecision]], N[(x + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+17} \lor \neg \left(z \leq 1.25 \cdot 10^{-5}\right):\\
\;\;\;\;x + z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + \sin y\right)\\
\end{array}
\end{array}
if z < -3.6e17 or 1.25000000000000006e-5 < z Initial program 99.9%
Taylor expanded in x around inf 99.5%
if -3.6e17 < z < 1.25000000000000006e-5Initial program 99.9%
Taylor expanded in y around 0 99.3%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.8e-5) (not (<= z 2.3e-55))) (+ x (* z (cos y))) (+ x (sin y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.8e-5) || !(z <= 2.3e-55)) {
tmp = x + (z * cos(y));
} else {
tmp = x + sin(y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2.8d-5)) .or. (.not. (z <= 2.3d-55))) then
tmp = x + (z * cos(y))
else
tmp = x + sin(y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.8e-5) || !(z <= 2.3e-55)) {
tmp = x + (z * Math.cos(y));
} else {
tmp = x + Math.sin(y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.8e-5) or not (z <= 2.3e-55): tmp = x + (z * math.cos(y)) else: tmp = x + math.sin(y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.8e-5) || !(z <= 2.3e-55)) tmp = Float64(x + Float64(z * cos(y))); else tmp = Float64(x + sin(y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.8e-5) || ~((z <= 2.3e-55))) tmp = x + (z * cos(y)); else tmp = x + sin(y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.8e-5], N[Not[LessEqual[z, 2.3e-55]], $MachinePrecision]], N[(x + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-5} \lor \neg \left(z \leq 2.3 \cdot 10^{-55}\right):\\
\;\;\;\;x + z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + \sin y\\
\end{array}
\end{array}
if z < -2.79999999999999996e-5 or 2.30000000000000011e-55 < z Initial program 99.9%
Taylor expanded in x around inf 98.5%
if -2.79999999999999996e-5 < z < 2.30000000000000011e-55Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 94.3%
+-commutative94.3%
Simplified94.3%
Final simplification96.5%
(FPCore (x y z) :precision binary64 (if (<= x -4.3e+18) x (if (<= x 1.2e-38) z x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.3e+18) {
tmp = x;
} else if (x <= 1.2e-38) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-4.3d+18)) then
tmp = x
else if (x <= 1.2d-38) then
tmp = z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -4.3e+18) {
tmp = x;
} else if (x <= 1.2e-38) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.3e+18: tmp = x elif x <= 1.2e-38: tmp = z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.3e+18) tmp = x; elseif (x <= 1.2e-38) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4.3e+18) tmp = x; elseif (x <= 1.2e-38) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.3e+18], x, If[LessEqual[x, 1.2e-38], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-38}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.3e18 or 1.20000000000000011e-38 < x Initial program 99.9%
expm1-log1p-u99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 71.1%
if -4.3e18 < x < 1.20000000000000011e-38Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 51.6%
Taylor expanded in y around 0 36.2%
(FPCore (x y z) :precision binary64 (+ z x))
double code(double x, double y, double z) {
return z + x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z + x
end function
public static double code(double x, double y, double z) {
return z + x;
}
def code(x, y, z): return z + x
function code(x, y, z) return Float64(z + x) end
function tmp = code(x, y, z) tmp = z + x; end
code[x_, y_, z_] := N[(z + x), $MachinePrecision]
\begin{array}{l}
\\
z + x
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around 0 64.0%
Final simplification64.0%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
expm1-log1p-u99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 41.5%
herbie shell --seed 2024129
(FPCore (x y z)
:name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, C"
:precision binary64
(+ (+ x (sin y)) (* z (cos y))))