
(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 11 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 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (cos y))))
(if (<= x -1.8e-43)
(fma z (cos y) x)
(if (<= x 7.5e-31) (+ (sin y) t_0) (+ x t_0)))))
double code(double x, double y, double z) {
double t_0 = z * cos(y);
double tmp;
if (x <= -1.8e-43) {
tmp = fma(z, cos(y), x);
} else if (x <= 7.5e-31) {
tmp = sin(y) + t_0;
} else {
tmp = x + t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(z * cos(y)) tmp = 0.0 if (x <= -1.8e-43) tmp = fma(z, cos(y), x); elseif (x <= 7.5e-31) tmp = Float64(sin(y) + t_0); else tmp = Float64(x + t_0); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e-43], N[(z * N[Cos[y], $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 7.5e-31], N[(N[Sin[y], $MachinePrecision] + t$95$0), $MachinePrecision], N[(x + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{-43}:\\
\;\;\;\;\mathsf{fma}\left(z, \cos y, x\right)\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-31}:\\
\;\;\;\;\sin y + t\_0\\
\mathbf{else}:\\
\;\;\;\;x + t\_0\\
\end{array}
\end{array}
if x < -1.7999999999999999e-43Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around inf 99.5%
if -1.7999999999999999e-43 < x < 7.49999999999999975e-31Initial program 99.9%
Taylor expanded in x around 0 96.4%
if 7.49999999999999975e-31 < x Initial program 100.0%
Taylor expanded in x around inf 98.7%
(FPCore (x y z) :precision binary64 (if (<= z -2.45e-32) (fma z (cos y) x) (if (<= z 7.4e-34) (+ x (sin y)) (+ x (* z (cos y))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.45e-32) {
tmp = fma(z, cos(y), x);
} else if (z <= 7.4e-34) {
tmp = x + sin(y);
} else {
tmp = x + (z * cos(y));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -2.45e-32) tmp = fma(z, cos(y), x); elseif (z <= 7.4e-34) tmp = Float64(x + sin(y)); else tmp = Float64(x + Float64(z * cos(y))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -2.45e-32], N[(z * N[Cos[y], $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 7.4e-34], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(z, \cos y, x\right)\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-34}:\\
\;\;\;\;x + \sin y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \cos y\\
\end{array}
\end{array}
if z < -2.4499999999999999e-32Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around inf 97.4%
if -2.4499999999999999e-32 < z < 7.39999999999999976e-34Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around 0 94.3%
+-commutative94.3%
Simplified94.3%
if 7.39999999999999976e-34 < z Initial program 99.9%
Taylor expanded in x around inf 99.9%
Final simplification96.5%
(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 100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (cos y))))
(if (<= z -7.2e+220)
t_0
(if (<= z -1.2e-42)
(+ z x)
(if (<= z 9.2e-32) (+ x (sin y)) (if (<= z 3e+151) (+ z x) t_0))))))
double code(double x, double y, double z) {
double t_0 = z * cos(y);
double tmp;
if (z <= -7.2e+220) {
tmp = t_0;
} else if (z <= -1.2e-42) {
tmp = z + x;
} else if (z <= 9.2e-32) {
tmp = x + sin(y);
} else if (z <= 3e+151) {
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 <= (-7.2d+220)) then
tmp = t_0
else if (z <= (-1.2d-42)) then
tmp = z + x
else if (z <= 9.2d-32) then
tmp = x + sin(y)
else if (z <= 3d+151) 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 <= -7.2e+220) {
tmp = t_0;
} else if (z <= -1.2e-42) {
tmp = z + x;
} else if (z <= 9.2e-32) {
tmp = x + Math.sin(y);
} else if (z <= 3e+151) {
tmp = z + x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.cos(y) tmp = 0 if z <= -7.2e+220: tmp = t_0 elif z <= -1.2e-42: tmp = z + x elif z <= 9.2e-32: tmp = x + math.sin(y) elif z <= 3e+151: 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 <= -7.2e+220) tmp = t_0; elseif (z <= -1.2e-42) tmp = Float64(z + x); elseif (z <= 9.2e-32) tmp = Float64(x + sin(y)); elseif (z <= 3e+151) 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 <= -7.2e+220) tmp = t_0; elseif (z <= -1.2e-42) tmp = z + x; elseif (z <= 9.2e-32) tmp = x + sin(y); elseif (z <= 3e+151) 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, -7.2e+220], t$95$0, If[LessEqual[z, -1.2e-42], N[(z + x), $MachinePrecision], If[LessEqual[z, 9.2e-32], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+151], N[(z + x), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+220}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-42}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-32}:\\
\;\;\;\;x + \sin y\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+151}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -7.20000000000000038e220 or 2.9999999999999999e151 < z Initial program 99.8%
+-commutative99.8%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 91.7%
if -7.20000000000000038e220 < z < -1.20000000000000001e-42 or 9.2000000000000002e-32 < z < 2.9999999999999999e151Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 81.4%
if -1.20000000000000001e-42 < z < 9.2000000000000002e-32Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around 0 95.1%
+-commutative95.1%
Simplified95.1%
Final simplification89.5%
(FPCore (x y z) :precision binary64 (if (<= x -1.18e-54) (+ z x) (if (<= x 2e-52) (* z (cos y)) (if (<= x 2.5e-31) (sin y) (+ z x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.18e-54) {
tmp = z + x;
} else if (x <= 2e-52) {
tmp = z * cos(y);
} else if (x <= 2.5e-31) {
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 (x <= (-1.18d-54)) then
tmp = z + x
else if (x <= 2d-52) then
tmp = z * cos(y)
else if (x <= 2.5d-31) 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 (x <= -1.18e-54) {
tmp = z + x;
} else if (x <= 2e-52) {
tmp = z * Math.cos(y);
} else if (x <= 2.5e-31) {
tmp = Math.sin(y);
} else {
tmp = z + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.18e-54: tmp = z + x elif x <= 2e-52: tmp = z * math.cos(y) elif x <= 2.5e-31: tmp = math.sin(y) else: tmp = z + x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.18e-54) tmp = Float64(z + x); elseif (x <= 2e-52) tmp = Float64(z * cos(y)); elseif (x <= 2.5e-31) tmp = sin(y); else tmp = Float64(z + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.18e-54) tmp = z + x; elseif (x <= 2e-52) tmp = z * cos(y); elseif (x <= 2.5e-31) tmp = sin(y); else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.18e-54], N[(z + x), $MachinePrecision], If[LessEqual[x, 2e-52], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.5e-31], N[Sin[y], $MachinePrecision], N[(z + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.18 \cdot 10^{-54}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-52}:\\
\;\;\;\;z \cdot \cos y\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-31}:\\
\;\;\;\;\sin y\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if x < -1.17999999999999996e-54 or 2.5e-31 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 90.7%
if -1.17999999999999996e-54 < x < 2e-52Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 63.8%
if 2e-52 < x < 2.5e-31Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around 0 100.0%
Final simplification81.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.8e-32) (not (<= z 1.7e-32))) (+ x (* z (cos y))) (+ x (sin y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.8e-32) || !(z <= 1.7e-32)) {
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-32)) .or. (.not. (z <= 1.7d-32))) 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-32) || !(z <= 1.7e-32)) {
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-32) or not (z <= 1.7e-32): 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-32) || !(z <= 1.7e-32)) 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-32) || ~((z <= 1.7e-32))) 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-32], N[Not[LessEqual[z, 1.7e-32]], $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^{-32} \lor \neg \left(z \leq 1.7 \cdot 10^{-32}\right):\\
\;\;\;\;x + z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + \sin y\\
\end{array}
\end{array}
if z < -2.7999999999999999e-32 or 1.69999999999999989e-32 < z Initial program 99.9%
Taylor expanded in x around inf 98.5%
if -2.7999999999999999e-32 < z < 1.69999999999999989e-32Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around 0 94.3%
+-commutative94.3%
Simplified94.3%
Final simplification96.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -3.7e-277) (not (<= x 4.4e-31))) (+ z x) (sin y)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.7e-277) || !(x <= 4.4e-31)) {
tmp = z + x;
} else {
tmp = 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 ((x <= (-3.7d-277)) .or. (.not. (x <= 4.4d-31))) then
tmp = z + x
else
tmp = sin(y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -3.7e-277) || !(x <= 4.4e-31)) {
tmp = z + x;
} else {
tmp = Math.sin(y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3.7e-277) or not (x <= 4.4e-31): tmp = z + x else: tmp = math.sin(y) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3.7e-277) || !(x <= 4.4e-31)) tmp = Float64(z + x); else tmp = sin(y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3.7e-277) || ~((x <= 4.4e-31))) tmp = z + x; else tmp = sin(y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.7e-277], N[Not[LessEqual[x, 4.4e-31]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[Sin[y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-277} \lor \neg \left(x \leq 4.4 \cdot 10^{-31}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;\sin y\\
\end{array}
\end{array}
if x < -3.69999999999999985e-277 or 4.40000000000000019e-31 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 83.2%
if -3.69999999999999985e-277 < x < 4.40000000000000019e-31Initial program 99.9%
Taylor expanded in x around 0 98.4%
Taylor expanded in z around 0 51.4%
Final simplification75.1%
(FPCore (x y z) :precision binary64 (if (<= x -2e+17) x (if (<= x 5.2e+31) z x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2e+17) {
tmp = x;
} else if (x <= 5.2e+31) {
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 <= (-2d+17)) then
tmp = x
else if (x <= 5.2d+31) 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 <= -2e+17) {
tmp = x;
} else if (x <= 5.2e+31) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2e+17: tmp = x elif x <= 5.2e+31: tmp = z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2e+17) tmp = x; elseif (x <= 5.2e+31) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2e+17) tmp = x; elseif (x <= 5.2e+31) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2e+17], x, If[LessEqual[x, 5.2e+31], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+17}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+31}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2e17 or 5.2e31 < x Initial program 100.0%
log1p-expm1-u99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 83.6%
if -2e17 < x < 5.2e31Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 60.8%
Taylor expanded in y around 0 38.6%
(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 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 70.0%
Final simplification70.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 100.0%
log1p-expm1-u99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 48.4%
herbie shell --seed 2024144
(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))))