
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z)))
double code(double x, double y, double z) {
return (x + y) * (1.0 - 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 + y) * (1.0d0 - z)
end function
public static double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
def code(x, y, z): return (x + y) * (1.0 - z)
function code(x, y, z) return Float64(Float64(x + y) * Float64(1.0 - z)) end
function tmp = code(x, y, z) tmp = (x + y) * (1.0 - z); end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) \cdot \left(1 - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z)))
double code(double x, double y, double z) {
return (x + y) * (1.0 - 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 + y) * (1.0d0 - z)
end function
public static double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
def code(x, y, z): return (x + y) * (1.0 - z)
function code(x, y, z) return Float64(Float64(x + y) * Float64(1.0 - z)) end
function tmp = code(x, y, z) tmp = (x + y) * (1.0 - z); end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) \cdot \left(1 - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (- (+ x y) (* (+ x y) z)))
double code(double x, double y, double z) {
return (x + y) - ((x + y) * 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 + y) - ((x + y) * z)
end function
public static double code(double x, double y, double z) {
return (x + y) - ((x + y) * z);
}
def code(x, y, z): return (x + y) - ((x + y) * z)
function code(x, y, z) return Float64(Float64(x + y) - Float64(Float64(x + y) * z)) end
function tmp = code(x, y, z) tmp = (x + y) - ((x + y) * z); end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] - N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \left(x + y\right) \cdot z
\end{array}
Initial program 100.0%
sub-neg100.0%
distribute-lft-in100.0%
*-commutative100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
Applied egg-rr100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (- 1.0 z))))
(if (<= (- 1.0 z) -5000000000000.0)
t_0
(if (<= (- 1.0 z) 1.00000002)
(+ x y)
(if (<= (- 1.0 z) 5e+131) t_0 (* x (- z)))))))
double code(double x, double y, double z) {
double t_0 = y * (1.0 - z);
double tmp;
if ((1.0 - z) <= -5000000000000.0) {
tmp = t_0;
} else if ((1.0 - z) <= 1.00000002) {
tmp = x + y;
} else if ((1.0 - z) <= 5e+131) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = y * (1.0d0 - z)
if ((1.0d0 - z) <= (-5000000000000.0d0)) then
tmp = t_0
else if ((1.0d0 - z) <= 1.00000002d0) then
tmp = x + y
else if ((1.0d0 - z) <= 5d+131) then
tmp = t_0
else
tmp = x * -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (1.0 - z);
double tmp;
if ((1.0 - z) <= -5000000000000.0) {
tmp = t_0;
} else if ((1.0 - z) <= 1.00000002) {
tmp = x + y;
} else if ((1.0 - z) <= 5e+131) {
tmp = t_0;
} else {
tmp = x * -z;
}
return tmp;
}
def code(x, y, z): t_0 = y * (1.0 - z) tmp = 0 if (1.0 - z) <= -5000000000000.0: tmp = t_0 elif (1.0 - z) <= 1.00000002: tmp = x + y elif (1.0 - z) <= 5e+131: tmp = t_0 else: tmp = x * -z return tmp
function code(x, y, z) t_0 = Float64(y * Float64(1.0 - z)) tmp = 0.0 if (Float64(1.0 - z) <= -5000000000000.0) tmp = t_0; elseif (Float64(1.0 - z) <= 1.00000002) tmp = Float64(x + y); elseif (Float64(1.0 - z) <= 5e+131) tmp = t_0; else tmp = Float64(x * Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (1.0 - z); tmp = 0.0; if ((1.0 - z) <= -5000000000000.0) tmp = t_0; elseif ((1.0 - z) <= 1.00000002) tmp = x + y; elseif ((1.0 - z) <= 5e+131) tmp = t_0; else tmp = x * -z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(1.0 - z), $MachinePrecision], -5000000000000.0], t$95$0, If[LessEqual[N[(1.0 - z), $MachinePrecision], 1.00000002], N[(x + y), $MachinePrecision], If[LessEqual[N[(1.0 - z), $MachinePrecision], 5e+131], t$95$0, N[(x * (-z)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;1 - z \leq -5000000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;1 - z \leq 1.00000002:\\
\;\;\;\;x + y\\
\mathbf{elif}\;1 - z \leq 5 \cdot 10^{+131}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-z\right)\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) z) < -5e12 or 1.0000000200000001 < (-.f64 #s(literal 1 binary64) z) < 4.99999999999999995e131Initial program 99.9%
Taylor expanded in x around 0 43.9%
if -5e12 < (-.f64 #s(literal 1 binary64) z) < 1.0000000200000001Initial program 100.0%
Taylor expanded in z around 0 97.5%
+-commutative97.5%
Simplified97.5%
if 4.99999999999999995e131 < (-.f64 #s(literal 1 binary64) z) Initial program 100.0%
Taylor expanded in x around inf 66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in z around inf 66.2%
neg-mul-166.2%
Simplified66.2%
Final simplification71.8%
(FPCore (x y z) :precision binary64 (if (<= z -6e+137) (* x (- z)) (if (or (<= z -35.0) (not (<= z 1.0))) (* y (- z)) (+ x y))))
double code(double x, double y, double z) {
double tmp;
if (z <= -6e+137) {
tmp = x * -z;
} else if ((z <= -35.0) || !(z <= 1.0)) {
tmp = y * -z;
} else {
tmp = 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 (z <= (-6d+137)) then
tmp = x * -z
else if ((z <= (-35.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = y * -z
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -6e+137) {
tmp = x * -z;
} else if ((z <= -35.0) || !(z <= 1.0)) {
tmp = y * -z;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -6e+137: tmp = x * -z elif (z <= -35.0) or not (z <= 1.0): tmp = y * -z else: tmp = x + y return tmp
function code(x, y, z) tmp = 0.0 if (z <= -6e+137) tmp = Float64(x * Float64(-z)); elseif ((z <= -35.0) || !(z <= 1.0)) tmp = Float64(y * Float64(-z)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -6e+137) tmp = x * -z; elseif ((z <= -35.0) || ~((z <= 1.0))) tmp = y * -z; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -6e+137], N[(x * (-z)), $MachinePrecision], If[Or[LessEqual[z, -35.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(y * (-z)), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+137}:\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -35 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.0000000000000002e137Initial program 100.0%
Taylor expanded in x around inf 66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in z around inf 66.2%
neg-mul-166.2%
Simplified66.2%
if -6.0000000000000002e137 < z < -35 or 1 < z Initial program 100.0%
Taylor expanded in z around inf 97.7%
neg-mul-157.7%
Simplified97.7%
Taylor expanded in x around 0 44.4%
associate-*r*44.4%
mul-1-neg44.4%
Simplified44.4%
if -35 < z < 1Initial program 99.9%
Taylor expanded in z around 0 95.7%
+-commutative95.7%
Simplified95.7%
Final simplification71.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -70.0) (not (<= z 1.0))) (* y (- z)) (+ x y)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -70.0) || !(z <= 1.0)) {
tmp = y * -z;
} else {
tmp = 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 ((z <= (-70.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = y * -z
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -70.0) || !(z <= 1.0)) {
tmp = y * -z;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -70.0) or not (z <= 1.0): tmp = y * -z else: tmp = x + y return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -70.0) || !(z <= 1.0)) tmp = Float64(y * Float64(-z)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -70.0) || ~((z <= 1.0))) tmp = y * -z; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -70.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(y * (-z)), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -70 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -70 or 1 < z Initial program 100.0%
Taylor expanded in z around inf 98.3%
neg-mul-159.8%
Simplified98.3%
Taylor expanded in x around 0 44.6%
associate-*r*44.6%
mul-1-neg44.6%
Simplified44.6%
if -70 < z < 1Initial program 99.9%
Taylor expanded in z around 0 95.7%
+-commutative95.7%
Simplified95.7%
Final simplification69.4%
(FPCore (x y z) :precision binary64 (if (<= (+ x y) -5e-211) (- x (* x z)) (- y (* y z))))
double code(double x, double y, double z) {
double tmp;
if ((x + y) <= -5e-211) {
tmp = x - (x * z);
} else {
tmp = y - (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 ((x + y) <= (-5d-211)) then
tmp = x - (x * z)
else
tmp = y - (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x + y) <= -5e-211) {
tmp = x - (x * z);
} else {
tmp = y - (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x + y) <= -5e-211: tmp = x - (x * z) else: tmp = y - (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(x + y) <= -5e-211) tmp = Float64(x - Float64(x * z)); else tmp = Float64(y - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x + y) <= -5e-211) tmp = x - (x * z); else tmp = y - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(x + y), $MachinePrecision], -5e-211], N[(x - N[(x * z), $MachinePrecision]), $MachinePrecision], N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -5 \cdot 10^{-211}:\\
\;\;\;\;x - x \cdot z\\
\mathbf{else}:\\
\;\;\;\;y - y \cdot z\\
\end{array}
\end{array}
if (+.f64 x y) < -5.0000000000000002e-211Initial program 99.9%
sub-neg99.9%
distribute-lft-in100.0%
*-commutative100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 45.0%
if -5.0000000000000002e-211 < (+.f64 x y) Initial program 100.0%
sub-neg100.0%
distribute-lft-in100.0%
*-commutative100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 48.4%
(FPCore (x y z) :precision binary64 (if (<= x -6.2e-93) (- x (* x z)) (* y (- 1.0 z))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e-93) {
tmp = x - (x * z);
} else {
tmp = y * (1.0 - 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 (x <= (-6.2d-93)) then
tmp = x - (x * z)
else
tmp = y * (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e-93) {
tmp = x - (x * z);
} else {
tmp = y * (1.0 - z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6.2e-93: tmp = x - (x * z) else: tmp = y * (1.0 - z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6.2e-93) tmp = Float64(x - Float64(x * z)); else tmp = Float64(y * Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6.2e-93) tmp = x - (x * z); else tmp = y * (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6.2e-93], N[(x - N[(x * z), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-93}:\\
\;\;\;\;x - x \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\end{array}
\end{array}
if x < -6.19999999999999999e-93Initial program 99.9%
sub-neg99.9%
distribute-lft-in99.9%
*-commutative99.9%
*-un-lft-identity99.9%
Applied egg-rr99.9%
distribute-rgt-neg-out99.9%
unsub-neg99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 67.2%
if -6.19999999999999999e-93 < x Initial program 100.0%
Taylor expanded in x around 0 60.1%
(FPCore (x y z) :precision binary64 (if (<= x -6.2e-93) (* x (- 1.0 z)) (* y (- 1.0 z))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e-93) {
tmp = x * (1.0 - z);
} else {
tmp = y * (1.0 - 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 (x <= (-6.2d-93)) then
tmp = x * (1.0d0 - z)
else
tmp = y * (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e-93) {
tmp = x * (1.0 - z);
} else {
tmp = y * (1.0 - z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6.2e-93: tmp = x * (1.0 - z) else: tmp = y * (1.0 - z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6.2e-93) tmp = Float64(x * Float64(1.0 - z)); else tmp = Float64(y * Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6.2e-93) tmp = x * (1.0 - z); else tmp = y * (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6.2e-93], N[(x * N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-93}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\end{array}
\end{array}
if x < -6.19999999999999999e-93Initial program 99.9%
Taylor expanded in x around inf 67.2%
*-commutative67.2%
Simplified67.2%
if -6.19999999999999999e-93 < x Initial program 100.0%
Taylor expanded in x around 0 60.1%
Final simplification62.1%
(FPCore (x y z) :precision binary64 (if (<= z 5500000000000.0) (+ x y) (* x z)))
double code(double x, double y, double z) {
double tmp;
if (z <= 5500000000000.0) {
tmp = x + 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 <= 5500000000000.0d0) then
tmp = x + 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 <= 5500000000000.0) {
tmp = x + y;
} else {
tmp = x * z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 5500000000000.0: tmp = x + y else: tmp = x * z return tmp
function code(x, y, z) tmp = 0.0 if (z <= 5500000000000.0) tmp = Float64(x + y); else tmp = Float64(x * z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 5500000000000.0) tmp = x + y; else tmp = x * z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 5500000000000.0], N[(x + y), $MachinePrecision], N[(x * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5500000000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x \cdot z\\
\end{array}
\end{array}
if z < 5.5e12Initial program 100.0%
Taylor expanded in z around 0 63.8%
+-commutative63.8%
Simplified63.8%
if 5.5e12 < z Initial program 100.0%
Taylor expanded in x around inf 54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in z around inf 54.0%
neg-mul-154.0%
Simplified54.0%
neg-sub054.0%
sub-neg54.0%
add-sqr-sqrt0.0%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod4.8%
add-sqr-sqrt4.8%
Applied egg-rr4.8%
+-lft-identity4.8%
Simplified4.8%
Final simplification49.3%
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z)))
double code(double x, double y, double z) {
return (x + y) * (1.0 - 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 + y) * (1.0d0 - z)
end function
public static double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
def code(x, y, z): return (x + y) * (1.0 - z)
function code(x, y, z) return Float64(Float64(x + y) * Float64(1.0 - z)) end
function tmp = code(x, y, z) tmp = (x + y) * (1.0 - z); end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) \cdot \left(1 - z\right)
\end{array}
Initial program 100.0%
(FPCore (x y z) :precision binary64 (if (<= y 6.2e-90) x y))
double code(double x, double y, double z) {
double tmp;
if (y <= 6.2e-90) {
tmp = x;
} else {
tmp = 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 <= 6.2d-90) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 6.2e-90) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 6.2e-90: tmp = x else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= 6.2e-90) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 6.2e-90) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 6.2e-90], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.2 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 6.2000000000000003e-90Initial program 100.0%
Taylor expanded in z around 0 49.3%
+-commutative49.3%
Simplified49.3%
Taylor expanded in y around 0 22.9%
if 6.2000000000000003e-90 < y Initial program 100.0%
Taylor expanded in z around 0 46.6%
+-commutative46.6%
Simplified46.6%
Taylor expanded in y around inf 30.5%
(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%
Taylor expanded in z around 0 48.3%
+-commutative48.3%
Simplified48.3%
Taylor expanded in y around 0 20.6%
herbie shell --seed 2024146
(FPCore (x y z)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, H"
:precision binary64
(* (+ x y) (- 1.0 z)))