
(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 12 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 (if (or (<= z -2.4e-8) (not (<= z 4.1e-53))) (+ x (* z (cos y))) (+ x (sin y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.4e-8) || !(z <= 4.1e-53)) {
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.4d-8)) .or. (.not. (z <= 4.1d-53))) 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.4e-8) || !(z <= 4.1e-53)) {
tmp = x + (z * Math.cos(y));
} else {
tmp = x + Math.sin(y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.4e-8) or not (z <= 4.1e-53): 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.4e-8) || !(z <= 4.1e-53)) 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.4e-8) || ~((z <= 4.1e-53))) tmp = x + (z * cos(y)); else tmp = x + sin(y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.4e-8], N[Not[LessEqual[z, 4.1e-53]], $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.4 \cdot 10^{-8} \lor \neg \left(z \leq 4.1 \cdot 10^{-53}\right):\\
\;\;\;\;x + z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + \sin y\\
\end{array}
\end{array}
if z < -2.39999999999999998e-8 or 4.1000000000000001e-53 < z Initial program 99.9%
Taylor expanded in x around inf 99.9%
Taylor expanded in x around inf 99.0%
if -2.39999999999999998e-8 < z < 4.1000000000000001e-53Initial program 100.0%
Taylor expanded in z around 0 94.2%
+-commutative94.2%
Simplified94.2%
Final simplification96.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -115000000.0) (not (<= z 3e+42))) (* z (cos y)) (+ x (sin y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -115000000.0) || !(z <= 3e+42)) {
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 <= (-115000000.0d0)) .or. (.not. (z <= 3d+42))) 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 <= -115000000.0) || !(z <= 3e+42)) {
tmp = z * Math.cos(y);
} else {
tmp = x + Math.sin(y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -115000000.0) or not (z <= 3e+42): tmp = z * math.cos(y) else: tmp = x + math.sin(y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -115000000.0) || !(z <= 3e+42)) 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 <= -115000000.0) || ~((z <= 3e+42))) tmp = z * cos(y); else tmp = x + sin(y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -115000000.0], N[Not[LessEqual[z, 3e+42]], $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 -115000000 \lor \neg \left(z \leq 3 \cdot 10^{+42}\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + \sin y\\
\end{array}
\end{array}
if z < -1.15e8 or 3.00000000000000029e42 < z Initial program 99.8%
Taylor expanded in z around inf 73.8%
if -1.15e8 < z < 3.00000000000000029e42Initial program 100.0%
Taylor expanded in z around 0 91.9%
+-commutative91.9%
Simplified91.9%
Final simplification82.7%
(FPCore (x y z) :precision binary64 (if (or (<= x -580000000000.0) (not (<= x 2.3e-98))) (+ z x) (* z (cos y))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -580000000000.0) || !(x <= 2.3e-98)) {
tmp = z + x;
} else {
tmp = z * cos(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 <= (-580000000000.0d0)) .or. (.not. (x <= 2.3d-98))) then
tmp = z + x
else
tmp = z * cos(y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -580000000000.0) || !(x <= 2.3e-98)) {
tmp = z + x;
} else {
tmp = z * Math.cos(y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -580000000000.0) or not (x <= 2.3e-98): tmp = z + x else: tmp = z * math.cos(y) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -580000000000.0) || !(x <= 2.3e-98)) tmp = Float64(z + x); else tmp = Float64(z * cos(y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -580000000000.0) || ~((x <= 2.3e-98))) tmp = z + x; else tmp = z * cos(y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -580000000000.0], N[Not[LessEqual[x, 2.3e-98]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -580000000000 \lor \neg \left(x \leq 2.3 \cdot 10^{-98}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \cos y\\
\end{array}
\end{array}
if x < -5.8e11 or 2.30000000000000001e-98 < x Initial program 100.0%
Taylor expanded in y around 0 83.2%
+-commutative83.2%
Simplified83.2%
if -5.8e11 < x < 2.30000000000000001e-98Initial program 99.8%
Taylor expanded in z around inf 64.7%
Final simplification75.7%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.4e+21) (not (<= y 1.4e+28))) (+ z x) (+ (+ z x) (* y (+ 1.0 (* z (* y -0.5)))))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.4e+21) || !(y <= 1.4e+28)) {
tmp = z + x;
} else {
tmp = (z + x) + (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 <= (-3.4d+21)) .or. (.not. (y <= 1.4d+28))) then
tmp = z + x
else
tmp = (z + x) + (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 <= -3.4e+21) || !(y <= 1.4e+28)) {
tmp = z + x;
} else {
tmp = (z + x) + (y * (1.0 + (z * (y * -0.5))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.4e+21) or not (y <= 1.4e+28): tmp = z + x else: tmp = (z + x) + (y * (1.0 + (z * (y * -0.5)))) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.4e+21) || !(y <= 1.4e+28)) tmp = Float64(z + x); else tmp = Float64(Float64(z + x) + 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 <= -3.4e+21) || ~((y <= 1.4e+28))) tmp = z + x; else tmp = (z + x) + (y * (1.0 + (z * (y * -0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.4e+21], N[Not[LessEqual[y, 1.4e+28]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(N[(z + x), $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 -3.4 \cdot 10^{+21} \lor \neg \left(y \leq 1.4 \cdot 10^{+28}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;\left(z + x\right) + y \cdot \left(1 + z \cdot \left(y \cdot -0.5\right)\right)\\
\end{array}
\end{array}
if y < -3.4e21 or 1.4000000000000001e28 < y Initial program 99.8%
Taylor expanded in y around 0 45.0%
+-commutative45.0%
Simplified45.0%
if -3.4e21 < y < 1.4000000000000001e28Initial program 100.0%
Taylor expanded in y around 0 95.9%
associate-+r+95.9%
+-commutative95.9%
associate-*r*95.9%
Simplified95.9%
Final simplification71.8%
(FPCore (x y z) :precision binary64 (if (or (<= y -5.2e+31) (not (<= y 2.45e-10))) (+ z x) (+ x (+ z (* y (+ 1.0 (* y (* y -0.16666666666666666))))))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -5.2e+31) || !(y <= 2.45e-10)) {
tmp = z + x;
} else {
tmp = x + (z + (y * (1.0 + (y * (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 <= (-5.2d+31)) .or. (.not. (y <= 2.45d-10))) then
tmp = z + x
else
tmp = x + (z + (y * (1.0d0 + (y * (y * (-0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -5.2e+31) || !(y <= 2.45e-10)) {
tmp = z + x;
} else {
tmp = x + (z + (y * (1.0 + (y * (y * -0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -5.2e+31) or not (y <= 2.45e-10): tmp = z + x else: tmp = x + (z + (y * (1.0 + (y * (y * -0.16666666666666666))))) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -5.2e+31) || !(y <= 2.45e-10)) tmp = Float64(z + x); else tmp = Float64(x + Float64(z + Float64(y * Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -5.2e+31) || ~((y <= 2.45e-10))) tmp = z + x; else tmp = x + (z + (y * (1.0 + (y * (y * -0.16666666666666666))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -5.2e+31], N[Not[LessEqual[y, 2.45e-10]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(x + N[(z + N[(y * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+31} \lor \neg \left(y \leq 2.45 \cdot 10^{-10}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;x + \left(z + y \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if y < -5.2e31 or 2.4499999999999998e-10 < y Initial program 99.8%
Taylor expanded in y around 0 44.2%
+-commutative44.2%
Simplified44.2%
if -5.2e31 < y < 2.4499999999999998e-10Initial program 100.0%
Taylor expanded in y around 0 97.1%
Taylor expanded in z around 0 97.3%
*-commutative97.3%
Simplified97.3%
Final simplification71.5%
(FPCore (x y z) :precision binary64 (if (or (<= y -6.2e+32) (not (<= y 1.46e+28))) (+ z x) (+ z (+ y x))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6.2e+32) || !(y <= 1.46e+28)) {
tmp = z + x;
} else {
tmp = z + (y + 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 <= (-6.2d+32)) .or. (.not. (y <= 1.46d+28))) then
tmp = z + x
else
tmp = z + (y + x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -6.2e+32) || !(y <= 1.46e+28)) {
tmp = z + x;
} else {
tmp = z + (y + x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6.2e+32) or not (y <= 1.46e+28): tmp = z + x else: tmp = z + (y + x) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6.2e+32) || !(y <= 1.46e+28)) tmp = Float64(z + x); else tmp = Float64(z + Float64(y + x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6.2e+32) || ~((y <= 1.46e+28))) tmp = z + x; else tmp = z + (y + x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.2e+32], N[Not[LessEqual[y, 1.46e+28]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+32} \lor \neg \left(y \leq 1.46 \cdot 10^{+28}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;z + \left(y + x\right)\\
\end{array}
\end{array}
if y < -6.19999999999999986e32 or 1.46e28 < y Initial program 99.8%
Taylor expanded in y around 0 43.9%
+-commutative43.9%
Simplified43.9%
if -6.19999999999999986e32 < y < 1.46e28Initial program 100.0%
Taylor expanded in y around 0 94.4%
+-commutative94.4%
+-commutative94.4%
associate-+l+94.4%
Simplified94.4%
Final simplification71.5%
(FPCore (x y z) :precision binary64 (if (<= x -490000000000.0) x (if (<= x 8.8e-5) (+ z y) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -490000000000.0) {
tmp = x;
} else if (x <= 8.8e-5) {
tmp = z + y;
} 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 <= (-490000000000.0d0)) then
tmp = x
else if (x <= 8.8d-5) then
tmp = z + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -490000000000.0) {
tmp = x;
} else if (x <= 8.8e-5) {
tmp = z + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -490000000000.0: tmp = x elif x <= 8.8e-5: tmp = z + y else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -490000000000.0) tmp = x; elseif (x <= 8.8e-5) tmp = Float64(z + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -490000000000.0) tmp = x; elseif (x <= 8.8e-5) tmp = z + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -490000000000.0], x, If[LessEqual[x, 8.8e-5], N[(z + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -490000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-5}:\\
\;\;\;\;z + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.9e11 or 8.7999999999999998e-5 < x Initial program 100.0%
Taylor expanded in x around inf 75.0%
if -4.9e11 < x < 8.7999999999999998e-5Initial program 99.9%
Taylor expanded in x around 0 91.6%
Taylor expanded in y around 0 45.1%
Final simplification61.1%
(FPCore (x y z) :precision binary64 (if (<= x -470000000000.0) x (if (<= x 4.9e-5) z x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -470000000000.0) {
tmp = x;
} else if (x <= 4.9e-5) {
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 <= (-470000000000.0d0)) then
tmp = x
else if (x <= 4.9d-5) 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 <= -470000000000.0) {
tmp = x;
} else if (x <= 4.9e-5) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -470000000000.0: tmp = x elif x <= 4.9e-5: tmp = z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -470000000000.0) tmp = x; elseif (x <= 4.9e-5) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -470000000000.0) tmp = x; elseif (x <= 4.9e-5) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -470000000000.0], x, If[LessEqual[x, 4.9e-5], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -470000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{-5}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.7e11 or 4.9e-5 < x Initial program 100.0%
Taylor expanded in x around inf 75.0%
if -4.7e11 < x < 4.9e-5Initial program 99.9%
Taylor expanded in x around 0 91.6%
Taylor expanded in y around 0 45.1%
Taylor expanded in y around 0 40.5%
(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%
Taylor expanded in y around 0 68.0%
+-commutative68.0%
Simplified68.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 44.3%
herbie shell --seed 2024137
(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))))