
(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-def99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (sin y) (* z (cos y)))))
(if (<= x -0.13)
(+ z x)
(if (<= x 1.75e-113)
t_0
(if (<= x 4.4e-35) (+ x (sin y)) (if (<= x 9.6e+38) t_0 (+ z x)))))))
double code(double x, double y, double z) {
double t_0 = sin(y) + (z * cos(y));
double tmp;
if (x <= -0.13) {
tmp = z + x;
} else if (x <= 1.75e-113) {
tmp = t_0;
} else if (x <= 4.4e-35) {
tmp = x + sin(y);
} else if (x <= 9.6e+38) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = sin(y) + (z * cos(y))
if (x <= (-0.13d0)) then
tmp = z + x
else if (x <= 1.75d-113) then
tmp = t_0
else if (x <= 4.4d-35) then
tmp = x + sin(y)
else if (x <= 9.6d+38) then
tmp = t_0
else
tmp = z + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.sin(y) + (z * Math.cos(y));
double tmp;
if (x <= -0.13) {
tmp = z + x;
} else if (x <= 1.75e-113) {
tmp = t_0;
} else if (x <= 4.4e-35) {
tmp = x + Math.sin(y);
} else if (x <= 9.6e+38) {
tmp = t_0;
} else {
tmp = z + x;
}
return tmp;
}
def code(x, y, z): t_0 = math.sin(y) + (z * math.cos(y)) tmp = 0 if x <= -0.13: tmp = z + x elif x <= 1.75e-113: tmp = t_0 elif x <= 4.4e-35: tmp = x + math.sin(y) elif x <= 9.6e+38: tmp = t_0 else: tmp = z + x return tmp
function code(x, y, z) t_0 = Float64(sin(y) + Float64(z * cos(y))) tmp = 0.0 if (x <= -0.13) tmp = Float64(z + x); elseif (x <= 1.75e-113) tmp = t_0; elseif (x <= 4.4e-35) tmp = Float64(x + sin(y)); elseif (x <= 9.6e+38) tmp = t_0; else tmp = Float64(z + x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = sin(y) + (z * cos(y)); tmp = 0.0; if (x <= -0.13) tmp = z + x; elseif (x <= 1.75e-113) tmp = t_0; elseif (x <= 4.4e-35) tmp = x + sin(y); elseif (x <= 9.6e+38) tmp = t_0; else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.13], N[(z + x), $MachinePrecision], If[LessEqual[x, 1.75e-113], t$95$0, If[LessEqual[x, 4.4e-35], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.6e+38], t$95$0, N[(z + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin y + z \cdot \cos y\\
\mathbf{if}\;x \leq -0.13:\\
\;\;\;\;z + x\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-113}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-35}:\\
\;\;\;\;x + \sin y\\
\mathbf{elif}\;x \leq 9.6 \cdot 10^{+38}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if x < -0.13 or 9.60000000000000069e38 < x Initial program 99.9%
Taylor expanded in y around 0 92.4%
+-commutative92.4%
Simplified92.4%
if -0.13 < x < 1.75000000000000014e-113 or 4.39999999999999987e-35 < x < 9.60000000000000069e38Initial program 99.8%
Taylor expanded in x around 0 91.2%
if 1.75000000000000014e-113 < x < 4.39999999999999987e-35Initial program 100.0%
Taylor expanded in z around 0 88.4%
+-commutative88.4%
Simplified88.4%
Final simplification91.6%
(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%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (cos y))))
(if (<= z -1.6e+91)
t_0
(if (<= z -1.1e-33) (+ z x) (if (<= z 2.65e-7) (+ x (sin y)) t_0)))))
double code(double x, double y, double z) {
double t_0 = z * cos(y);
double tmp;
if (z <= -1.6e+91) {
tmp = t_0;
} else if (z <= -1.1e-33) {
tmp = z + x;
} else if (z <= 2.65e-7) {
tmp = x + sin(y);
} 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 <= (-1.6d+91)) then
tmp = t_0
else if (z <= (-1.1d-33)) then
tmp = z + x
else if (z <= 2.65d-7) then
tmp = x + sin(y)
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 <= -1.6e+91) {
tmp = t_0;
} else if (z <= -1.1e-33) {
tmp = z + x;
} else if (z <= 2.65e-7) {
tmp = x + Math.sin(y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.cos(y) tmp = 0 if z <= -1.6e+91: tmp = t_0 elif z <= -1.1e-33: tmp = z + x elif z <= 2.65e-7: tmp = x + math.sin(y) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * cos(y)) tmp = 0.0 if (z <= -1.6e+91) tmp = t_0; elseif (z <= -1.1e-33) tmp = Float64(z + x); elseif (z <= 2.65e-7) tmp = Float64(x + sin(y)); 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 <= -1.6e+91) tmp = t_0; elseif (z <= -1.1e-33) tmp = z + x; elseif (z <= 2.65e-7) tmp = x + sin(y); 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, -1.6e+91], t$95$0, If[LessEqual[z, -1.1e-33], N[(z + x), $MachinePrecision], If[LessEqual[z, 2.65e-7], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-33}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-7}:\\
\;\;\;\;x + \sin y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -1.59999999999999995e91 or 2.65e-7 < z Initial program 99.8%
Taylor expanded in z around inf 79.7%
if -1.59999999999999995e91 < z < -1.10000000000000003e-33Initial program 99.9%
Taylor expanded in y around 0 75.4%
+-commutative75.4%
Simplified75.4%
if -1.10000000000000003e-33 < z < 2.65e-7Initial program 100.0%
Taylor expanded in z around 0 92.0%
+-commutative92.0%
Simplified92.0%
Final simplification85.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.8e+72) (not (<= y 7.5e+37))) (* z (cos y)) (+ z (+ y x))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.8e+72) || !(y <= 7.5e+37)) {
tmp = z * cos(y);
} 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 <= (-3.8d+72)) .or. (.not. (y <= 7.5d+37))) then
tmp = z * cos(y)
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 <= -3.8e+72) || !(y <= 7.5e+37)) {
tmp = z * Math.cos(y);
} else {
tmp = z + (y + x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.8e+72) or not (y <= 7.5e+37): tmp = z * math.cos(y) else: tmp = z + (y + x) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.8e+72) || !(y <= 7.5e+37)) tmp = Float64(z * cos(y)); else tmp = Float64(z + Float64(y + x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -3.8e+72) || ~((y <= 7.5e+37))) tmp = z * cos(y); else tmp = z + (y + x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.8e+72], N[Not[LessEqual[y, 7.5e+37]], $MachinePrecision]], N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision], N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+72} \lor \neg \left(y \leq 7.5 \cdot 10^{+37}\right):\\
\;\;\;\;z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;z + \left(y + x\right)\\
\end{array}
\end{array}
if y < -3.80000000000000006e72 or 7.5000000000000003e37 < y Initial program 99.8%
Taylor expanded in z around inf 44.0%
if -3.80000000000000006e72 < y < 7.5000000000000003e37Initial program 100.0%
Taylor expanded in y around 0 91.5%
+-commutative91.5%
+-commutative91.5%
associate-+l+91.5%
Simplified91.5%
Final simplification74.0%
(FPCore (x y z)
:precision binary64
(if (<= x -1.16e+97)
x
(if (or (<= x -2.25e+58) (and (not (<= x -5.9e-15)) (<= x 4e-90)))
(+ z y)
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.16e+97) {
tmp = x;
} else if ((x <= -2.25e+58) || (!(x <= -5.9e-15) && (x <= 4e-90))) {
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 <= (-1.16d+97)) then
tmp = x
else if ((x <= (-2.25d+58)) .or. (.not. (x <= (-5.9d-15))) .and. (x <= 4d-90)) 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 <= -1.16e+97) {
tmp = x;
} else if ((x <= -2.25e+58) || (!(x <= -5.9e-15) && (x <= 4e-90))) {
tmp = z + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.16e+97: tmp = x elif (x <= -2.25e+58) or (not (x <= -5.9e-15) and (x <= 4e-90)): tmp = z + y else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.16e+97) tmp = x; elseif ((x <= -2.25e+58) || (!(x <= -5.9e-15) && (x <= 4e-90))) tmp = Float64(z + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.16e+97) tmp = x; elseif ((x <= -2.25e+58) || (~((x <= -5.9e-15)) && (x <= 4e-90))) tmp = z + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.16e+97], x, If[Or[LessEqual[x, -2.25e+58], And[N[Not[LessEqual[x, -5.9e-15]], $MachinePrecision], LessEqual[x, 4e-90]]], N[(z + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.16 \cdot 10^{+97}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.25 \cdot 10^{+58} \lor \neg \left(x \leq -5.9 \cdot 10^{-15}\right) \land x \leq 4 \cdot 10^{-90}:\\
\;\;\;\;z + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.15999999999999991e97 or -2.2499999999999999e58 < x < -5.89999999999999963e-15 or 3.99999999999999998e-90 < x Initial program 99.9%
Taylor expanded in x around inf 68.8%
if -1.15999999999999991e97 < x < -2.2499999999999999e58 or -5.89999999999999963e-15 < x < 3.99999999999999998e-90Initial program 99.9%
Taylor expanded in x around 0 93.3%
Taylor expanded in y around 0 53.1%
Final simplification61.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.4e+132) (not (<= y 1.15e+19))) (+ z x) (+ z (+ y x))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.4e+132) || !(y <= 1.15e+19)) {
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 <= (-1.4d+132)) .or. (.not. (y <= 1.15d+19))) 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 <= -1.4e+132) || !(y <= 1.15e+19)) {
tmp = z + x;
} else {
tmp = z + (y + x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.4e+132) or not (y <= 1.15e+19): tmp = z + x else: tmp = z + (y + x) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.4e+132) || !(y <= 1.15e+19)) 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 <= -1.4e+132) || ~((y <= 1.15e+19))) tmp = z + x; else tmp = z + (y + x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.4e+132], N[Not[LessEqual[y, 1.15e+19]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+132} \lor \neg \left(y \leq 1.15 \cdot 10^{+19}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;z + \left(y + x\right)\\
\end{array}
\end{array}
if y < -1.4e132 or 1.15e19 < y Initial program 99.8%
Taylor expanded in y around 0 37.3%
+-commutative37.3%
Simplified37.3%
if -1.4e132 < y < 1.15e19Initial program 100.0%
Taylor expanded in y around 0 88.9%
+-commutative88.9%
+-commutative88.9%
associate-+l+88.9%
Simplified88.9%
Final simplification71.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -8e-89) (not (<= x 3e-127))) (+ z x) (+ z y)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -8e-89) || !(x <= 3e-127)) {
tmp = z + x;
} else {
tmp = z + 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 <= (-8d-89)) .or. (.not. (x <= 3d-127))) then
tmp = z + x
else
tmp = z + y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -8e-89) || !(x <= 3e-127)) {
tmp = z + x;
} else {
tmp = z + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -8e-89) or not (x <= 3e-127): tmp = z + x else: tmp = z + y return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -8e-89) || !(x <= 3e-127)) tmp = Float64(z + x); else tmp = Float64(z + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -8e-89) || ~((x <= 3e-127))) tmp = z + x; else tmp = z + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -8e-89], N[Not[LessEqual[x, 3e-127]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(z + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-89} \lor \neg \left(x \leq 3 \cdot 10^{-127}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;z + y\\
\end{array}
\end{array}
if x < -8.00000000000000031e-89 or 3.00000000000000009e-127 < x Initial program 99.9%
Taylor expanded in y around 0 75.3%
+-commutative75.3%
Simplified75.3%
if -8.00000000000000031e-89 < x < 3.00000000000000009e-127Initial program 99.9%
Taylor expanded in x around 0 98.4%
Taylor expanded in y around 0 55.3%
Final simplification68.5%
(FPCore (x y z) :precision binary64 (if (<= y -1.4e+132) x (if (<= y 2.4e+19) (+ y x) x)))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.4e+132) {
tmp = x;
} else if (y <= 2.4e+19) {
tmp = y + x;
} 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 (y <= (-1.4d+132)) then
tmp = x
else if (y <= 2.4d+19) then
tmp = y + x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.4e+132) {
tmp = x;
} else if (y <= 2.4e+19) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.4e+132: tmp = x elif y <= 2.4e+19: tmp = y + x else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.4e+132) tmp = x; elseif (y <= 2.4e+19) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.4e+132) tmp = x; elseif (y <= 2.4e+19) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.4e+132], x, If[LessEqual[y, 2.4e+19], N[(y + x), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+132}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+19}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.4e132 or 2.4e19 < y Initial program 99.8%
Taylor expanded in x around inf 33.6%
if -1.4e132 < y < 2.4e19Initial program 100.0%
Taylor expanded in z around 0 57.1%
+-commutative57.1%
Simplified57.1%
Taylor expanded in y around 0 51.0%
+-commutative51.0%
Simplified51.0%
Final simplification44.9%
(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%
Final simplification39.6%
herbie shell --seed 2023322
(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))))