
(FPCore (x y z) :precision binary64 (+ (* x y) (* (- x 1.0) z)))
double code(double x, double y, double z) {
return (x * y) + ((x - 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) + ((x - 1.0d0) * z)
end function
public static double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
def code(x, y, z): return (x * y) + ((x - 1.0) * z)
function code(x, y, z) return Float64(Float64(x * y) + Float64(Float64(x - 1.0) * z)) end
function tmp = code(x, y, z) tmp = (x * y) + ((x - 1.0) * z); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + \left(x - 1\right) \cdot z
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (* x y) (* (- x 1.0) z)))
double code(double x, double y, double z) {
return (x * y) + ((x - 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) + ((x - 1.0d0) * z)
end function
public static double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
def code(x, y, z): return (x * y) + ((x - 1.0) * z)
function code(x, y, z) return Float64(Float64(x * y) + Float64(Float64(x - 1.0) * z)) end
function tmp = code(x, y, z) tmp = (x * y) + ((x - 1.0) * z); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + \left(x - 1\right) \cdot z
\end{array}
(FPCore (x y z) :precision binary64 (- (* x (+ z y)) z))
double code(double x, double y, double z) {
return (x * (z + 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 * (z + y)) - z
end function
public static double code(double x, double y, double z) {
return (x * (z + y)) - z;
}
def code(x, y, z): return (x * (z + y)) - z
function code(x, y, z) return Float64(Float64(x * Float64(z + y)) - z) end
function tmp = code(x, y, z) tmp = (x * (z + y)) - z; end
code[x_, y_, z_] := N[(N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(z + y\right) - z
\end{array}
Initial program 98.8%
*-commutative98.8%
sub-neg98.8%
distribute-rgt-in98.8%
metadata-eval98.8%
neg-mul-198.8%
associate-+r+98.8%
unsub-neg98.8%
+-commutative98.8%
distribute-lft-out100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (<= x -4.5e-9)
(* x y)
(if (<= x 7.5e-93)
(- z)
(if (or (<= x 1.3e+23) (and (not (<= x 7.8e+59)) (<= x 9.5e+86)))
(* x y)
(* x z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.5e-9) {
tmp = x * y;
} else if (x <= 7.5e-93) {
tmp = -z;
} else if ((x <= 1.3e+23) || (!(x <= 7.8e+59) && (x <= 9.5e+86))) {
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 (x <= (-4.5d-9)) then
tmp = x * y
else if (x <= 7.5d-93) then
tmp = -z
else if ((x <= 1.3d+23) .or. (.not. (x <= 7.8d+59)) .and. (x <= 9.5d+86)) 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 (x <= -4.5e-9) {
tmp = x * y;
} else if (x <= 7.5e-93) {
tmp = -z;
} else if ((x <= 1.3e+23) || (!(x <= 7.8e+59) && (x <= 9.5e+86))) {
tmp = x * y;
} else {
tmp = x * z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.5e-9: tmp = x * y elif x <= 7.5e-93: tmp = -z elif (x <= 1.3e+23) or (not (x <= 7.8e+59) and (x <= 9.5e+86)): tmp = x * y else: tmp = x * z return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.5e-9) tmp = Float64(x * y); elseif (x <= 7.5e-93) tmp = Float64(-z); elseif ((x <= 1.3e+23) || (!(x <= 7.8e+59) && (x <= 9.5e+86))) tmp = Float64(x * y); else tmp = Float64(x * z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4.5e-9) tmp = x * y; elseif (x <= 7.5e-93) tmp = -z; elseif ((x <= 1.3e+23) || (~((x <= 7.8e+59)) && (x <= 9.5e+86))) tmp = x * y; else tmp = x * z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.5e-9], N[(x * y), $MachinePrecision], If[LessEqual[x, 7.5e-93], (-z), If[Or[LessEqual[x, 1.3e+23], And[N[Not[LessEqual[x, 7.8e+59]], $MachinePrecision], LessEqual[x, 9.5e+86]]], N[(x * y), $MachinePrecision], N[(x * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-9}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-93}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+23} \lor \neg \left(x \leq 7.8 \cdot 10^{+59}\right) \land x \leq 9.5 \cdot 10^{+86}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot z\\
\end{array}
\end{array}
if x < -4.49999999999999976e-9 or 7.50000000000000034e-93 < x < 1.29999999999999996e23 or 7.80000000000000043e59 < x < 9.50000000000000028e86Initial program 98.0%
Taylor expanded in y around inf 63.2%
if -4.49999999999999976e-9 < x < 7.50000000000000034e-93Initial program 100.0%
Taylor expanded in x around 0 74.6%
neg-mul-174.6%
Simplified74.6%
if 1.29999999999999996e23 < x < 7.80000000000000043e59 or 9.50000000000000028e86 < x Initial program 98.0%
*-commutative98.0%
sub-neg98.0%
distribute-rgt-in98.0%
metadata-eval98.0%
neg-mul-198.0%
associate-+r+98.0%
unsub-neg98.0%
+-commutative98.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in y around inf 78.2%
Taylor expanded in y around 0 71.4%
Taylor expanded in x around inf 71.4%
*-commutative71.4%
Simplified71.4%
Final simplification69.4%
(FPCore (x y z)
:precision binary64
(if (or (<= x -7.2e-9)
(and (not (<= x -2.8e-59))
(or (<= x -1.1e-135) (not (<= x 1.8e-92)))))
(* x (+ z y))
(- z)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7.2e-9) || (!(x <= -2.8e-59) && ((x <= -1.1e-135) || !(x <= 1.8e-92)))) {
tmp = x * (z + y);
} else {
tmp = -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 <= (-7.2d-9)) .or. (.not. (x <= (-2.8d-59))) .and. (x <= (-1.1d-135)) .or. (.not. (x <= 1.8d-92))) then
tmp = x * (z + y)
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -7.2e-9) || (!(x <= -2.8e-59) && ((x <= -1.1e-135) || !(x <= 1.8e-92)))) {
tmp = x * (z + y);
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7.2e-9) or (not (x <= -2.8e-59) and ((x <= -1.1e-135) or not (x <= 1.8e-92))): tmp = x * (z + y) else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7.2e-9) || (!(x <= -2.8e-59) && ((x <= -1.1e-135) || !(x <= 1.8e-92)))) tmp = Float64(x * Float64(z + y)); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -7.2e-9) || (~((x <= -2.8e-59)) && ((x <= -1.1e-135) || ~((x <= 1.8e-92))))) tmp = x * (z + y); else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7.2e-9], And[N[Not[LessEqual[x, -2.8e-59]], $MachinePrecision], Or[LessEqual[x, -1.1e-135], N[Not[LessEqual[x, 1.8e-92]], $MachinePrecision]]]], N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision], (-z)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-9} \lor \neg \left(x \leq -2.8 \cdot 10^{-59}\right) \land \left(x \leq -1.1 \cdot 10^{-135} \lor \neg \left(x \leq 1.8 \cdot 10^{-92}\right)\right):\\
\;\;\;\;x \cdot \left(z + y\right)\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if x < -7.2e-9 or -2.79999999999999981e-59 < x < -1.1e-135 or 1.80000000000000008e-92 < x Initial program 98.2%
Taylor expanded in x around inf 92.8%
+-commutative92.8%
Simplified92.8%
if -7.2e-9 < x < -2.79999999999999981e-59 or -1.1e-135 < x < 1.80000000000000008e-92Initial program 100.0%
Taylor expanded in x around 0 81.8%
neg-mul-181.8%
Simplified81.8%
Final simplification89.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ z y))))
(if (<= x -1.45e-8)
t_0
(if (<= x -9.5e-64)
(* z (+ x -1.0))
(if (or (<= x -2.05e-135) (not (<= x 1.8e-92))) t_0 (- z))))))
double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -1.45e-8) {
tmp = t_0;
} else if (x <= -9.5e-64) {
tmp = z * (x + -1.0);
} else if ((x <= -2.05e-135) || !(x <= 1.8e-92)) {
tmp = t_0;
} else {
tmp = -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 = x * (z + y)
if (x <= (-1.45d-8)) then
tmp = t_0
else if (x <= (-9.5d-64)) then
tmp = z * (x + (-1.0d0))
else if ((x <= (-2.05d-135)) .or. (.not. (x <= 1.8d-92))) then
tmp = t_0
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -1.45e-8) {
tmp = t_0;
} else if (x <= -9.5e-64) {
tmp = z * (x + -1.0);
} else if ((x <= -2.05e-135) || !(x <= 1.8e-92)) {
tmp = t_0;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z + y) tmp = 0 if x <= -1.45e-8: tmp = t_0 elif x <= -9.5e-64: tmp = z * (x + -1.0) elif (x <= -2.05e-135) or not (x <= 1.8e-92): tmp = t_0 else: tmp = -z return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z + y)) tmp = 0.0 if (x <= -1.45e-8) tmp = t_0; elseif (x <= -9.5e-64) tmp = Float64(z * Float64(x + -1.0)); elseif ((x <= -2.05e-135) || !(x <= 1.8e-92)) tmp = t_0; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z + y); tmp = 0.0; if (x <= -1.45e-8) tmp = t_0; elseif (x <= -9.5e-64) tmp = z * (x + -1.0); elseif ((x <= -2.05e-135) || ~((x <= 1.8e-92))) tmp = t_0; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e-8], t$95$0, If[LessEqual[x, -9.5e-64], N[(z * N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -2.05e-135], N[Not[LessEqual[x, 1.8e-92]], $MachinePrecision]], t$95$0, (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z + y\right)\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{-8}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-64}:\\
\;\;\;\;z \cdot \left(x + -1\right)\\
\mathbf{elif}\;x \leq -2.05 \cdot 10^{-135} \lor \neg \left(x \leq 1.8 \cdot 10^{-92}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if x < -1.4500000000000001e-8 or -9.50000000000000043e-64 < x < -2.05000000000000005e-135 or 1.80000000000000008e-92 < x Initial program 98.2%
Taylor expanded in x around inf 92.8%
+-commutative92.8%
Simplified92.8%
if -1.4500000000000001e-8 < x < -9.50000000000000043e-64Initial program 99.7%
Taylor expanded in y around 0 80.1%
if -2.05000000000000005e-135 < x < 1.80000000000000008e-92Initial program 100.0%
Taylor expanded in x around 0 82.8%
neg-mul-182.8%
Simplified82.8%
Final simplification89.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ z y))))
(if (<= x -8.5e-9)
t_0
(if (<= x -9e-62)
(- (* x z) z)
(if (or (<= x -6.2e-136) (not (<= x 1.8e-92))) t_0 (- z))))))
double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -8.5e-9) {
tmp = t_0;
} else if (x <= -9e-62) {
tmp = (x * z) - z;
} else if ((x <= -6.2e-136) || !(x <= 1.8e-92)) {
tmp = t_0;
} else {
tmp = -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 = x * (z + y)
if (x <= (-8.5d-9)) then
tmp = t_0
else if (x <= (-9d-62)) then
tmp = (x * z) - z
else if ((x <= (-6.2d-136)) .or. (.not. (x <= 1.8d-92))) then
tmp = t_0
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -8.5e-9) {
tmp = t_0;
} else if (x <= -9e-62) {
tmp = (x * z) - z;
} else if ((x <= -6.2e-136) || !(x <= 1.8e-92)) {
tmp = t_0;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z + y) tmp = 0 if x <= -8.5e-9: tmp = t_0 elif x <= -9e-62: tmp = (x * z) - z elif (x <= -6.2e-136) or not (x <= 1.8e-92): tmp = t_0 else: tmp = -z return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z + y)) tmp = 0.0 if (x <= -8.5e-9) tmp = t_0; elseif (x <= -9e-62) tmp = Float64(Float64(x * z) - z); elseif ((x <= -6.2e-136) || !(x <= 1.8e-92)) tmp = t_0; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z + y); tmp = 0.0; if (x <= -8.5e-9) tmp = t_0; elseif (x <= -9e-62) tmp = (x * z) - z; elseif ((x <= -6.2e-136) || ~((x <= 1.8e-92))) tmp = t_0; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e-9], t$95$0, If[LessEqual[x, -9e-62], N[(N[(x * z), $MachinePrecision] - z), $MachinePrecision], If[Or[LessEqual[x, -6.2e-136], N[Not[LessEqual[x, 1.8e-92]], $MachinePrecision]], t$95$0, (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z + y\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -9 \cdot 10^{-62}:\\
\;\;\;\;x \cdot z - z\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-136} \lor \neg \left(x \leq 1.8 \cdot 10^{-92}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if x < -8.5e-9 or -9.00000000000000036e-62 < x < -6.2e-136 or 1.80000000000000008e-92 < x Initial program 98.2%
Taylor expanded in x around inf 92.8%
+-commutative92.8%
Simplified92.8%
if -8.5e-9 < x < -9.00000000000000036e-62Initial program 99.7%
*-commutative99.7%
sub-neg99.7%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
+-commutative100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
Taylor expanded in y around 0 80.4%
if -6.2e-136 < x < 1.80000000000000008e-92Initial program 100.0%
Taylor expanded in x around 0 82.8%
neg-mul-182.8%
Simplified82.8%
Final simplification89.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -180000.0) (not (<= x 1.0))) (* x (+ z y)) (- (* x y) z)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -180000.0) || !(x <= 1.0)) {
tmp = x * (z + y);
} else {
tmp = (x * 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 <= (-180000.0d0)) .or. (.not. (x <= 1.0d0))) then
tmp = x * (z + y)
else
tmp = (x * y) - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -180000.0) || !(x <= 1.0)) {
tmp = x * (z + y);
} else {
tmp = (x * y) - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -180000.0) or not (x <= 1.0): tmp = x * (z + y) else: tmp = (x * y) - z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -180000.0) || !(x <= 1.0)) tmp = Float64(x * Float64(z + y)); else tmp = Float64(Float64(x * y) - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -180000.0) || ~((x <= 1.0))) tmp = x * (z + y); else tmp = (x * y) - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -180000.0], N[Not[LessEqual[x, 1.0]], $MachinePrecision]], N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -180000 \lor \neg \left(x \leq 1\right):\\
\;\;\;\;x \cdot \left(z + y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - z\\
\end{array}
\end{array}
if x < -1.8e5 or 1 < x Initial program 97.7%
Taylor expanded in x around inf 99.2%
+-commutative99.2%
Simplified99.2%
if -1.8e5 < x < 1Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
neg-mul-1100.0%
associate-+r+100.0%
unsub-neg100.0%
+-commutative100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in y around inf 97.6%
Taylor expanded in z around 0 98.3%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -7.2e-9) (not (<= x 1.9e-93))) (* x y) (- z)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7.2e-9) || !(x <= 1.9e-93)) {
tmp = x * y;
} else {
tmp = -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 <= (-7.2d-9)) .or. (.not. (x <= 1.9d-93))) then
tmp = x * y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -7.2e-9) || !(x <= 1.9e-93)) {
tmp = x * y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7.2e-9) or not (x <= 1.9e-93): tmp = x * y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7.2e-9) || !(x <= 1.9e-93)) tmp = Float64(x * y); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -7.2e-9) || ~((x <= 1.9e-93))) tmp = x * y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7.2e-9], N[Not[LessEqual[x, 1.9e-93]], $MachinePrecision]], N[(x * y), $MachinePrecision], (-z)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-9} \lor \neg \left(x \leq 1.9 \cdot 10^{-93}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if x < -7.2e-9 or 1.8999999999999999e-93 < x Initial program 98.0%
Taylor expanded in y around inf 55.7%
if -7.2e-9 < x < 1.8999999999999999e-93Initial program 100.0%
Taylor expanded in x around 0 74.6%
neg-mul-174.6%
Simplified74.6%
Final simplification63.3%
(FPCore (x y z) :precision binary64 (- z))
double code(double x, double y, double z) {
return -z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -z
end function
public static double code(double x, double y, double z) {
return -z;
}
def code(x, y, z): return -z
function code(x, y, z) return Float64(-z) end
function tmp = code(x, y, z) tmp = -z; end
code[x_, y_, z_] := (-z)
\begin{array}{l}
\\
-z
\end{array}
Initial program 98.8%
Taylor expanded in x around 0 33.0%
neg-mul-133.0%
Simplified33.0%
Final simplification33.0%
herbie shell --seed 2024078
(FPCore (x y z)
:name "Graphics.Rendering.Chart.Drawing:drawTextsR from Chart-1.5.3"
:precision binary64
(+ (* x y) (* (- x 1.0) z)))