
(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 (+ (+ 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}
Initial program 99.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.3) (not (<= z 210.0))) (* z (+ (cos y) (/ x z))) (+ (+ x (sin y)) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.3) || !(z <= 210.0)) {
tmp = z * (cos(y) + (x / z));
} else {
tmp = (x + sin(y)) + z;
}
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 <= (-1.3d0)) .or. (.not. (z <= 210.0d0))) then
tmp = z * (cos(y) + (x / z))
else
tmp = (x + sin(y)) + z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.3) || !(z <= 210.0)) {
tmp = z * (Math.cos(y) + (x / z));
} else {
tmp = (x + Math.sin(y)) + z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.3) or not (z <= 210.0): tmp = z * (math.cos(y) + (x / z)) else: tmp = (x + math.sin(y)) + z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.3) || !(z <= 210.0)) tmp = Float64(z * Float64(cos(y) + Float64(x / z))); else tmp = Float64(Float64(x + sin(y)) + z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.3) || ~((z <= 210.0))) tmp = z * (cos(y) + (x / z)); else tmp = (x + sin(y)) + z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.3], N[Not[LessEqual[z, 210.0]], $MachinePrecision]], N[(z * N[(N[Cos[y], $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \lor \neg \left(z \leq 210\right):\\
\;\;\;\;z \cdot \left(\cos y + \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \sin y\right) + z\\
\end{array}
\end{array}
if z < -1.30000000000000004 or 210 < z Initial program 99.8%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
distribute-rgt-neg-in99.7%
distribute-lft-out99.7%
mul-1-neg99.7%
remove-double-neg99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 99.0%
if -1.30000000000000004 < z < 210Initial program 100.0%
Taylor expanded in y around 0 99.0%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.46e+26) (not (<= z 63000000.0))) (* z (cos y)) (+ (+ x (sin y)) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.46e+26) || !(z <= 63000000.0)) {
tmp = z * cos(y);
} else {
tmp = (x + sin(y)) + z;
}
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 <= (-1.46d+26)) .or. (.not. (z <= 63000000.0d0))) then
tmp = z * cos(y)
else
tmp = (x + sin(y)) + z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.46e+26) || !(z <= 63000000.0)) {
tmp = z * Math.cos(y);
} else {
tmp = (x + Math.sin(y)) + z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.46e+26) or not (z <= 63000000.0): tmp = z * math.cos(y) else: tmp = (x + math.sin(y)) + z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.46e+26) || !(z <= 63000000.0)) tmp = Float64(z * cos(y)); else tmp = Float64(Float64(x + sin(y)) + z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.46e+26) || ~((z <= 63000000.0))) tmp = z * cos(y); else tmp = (x + sin(y)) + z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.46e+26], N[Not[LessEqual[z, 63000000.0]], $MachinePrecision]], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision], N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.46 \cdot 10^{+26} \lor \neg \left(z \leq 63000000\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;\left(x + \sin y\right) + z\\
\end{array}
\end{array}
if z < -1.45999999999999992e26 or 6.3e7 < z Initial program 99.8%
Taylor expanded in z around inf 81.3%
if -1.45999999999999992e26 < z < 6.3e7Initial program 100.0%
Taylor expanded in y around 0 98.3%
Final simplification90.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -3.4e+25) (not (<= z 48000000.0))) (* z (cos y)) (+ x (sin y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.4e+25) || !(z <= 48000000.0)) {
tmp = 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 <= (-3.4d+25)) .or. (.not. (z <= 48000000.0d0))) then
tmp = 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 <= -3.4e+25) || !(z <= 48000000.0)) {
tmp = z * Math.cos(y);
} else {
tmp = x + Math.sin(y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.4e+25) or not (z <= 48000000.0): tmp = z * math.cos(y) else: tmp = x + math.sin(y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.4e+25) || !(z <= 48000000.0)) tmp = 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 <= -3.4e+25) || ~((z <= 48000000.0))) tmp = z * cos(y); else tmp = x + sin(y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.4e+25], N[Not[LessEqual[z, 48000000.0]], $MachinePrecision]], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+25} \lor \neg \left(z \leq 48000000\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + \sin y\\
\end{array}
\end{array}
if z < -3.39999999999999984e25 or 4.8e7 < z Initial program 99.8%
Taylor expanded in z around inf 81.3%
if -3.39999999999999984e25 < z < 4.8e7Initial program 100.0%
Taylor expanded in z around 0 90.2%
+-commutative90.2%
Simplified90.2%
Final simplification86.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.8e+26) (not (<= z 63000000.0))) (* z (cos y)) (+ x z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.8e+26) || !(z <= 63000000.0)) {
tmp = z * cos(y);
} else {
tmp = x + z;
}
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 <= (-1.8d+26)) .or. (.not. (z <= 63000000.0d0))) then
tmp = z * cos(y)
else
tmp = x + z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.8e+26) || !(z <= 63000000.0)) {
tmp = z * Math.cos(y);
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.8e+26) or not (z <= 63000000.0): tmp = z * math.cos(y) else: tmp = x + z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.8e+26) || !(z <= 63000000.0)) tmp = Float64(z * cos(y)); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.8e+26) || ~((z <= 63000000.0))) tmp = z * cos(y); else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.8e+26], N[Not[LessEqual[z, 63000000.0]], $MachinePrecision]], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+26} \lor \neg \left(z \leq 63000000\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
if z < -1.80000000000000012e26 or 6.3e7 < z Initial program 99.8%
Taylor expanded in z around inf 81.3%
if -1.80000000000000012e26 < z < 6.3e7Initial program 100.0%
Taylor expanded in y around 0 67.1%
+-commutative67.1%
Simplified67.1%
Final simplification73.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.7e+15) (not (<= y 42.0))) (+ x z) (+ x (+ z (* y (+ 1.0 (* y (+ (* z -0.5) (* y -0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.7e+15) || !(y <= 42.0)) {
tmp = x + z;
} else {
tmp = x + (z + (y * (1.0 + (y * ((z * -0.5) + (y * -0.16666666666666666))))));
}
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 <= (-3.7d+15)) .or. (.not. (y <= 42.0d0))) then
tmp = x + z
else
tmp = x + (z + (y * (1.0d0 + (y * ((z * (-0.5d0)) + (y * (-0.16666666666666666d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -3.7e+15) || !(y <= 42.0)) {
tmp = x + z;
} else {
tmp = x + (z + (y * (1.0 + (y * ((z * -0.5) + (y * -0.16666666666666666))))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.7e+15) or not (y <= 42.0): tmp = x + z else: tmp = x + (z + (y * (1.0 + (y * ((z * -0.5) + (y * -0.16666666666666666)))))) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.7e+15) || !(y <= 42.0)) tmp = Float64(x + z); else tmp = Float64(x + Float64(z + Float64(y * Float64(1.0 + Float64(y * Float64(Float64(z * -0.5) + Float64(y * -0.16666666666666666))))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -3.7e+15) || ~((y <= 42.0))) tmp = x + z; else tmp = x + (z + (y * (1.0 + (y * ((z * -0.5) + (y * -0.16666666666666666)))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.7e+15], N[Not[LessEqual[y, 42.0]], $MachinePrecision]], N[(x + z), $MachinePrecision], N[(x + N[(z + N[(y * N[(1.0 + N[(y * N[(N[(z * -0.5), $MachinePrecision] + N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+15} \lor \neg \left(y \leq 42\right):\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;x + \left(z + y \cdot \left(1 + y \cdot \left(z \cdot -0.5 + y \cdot -0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if y < -3.7e15 or 42 < y Initial program 99.8%
Taylor expanded in y around 0 35.3%
+-commutative35.3%
Simplified35.3%
if -3.7e15 < y < 42Initial program 100.0%
Taylor expanded in y around 0 98.6%
Final simplification64.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -4.6e+15) (not (<= y 42.0))) (+ x z) (+ (+ x z) (* y (+ 1.0 (* z (* y -0.5)))))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.6e+15) || !(y <= 42.0)) {
tmp = x + z;
} else {
tmp = (x + z) + (y * (1.0 + (z * (y * -0.5))));
}
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 <= (-4.6d+15)) .or. (.not. (y <= 42.0d0))) then
tmp = x + z
else
tmp = (x + z) + (y * (1.0d0 + (z * (y * (-0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -4.6e+15) || !(y <= 42.0)) {
tmp = x + z;
} else {
tmp = (x + z) + (y * (1.0 + (z * (y * -0.5))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -4.6e+15) or not (y <= 42.0): tmp = x + z else: tmp = (x + z) + (y * (1.0 + (z * (y * -0.5)))) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -4.6e+15) || !(y <= 42.0)) tmp = Float64(x + z); else tmp = Float64(Float64(x + z) + Float64(y * Float64(1.0 + Float64(z * Float64(y * -0.5))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -4.6e+15) || ~((y <= 42.0))) tmp = x + z; else tmp = (x + z) + (y * (1.0 + (z * (y * -0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.6e+15], N[Not[LessEqual[y, 42.0]], $MachinePrecision]], N[(x + z), $MachinePrecision], N[(N[(x + z), $MachinePrecision] + N[(y * N[(1.0 + N[(z * N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+15} \lor \neg \left(y \leq 42\right):\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;\left(x + z\right) + y \cdot \left(1 + z \cdot \left(y \cdot -0.5\right)\right)\\
\end{array}
\end{array}
if y < -4.6e15 or 42 < y Initial program 99.8%
Taylor expanded in y around 0 35.3%
+-commutative35.3%
Simplified35.3%
if -4.6e15 < y < 42Initial program 100.0%
Taylor expanded in y around 0 98.3%
associate-+r+98.3%
+-commutative98.3%
associate-*r*98.3%
Simplified98.3%
Final simplification64.1%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.6e+29) (not (<= y 3.1))) (+ x z) (+ z (+ x y))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.6e+29) || !(y <= 3.1)) {
tmp = x + z;
} else {
tmp = z + (x + 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 ((y <= (-1.6d+29)) .or. (.not. (y <= 3.1d0))) then
tmp = x + z
else
tmp = z + (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.6e+29) || !(y <= 3.1)) {
tmp = x + z;
} else {
tmp = z + (x + y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.6e+29) or not (y <= 3.1): tmp = x + z else: tmp = z + (x + y) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.6e+29) || !(y <= 3.1)) tmp = Float64(x + z); else tmp = Float64(z + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.6e+29) || ~((y <= 3.1))) tmp = x + z; else tmp = z + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.6e+29], N[Not[LessEqual[y, 3.1]], $MachinePrecision]], N[(x + z), $MachinePrecision], N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+29} \lor \neg \left(y \leq 3.1\right):\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\
\end{array}
\end{array}
if y < -1.59999999999999993e29 or 3.10000000000000009 < y Initial program 99.8%
Taylor expanded in y around 0 36.2%
+-commutative36.2%
Simplified36.2%
if -1.59999999999999993e29 < y < 3.10000000000000009Initial program 100.0%
Taylor expanded in y around 0 94.2%
+-commutative94.2%
+-commutative94.2%
associate-+l+94.2%
Simplified94.2%
Final simplification63.9%
(FPCore (x y z) :precision binary64 (if (<= x -1.75e-74) x (if (<= x 1.95e-62) z x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-74) {
tmp = x;
} else if (x <= 1.95e-62) {
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 <= (-1.75d-74)) then
tmp = x
else if (x <= 1.95d-62) 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 <= -1.75e-74) {
tmp = x;
} else if (x <= 1.95e-62) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.75e-74: tmp = x elif x <= 1.95e-62: tmp = z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.75e-74) tmp = x; elseif (x <= 1.95e-62) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.75e-74) tmp = x; elseif (x <= 1.95e-62) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.75e-74], x, If[LessEqual[x, 1.95e-62], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-74}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-62}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.75000000000000007e-74 or 1.9500000000000002e-62 < x Initial program 99.9%
Taylor expanded in x around inf 64.2%
if -1.75000000000000007e-74 < x < 1.9500000000000002e-62Initial program 99.8%
Taylor expanded in z around inf 62.7%
Taylor expanded in y around 0 36.3%
(FPCore (x y z) :precision binary64 (+ x z))
double code(double x, double y, double z) {
return x + z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + z
end function
public static double code(double x, double y, double z) {
return x + z;
}
def code(x, y, z): return x + z
function code(x, y, z) return Float64(x + z) end
function tmp = code(x, y, z) tmp = x + z; end
code[x_, y_, z_] := N[(x + z), $MachinePrecision]
\begin{array}{l}
\\
x + z
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 60.0%
+-commutative60.0%
Simplified60.0%
Final simplification60.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%
Taylor expanded in x around inf 39.6%
herbie shell --seed 2024091
(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))))