
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.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) * 6.0d0) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.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) * 6.0d0) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
\end{array}
(FPCore (x y z) :precision binary64 (+ x (* (+ (* x -6.0) (* 6.0 y)) z)))
double code(double x, double y, double z) {
return x + (((x * -6.0) + (6.0 * 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 + (((x * (-6.0d0)) + (6.0d0 * y)) * z)
end function
public static double code(double x, double y, double z) {
return x + (((x * -6.0) + (6.0 * y)) * z);
}
def code(x, y, z): return x + (((x * -6.0) + (6.0 * y)) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(x * -6.0) + Float64(6.0 * y)) * z)) end
function tmp = code(x, y, z) tmp = x + (((x * -6.0) + (6.0 * y)) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(x * -6.0), $MachinePrecision] + N[(6.0 * y), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(x \cdot -6 + 6 \cdot y\right) \cdot z
\end{array}
Initial program 99.8%
Taylor expanded in y around 0 99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* x z))) (t_1 (* 6.0 (* y z))))
(if (<= z -7.5e+241)
t_0
(if (<= z -5.2e+199)
t_1
(if (<= z -2.45e+79)
t_0
(if (<= z -6.2e+45)
t_1
(if (<= z -3300000000000.0)
t_0
(if (<= z -1.15e-39)
t_1
(if (<= z 7.6e-90)
x
(if (or (<= z 2.15e+14)
(and (not (<= z 1.06e+27)) (<= z 5.5e+140)))
t_1
t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (x * z);
double t_1 = 6.0 * (y * z);
double tmp;
if (z <= -7.5e+241) {
tmp = t_0;
} else if (z <= -5.2e+199) {
tmp = t_1;
} else if (z <= -2.45e+79) {
tmp = t_0;
} else if (z <= -6.2e+45) {
tmp = t_1;
} else if (z <= -3300000000000.0) {
tmp = t_0;
} else if (z <= -1.15e-39) {
tmp = t_1;
} else if (z <= 7.6e-90) {
tmp = x;
} else if ((z <= 2.15e+14) || (!(z <= 1.06e+27) && (z <= 5.5e+140))) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (x * z)
t_1 = 6.0d0 * (y * z)
if (z <= (-7.5d+241)) then
tmp = t_0
else if (z <= (-5.2d+199)) then
tmp = t_1
else if (z <= (-2.45d+79)) then
tmp = t_0
else if (z <= (-6.2d+45)) then
tmp = t_1
else if (z <= (-3300000000000.0d0)) then
tmp = t_0
else if (z <= (-1.15d-39)) then
tmp = t_1
else if (z <= 7.6d-90) then
tmp = x
else if ((z <= 2.15d+14) .or. (.not. (z <= 1.06d+27)) .and. (z <= 5.5d+140)) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (x * z);
double t_1 = 6.0 * (y * z);
double tmp;
if (z <= -7.5e+241) {
tmp = t_0;
} else if (z <= -5.2e+199) {
tmp = t_1;
} else if (z <= -2.45e+79) {
tmp = t_0;
} else if (z <= -6.2e+45) {
tmp = t_1;
} else if (z <= -3300000000000.0) {
tmp = t_0;
} else if (z <= -1.15e-39) {
tmp = t_1;
} else if (z <= 7.6e-90) {
tmp = x;
} else if ((z <= 2.15e+14) || (!(z <= 1.06e+27) && (z <= 5.5e+140))) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (x * z) t_1 = 6.0 * (y * z) tmp = 0 if z <= -7.5e+241: tmp = t_0 elif z <= -5.2e+199: tmp = t_1 elif z <= -2.45e+79: tmp = t_0 elif z <= -6.2e+45: tmp = t_1 elif z <= -3300000000000.0: tmp = t_0 elif z <= -1.15e-39: tmp = t_1 elif z <= 7.6e-90: tmp = x elif (z <= 2.15e+14) or (not (z <= 1.06e+27) and (z <= 5.5e+140)): tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(x * z)) t_1 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -7.5e+241) tmp = t_0; elseif (z <= -5.2e+199) tmp = t_1; elseif (z <= -2.45e+79) tmp = t_0; elseif (z <= -6.2e+45) tmp = t_1; elseif (z <= -3300000000000.0) tmp = t_0; elseif (z <= -1.15e-39) tmp = t_1; elseif (z <= 7.6e-90) tmp = x; elseif ((z <= 2.15e+14) || (!(z <= 1.06e+27) && (z <= 5.5e+140))) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (x * z); t_1 = 6.0 * (y * z); tmp = 0.0; if (z <= -7.5e+241) tmp = t_0; elseif (z <= -5.2e+199) tmp = t_1; elseif (z <= -2.45e+79) tmp = t_0; elseif (z <= -6.2e+45) tmp = t_1; elseif (z <= -3300000000000.0) tmp = t_0; elseif (z <= -1.15e-39) tmp = t_1; elseif (z <= 7.6e-90) tmp = x; elseif ((z <= 2.15e+14) || (~((z <= 1.06e+27)) && (z <= 5.5e+140))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+241], t$95$0, If[LessEqual[z, -5.2e+199], t$95$1, If[LessEqual[z, -2.45e+79], t$95$0, If[LessEqual[z, -6.2e+45], t$95$1, If[LessEqual[z, -3300000000000.0], t$95$0, If[LessEqual[z, -1.15e-39], t$95$1, If[LessEqual[z, 7.6e-90], x, If[Or[LessEqual[z, 2.15e+14], And[N[Not[LessEqual[z, 1.06e+27]], $MachinePrecision], LessEqual[z, 5.5e+140]]], t$95$1, t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(x \cdot z\right)\\
t_1 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+241}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+199}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{+79}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3300000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+14} \lor \neg \left(z \leq 1.06 \cdot 10^{+27}\right) \land z \leq 5.5 \cdot 10^{+140}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -7.5000000000000001e241 or -5.2000000000000003e199 < z < -2.4499999999999999e79 or -6.19999999999999975e45 < z < -3.3e12 or 2.15e14 < z < 1.05999999999999994e27 or 5.5e140 < z Initial program 99.8%
Taylor expanded in x around inf 73.0%
Taylor expanded in z around inf 72.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in x around 0 72.8%
if -7.5000000000000001e241 < z < -5.2000000000000003e199 or -2.4499999999999999e79 < z < -6.19999999999999975e45 or -3.3e12 < z < -1.15000000000000004e-39 or 7.6e-90 < z < 2.15e14 or 1.05999999999999994e27 < z < 5.5e140Initial program 99.7%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 84.3%
Taylor expanded in y around inf 71.3%
*-commutative71.3%
Simplified71.3%
if -1.15000000000000004e-39 < z < 7.6e-90Initial program 99.9%
Taylor expanded in z around 0 76.7%
Final simplification74.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* -6.0 z))) (t_1 (* -6.0 (* x z))) (t_2 (* 6.0 (* y z))))
(if (<= z -6e+241)
t_0
(if (<= z -1.15e+200)
t_2
(if (<= z -2.4e+80)
t_0
(if (<= z -1.45e+47)
t_2
(if (<= z -1350000000000.0)
t_1
(if (<= z -5.4e-40)
t_2
(if (<= z 3.9e-89)
x
(if (<= z 2.7e+14)
t_2
(if (<= z 1.18e+27)
t_1
(if (<= z 3.6e+195) t_2 t_0))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (-6.0 * z);
double t_1 = -6.0 * (x * z);
double t_2 = 6.0 * (y * z);
double tmp;
if (z <= -6e+241) {
tmp = t_0;
} else if (z <= -1.15e+200) {
tmp = t_2;
} else if (z <= -2.4e+80) {
tmp = t_0;
} else if (z <= -1.45e+47) {
tmp = t_2;
} else if (z <= -1350000000000.0) {
tmp = t_1;
} else if (z <= -5.4e-40) {
tmp = t_2;
} else if (z <= 3.9e-89) {
tmp = x;
} else if (z <= 2.7e+14) {
tmp = t_2;
} else if (z <= 1.18e+27) {
tmp = t_1;
} else if (z <= 3.6e+195) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x * ((-6.0d0) * z)
t_1 = (-6.0d0) * (x * z)
t_2 = 6.0d0 * (y * z)
if (z <= (-6d+241)) then
tmp = t_0
else if (z <= (-1.15d+200)) then
tmp = t_2
else if (z <= (-2.4d+80)) then
tmp = t_0
else if (z <= (-1.45d+47)) then
tmp = t_2
else if (z <= (-1350000000000.0d0)) then
tmp = t_1
else if (z <= (-5.4d-40)) then
tmp = t_2
else if (z <= 3.9d-89) then
tmp = x
else if (z <= 2.7d+14) then
tmp = t_2
else if (z <= 1.18d+27) then
tmp = t_1
else if (z <= 3.6d+195) then
tmp = t_2
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (-6.0 * z);
double t_1 = -6.0 * (x * z);
double t_2 = 6.0 * (y * z);
double tmp;
if (z <= -6e+241) {
tmp = t_0;
} else if (z <= -1.15e+200) {
tmp = t_2;
} else if (z <= -2.4e+80) {
tmp = t_0;
} else if (z <= -1.45e+47) {
tmp = t_2;
} else if (z <= -1350000000000.0) {
tmp = t_1;
} else if (z <= -5.4e-40) {
tmp = t_2;
} else if (z <= 3.9e-89) {
tmp = x;
} else if (z <= 2.7e+14) {
tmp = t_2;
} else if (z <= 1.18e+27) {
tmp = t_1;
} else if (z <= 3.6e+195) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (-6.0 * z) t_1 = -6.0 * (x * z) t_2 = 6.0 * (y * z) tmp = 0 if z <= -6e+241: tmp = t_0 elif z <= -1.15e+200: tmp = t_2 elif z <= -2.4e+80: tmp = t_0 elif z <= -1.45e+47: tmp = t_2 elif z <= -1350000000000.0: tmp = t_1 elif z <= -5.4e-40: tmp = t_2 elif z <= 3.9e-89: tmp = x elif z <= 2.7e+14: tmp = t_2 elif z <= 1.18e+27: tmp = t_1 elif z <= 3.6e+195: tmp = t_2 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-6.0 * z)) t_1 = Float64(-6.0 * Float64(x * z)) t_2 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -6e+241) tmp = t_0; elseif (z <= -1.15e+200) tmp = t_2; elseif (z <= -2.4e+80) tmp = t_0; elseif (z <= -1.45e+47) tmp = t_2; elseif (z <= -1350000000000.0) tmp = t_1; elseif (z <= -5.4e-40) tmp = t_2; elseif (z <= 3.9e-89) tmp = x; elseif (z <= 2.7e+14) tmp = t_2; elseif (z <= 1.18e+27) tmp = t_1; elseif (z <= 3.6e+195) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (-6.0 * z); t_1 = -6.0 * (x * z); t_2 = 6.0 * (y * z); tmp = 0.0; if (z <= -6e+241) tmp = t_0; elseif (z <= -1.15e+200) tmp = t_2; elseif (z <= -2.4e+80) tmp = t_0; elseif (z <= -1.45e+47) tmp = t_2; elseif (z <= -1350000000000.0) tmp = t_1; elseif (z <= -5.4e-40) tmp = t_2; elseif (z <= 3.9e-89) tmp = x; elseif (z <= 2.7e+14) tmp = t_2; elseif (z <= 1.18e+27) tmp = t_1; elseif (z <= 3.6e+195) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+241], t$95$0, If[LessEqual[z, -1.15e+200], t$95$2, If[LessEqual[z, -2.4e+80], t$95$0, If[LessEqual[z, -1.45e+47], t$95$2, If[LessEqual[z, -1350000000000.0], t$95$1, If[LessEqual[z, -5.4e-40], t$95$2, If[LessEqual[z, 3.9e-89], x, If[LessEqual[z, 2.7e+14], t$95$2, If[LessEqual[z, 1.18e+27], t$95$1, If[LessEqual[z, 3.6e+195], t$95$2, t$95$0]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-6 \cdot z\right)\\
t_1 := -6 \cdot \left(x \cdot z\right)\\
t_2 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{+241}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+200}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+47}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1350000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-89}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+195}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -6.00000000000000031e241 or -1.15000000000000002e200 < z < -2.39999999999999979e80 or 3.5999999999999999e195 < z Initial program 99.9%
Taylor expanded in x around inf 71.9%
Taylor expanded in z around inf 71.9%
*-commutative71.9%
Simplified71.9%
if -6.00000000000000031e241 < z < -1.15000000000000002e200 or -2.39999999999999979e80 < z < -1.4499999999999999e47 or -1.35e12 < z < -5.4e-40 or 3.89999999999999978e-89 < z < 2.7e14 or 1.18000000000000006e27 < z < 3.5999999999999999e195Initial program 99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 86.0%
Taylor expanded in y around inf 69.1%
*-commutative69.1%
Simplified69.1%
if -1.4499999999999999e47 < z < -1.35e12 or 2.7e14 < z < 1.18000000000000006e27Initial program 99.5%
Taylor expanded in x around inf 99.7%
Taylor expanded in z around inf 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 98.7%
if -5.4e-40 < z < 3.89999999999999978e-89Initial program 99.9%
Taylor expanded in z around 0 76.7%
Final simplification74.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (* 6.0 y) z))
(t_1 (* x (* -6.0 z)))
(t_2 (* -6.0 (* x z)))
(t_3 (* 6.0 (* y z))))
(if (<= z -7.5e+241)
t_1
(if (<= z -1.25e+200)
t_3
(if (<= z -1.05e+81)
t_1
(if (<= z -1.45e+47)
t_3
(if (<= z -1050000000000.0)
t_2
(if (<= z -1.26e-39)
t_0
(if (<= z 2.35e-98)
x
(if (<= z 4e+14)
t_0
(if (<= z 3.2e+26)
t_2
(if (<= z 1.18e+201) t_0 t_1))))))))))))
double code(double x, double y, double z) {
double t_0 = (6.0 * y) * z;
double t_1 = x * (-6.0 * z);
double t_2 = -6.0 * (x * z);
double t_3 = 6.0 * (y * z);
double tmp;
if (z <= -7.5e+241) {
tmp = t_1;
} else if (z <= -1.25e+200) {
tmp = t_3;
} else if (z <= -1.05e+81) {
tmp = t_1;
} else if (z <= -1.45e+47) {
tmp = t_3;
} else if (z <= -1050000000000.0) {
tmp = t_2;
} else if (z <= -1.26e-39) {
tmp = t_0;
} else if (z <= 2.35e-98) {
tmp = x;
} else if (z <= 4e+14) {
tmp = t_0;
} else if (z <= 3.2e+26) {
tmp = t_2;
} else if (z <= 1.18e+201) {
tmp = t_0;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (6.0d0 * y) * z
t_1 = x * ((-6.0d0) * z)
t_2 = (-6.0d0) * (x * z)
t_3 = 6.0d0 * (y * z)
if (z <= (-7.5d+241)) then
tmp = t_1
else if (z <= (-1.25d+200)) then
tmp = t_3
else if (z <= (-1.05d+81)) then
tmp = t_1
else if (z <= (-1.45d+47)) then
tmp = t_3
else if (z <= (-1050000000000.0d0)) then
tmp = t_2
else if (z <= (-1.26d-39)) then
tmp = t_0
else if (z <= 2.35d-98) then
tmp = x
else if (z <= 4d+14) then
tmp = t_0
else if (z <= 3.2d+26) then
tmp = t_2
else if (z <= 1.18d+201) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (6.0 * y) * z;
double t_1 = x * (-6.0 * z);
double t_2 = -6.0 * (x * z);
double t_3 = 6.0 * (y * z);
double tmp;
if (z <= -7.5e+241) {
tmp = t_1;
} else if (z <= -1.25e+200) {
tmp = t_3;
} else if (z <= -1.05e+81) {
tmp = t_1;
} else if (z <= -1.45e+47) {
tmp = t_3;
} else if (z <= -1050000000000.0) {
tmp = t_2;
} else if (z <= -1.26e-39) {
tmp = t_0;
} else if (z <= 2.35e-98) {
tmp = x;
} else if (z <= 4e+14) {
tmp = t_0;
} else if (z <= 3.2e+26) {
tmp = t_2;
} else if (z <= 1.18e+201) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (6.0 * y) * z t_1 = x * (-6.0 * z) t_2 = -6.0 * (x * z) t_3 = 6.0 * (y * z) tmp = 0 if z <= -7.5e+241: tmp = t_1 elif z <= -1.25e+200: tmp = t_3 elif z <= -1.05e+81: tmp = t_1 elif z <= -1.45e+47: tmp = t_3 elif z <= -1050000000000.0: tmp = t_2 elif z <= -1.26e-39: tmp = t_0 elif z <= 2.35e-98: tmp = x elif z <= 4e+14: tmp = t_0 elif z <= 3.2e+26: tmp = t_2 elif z <= 1.18e+201: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(6.0 * y) * z) t_1 = Float64(x * Float64(-6.0 * z)) t_2 = Float64(-6.0 * Float64(x * z)) t_3 = Float64(6.0 * Float64(y * z)) tmp = 0.0 if (z <= -7.5e+241) tmp = t_1; elseif (z <= -1.25e+200) tmp = t_3; elseif (z <= -1.05e+81) tmp = t_1; elseif (z <= -1.45e+47) tmp = t_3; elseif (z <= -1050000000000.0) tmp = t_2; elseif (z <= -1.26e-39) tmp = t_0; elseif (z <= 2.35e-98) tmp = x; elseif (z <= 4e+14) tmp = t_0; elseif (z <= 3.2e+26) tmp = t_2; elseif (z <= 1.18e+201) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (6.0 * y) * z; t_1 = x * (-6.0 * z); t_2 = -6.0 * (x * z); t_3 = 6.0 * (y * z); tmp = 0.0; if (z <= -7.5e+241) tmp = t_1; elseif (z <= -1.25e+200) tmp = t_3; elseif (z <= -1.05e+81) tmp = t_1; elseif (z <= -1.45e+47) tmp = t_3; elseif (z <= -1050000000000.0) tmp = t_2; elseif (z <= -1.26e-39) tmp = t_0; elseif (z <= 2.35e-98) tmp = x; elseif (z <= 4e+14) tmp = t_0; elseif (z <= 3.2e+26) tmp = t_2; elseif (z <= 1.18e+201) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(6.0 * y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+241], t$95$1, If[LessEqual[z, -1.25e+200], t$95$3, If[LessEqual[z, -1.05e+81], t$95$1, If[LessEqual[z, -1.45e+47], t$95$3, If[LessEqual[z, -1050000000000.0], t$95$2, If[LessEqual[z, -1.26e-39], t$95$0, If[LessEqual[z, 2.35e-98], x, If[LessEqual[z, 4e+14], t$95$0, If[LessEqual[z, 3.2e+26], t$95$2, If[LessEqual[z, 1.18e+201], t$95$0, t$95$1]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(6 \cdot y\right) \cdot z\\
t_1 := x \cdot \left(-6 \cdot z\right)\\
t_2 := -6 \cdot \left(x \cdot z\right)\\
t_3 := 6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+200}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+47}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1050000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.26 \cdot 10^{-39}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+14}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{+201}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.5000000000000001e241 or -1.25000000000000005e200 < z < -1.0499999999999999e81 or 1.18e201 < z Initial program 99.9%
Taylor expanded in x around inf 71.9%
Taylor expanded in z around inf 71.9%
*-commutative71.9%
Simplified71.9%
if -7.5000000000000001e241 < z < -1.25000000000000005e200 or -1.0499999999999999e81 < z < -1.4499999999999999e47Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around inf 85.6%
*-commutative85.6%
Simplified85.6%
if -1.4499999999999999e47 < z < -1.05e12 or 4e14 < z < 3.20000000000000029e26Initial program 99.5%
Taylor expanded in x around inf 99.7%
Taylor expanded in z around inf 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 98.7%
if -1.05e12 < z < -1.26e-39 or 2.35000000000000003e-98 < z < 4e14 or 3.20000000000000029e26 < z < 1.18e201Initial program 99.7%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 82.7%
Taylor expanded in y around inf 65.7%
associate-*r*65.8%
*-commutative65.8%
*-commutative65.8%
*-commutative65.8%
Simplified65.8%
if -1.26e-39 < z < 2.35000000000000003e-98Initial program 99.9%
Taylor expanded in z around 0 77.2%
Final simplification74.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -7.6e-40) (not (<= z 9e-89))) (* 6.0 (* z (- y x))) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7.6e-40) || !(z <= 9e-89)) {
tmp = 6.0 * (z * (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 ((z <= (-7.6d-40)) .or. (.not. (z <= 9d-89))) then
tmp = 6.0d0 * (z * (y - x))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7.6e-40) || !(z <= 9e-89)) {
tmp = 6.0 * (z * (y - x));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7.6e-40) or not (z <= 9e-89): tmp = 6.0 * (z * (y - x)) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7.6e-40) || !(z <= 9e-89)) tmp = Float64(6.0 * Float64(z * Float64(y - x))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7.6e-40) || ~((z <= 9e-89))) tmp = 6.0 * (z * (y - x)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.6e-40], N[Not[LessEqual[z, 9e-89]], $MachinePrecision]], N[(6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{-40} \lor \neg \left(z \leq 9 \cdot 10^{-89}\right):\\
\;\;\;\;6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.5999999999999998e-40 or 8.9999999999999998e-89 < z Initial program 99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 91.2%
if -7.5999999999999998e-40 < z < 8.9999999999999998e-89Initial program 99.9%
Taylor expanded in z around 0 76.7%
Final simplification85.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -1e-39) (not (<= z 2.9e-90))) (* (- y x) (* 6.0 z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1e-39) || !(z <= 2.9e-90)) {
tmp = (y - x) * (6.0 * 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 ((z <= (-1d-39)) .or. (.not. (z <= 2.9d-90))) then
tmp = (y - x) * (6.0d0 * z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1e-39) || !(z <= 2.9e-90)) {
tmp = (y - x) * (6.0 * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1e-39) or not (z <= 2.9e-90): tmp = (y - x) * (6.0 * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1e-39) || !(z <= 2.9e-90)) tmp = Float64(Float64(y - x) * Float64(6.0 * z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1e-39) || ~((z <= 2.9e-90))) tmp = (y - x) * (6.0 * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1e-39], N[Not[LessEqual[z, 2.9e-90]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-39} \lor \neg \left(z \leq 2.9 \cdot 10^{-90}\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.99999999999999929e-40 or 2.89999999999999983e-90 < z Initial program 99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 91.2%
Taylor expanded in y around 0 87.1%
+-commutative87.1%
associate-*r*87.2%
*-commutative87.2%
associate-*r*87.2%
distribute-rgt-out91.3%
metadata-eval91.3%
associate-*r*91.3%
neg-mul-191.3%
*-commutative91.3%
distribute-rgt-in91.3%
sub-neg91.3%
associate-*r*91.3%
*-commutative91.3%
Simplified91.3%
if -9.99999999999999929e-40 < z < 2.89999999999999983e-90Initial program 99.9%
Taylor expanded in z around 0 76.7%
Final simplification85.0%
(FPCore (x y z) :precision binary64 (if (<= z -0.142) (* (- y x) (* 6.0 z)) (if (<= z 0.17) (+ x (* 6.0 (* y z))) (* 6.0 (* z (- y x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.142) {
tmp = (y - x) * (6.0 * z);
} else if (z <= 0.17) {
tmp = x + (6.0 * (y * z));
} else {
tmp = 6.0 * (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 (z <= (-0.142d0)) then
tmp = (y - x) * (6.0d0 * z)
else if (z <= 0.17d0) then
tmp = x + (6.0d0 * (y * z))
else
tmp = 6.0d0 * (z * (y - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.142) {
tmp = (y - x) * (6.0 * z);
} else if (z <= 0.17) {
tmp = x + (6.0 * (y * z));
} else {
tmp = 6.0 * (z * (y - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.142: tmp = (y - x) * (6.0 * z) elif z <= 0.17: tmp = x + (6.0 * (y * z)) else: tmp = 6.0 * (z * (y - x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.142) tmp = Float64(Float64(y - x) * Float64(6.0 * z)); elseif (z <= 0.17) tmp = Float64(x + Float64(6.0 * Float64(y * z))); else tmp = Float64(6.0 * Float64(z * Float64(y - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.142) tmp = (y - x) * (6.0 * z); elseif (z <= 0.17) tmp = x + (6.0 * (y * z)); else tmp = 6.0 * (z * (y - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.142], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.17], N[(x + N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.142:\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\mathbf{elif}\;z \leq 0.17:\\
\;\;\;\;x + 6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\end{array}
\end{array}
if z < -0.141999999999999987Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 89.7%
+-commutative89.7%
associate-*r*89.8%
*-commutative89.8%
associate-*r*89.8%
distribute-rgt-out99.6%
metadata-eval99.6%
associate-*r*99.6%
neg-mul-199.6%
*-commutative99.6%
distribute-rgt-in99.6%
sub-neg99.6%
associate-*r*99.6%
*-commutative99.6%
Simplified99.6%
if -0.141999999999999987 < z < 0.170000000000000012Initial program 99.8%
Taylor expanded in y around inf 98.7%
*-commutative98.7%
Simplified98.7%
if 0.170000000000000012 < z Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 97.3%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (<= z -0.0056) (* (- y x) (* 6.0 z)) (if (<= z 0.17) (+ x (* (* 6.0 y) z)) (* 6.0 (* z (- y x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.0056) {
tmp = (y - x) * (6.0 * z);
} else if (z <= 0.17) {
tmp = x + ((6.0 * y) * z);
} else {
tmp = 6.0 * (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 (z <= (-0.0056d0)) then
tmp = (y - x) * (6.0d0 * z)
else if (z <= 0.17d0) then
tmp = x + ((6.0d0 * y) * z)
else
tmp = 6.0d0 * (z * (y - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.0056) {
tmp = (y - x) * (6.0 * z);
} else if (z <= 0.17) {
tmp = x + ((6.0 * y) * z);
} else {
tmp = 6.0 * (z * (y - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.0056: tmp = (y - x) * (6.0 * z) elif z <= 0.17: tmp = x + ((6.0 * y) * z) else: tmp = 6.0 * (z * (y - x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.0056) tmp = Float64(Float64(y - x) * Float64(6.0 * z)); elseif (z <= 0.17) tmp = Float64(x + Float64(Float64(6.0 * y) * z)); else tmp = Float64(6.0 * Float64(z * Float64(y - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.0056) tmp = (y - x) * (6.0 * z); elseif (z <= 0.17) tmp = x + ((6.0 * y) * z); else tmp = 6.0 * (z * (y - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.0056], N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.17], N[(x + N[(N[(6.0 * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0056:\\
\;\;\;\;\left(y - x\right) \cdot \left(6 \cdot z\right)\\
\mathbf{elif}\;z \leq 0.17:\\
\;\;\;\;x + \left(6 \cdot y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\end{array}
\end{array}
if z < -0.00559999999999999994Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 89.9%
+-commutative89.9%
associate-*r*90.0%
*-commutative90.0%
associate-*r*89.9%
distribute-rgt-out99.5%
metadata-eval99.5%
associate-*r*99.5%
neg-mul-199.5%
*-commutative99.5%
distribute-rgt-in99.5%
sub-neg99.5%
associate-*r*99.6%
*-commutative99.6%
Simplified99.6%
if -0.00559999999999999994 < z < 0.170000000000000012Initial program 99.9%
Taylor expanded in y around inf 98.7%
if 0.170000000000000012 < z Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 97.3%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.0056) (not (<= z 0.17))) (* -6.0 (* x z)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.0056) || !(z <= 0.17)) {
tmp = -6.0 * (x * 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 ((z <= (-0.0056d0)) .or. (.not. (z <= 0.17d0))) then
tmp = (-6.0d0) * (x * z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.0056) || !(z <= 0.17)) {
tmp = -6.0 * (x * z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.0056) or not (z <= 0.17): tmp = -6.0 * (x * z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.0056) || !(z <= 0.17)) tmp = Float64(-6.0 * Float64(x * z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.0056) || ~((z <= 0.17))) tmp = -6.0 * (x * z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.0056], N[Not[LessEqual[z, 0.17]], $MachinePrecision]], N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0056 \lor \neg \left(z \leq 0.17\right):\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.00559999999999999994 or 0.170000000000000012 < z Initial program 99.8%
Taylor expanded in x around inf 51.7%
Taylor expanded in z around inf 50.3%
*-commutative50.3%
Simplified50.3%
Taylor expanded in x around 0 50.3%
if -0.00559999999999999994 < z < 0.170000000000000012Initial program 99.9%
Taylor expanded in z around 0 67.6%
Final simplification59.7%
(FPCore (x y z) :precision binary64 (+ x (* 6.0 (* z (- y x)))))
double code(double x, double y, double z) {
return x + (6.0 * (z * (y - 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 + (6.0d0 * (z * (y - x)))
end function
public static double code(double x, double y, double z) {
return x + (6.0 * (z * (y - x)));
}
def code(x, y, z): return x + (6.0 * (z * (y - x)))
function code(x, y, z) return Float64(x + Float64(6.0 * Float64(z * Float64(y - x)))) end
function tmp = code(x, y, z) tmp = x + (6.0 * (z * (y - x))); end
code[x_, y_, z_] := N[(x + N[(6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 6 \cdot \left(z \cdot \left(y - x\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in z around 0 99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (+ x (* z (* 6.0 (- y x)))))
double code(double x, double y, double z) {
return x + (z * (6.0 * (y - 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 + (z * (6.0d0 * (y - x)))
end function
public static double code(double x, double y, double z) {
return x + (z * (6.0 * (y - x)));
}
def code(x, y, z): return x + (z * (6.0 * (y - x)))
function code(x, y, z) return Float64(x + Float64(z * Float64(6.0 * Float64(y - x)))) end
function tmp = code(x, y, z) tmp = x + (z * (6.0 * (y - x))); end
code[x_, y_, z_] := N[(x + N[(z * N[(6.0 * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + z \cdot \left(6 \cdot \left(y - x\right)\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(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.8%
Taylor expanded in z around 0 38.0%
Final simplification38.0%
(FPCore (x y z) :precision binary64 (- x (* (* 6.0 z) (- x y))))
double code(double x, double y, double z) {
return x - ((6.0 * z) * (x - 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 - ((6.0d0 * z) * (x - y))
end function
public static double code(double x, double y, double z) {
return x - ((6.0 * z) * (x - y));
}
def code(x, y, z): return x - ((6.0 * z) * (x - y))
function code(x, y, z) return Float64(x - Float64(Float64(6.0 * z) * Float64(x - y))) end
function tmp = code(x, y, z) tmp = x - ((6.0 * z) * (x - y)); end
code[x_, y_, z_] := N[(x - N[(N[(6.0 * z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(6 \cdot z\right) \cdot \left(x - y\right)
\end{array}
herbie shell --seed 2023311
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
:precision binary64
:herbie-target
(- x (* (* 6.0 z) (- x y)))
(+ x (* (* (- y x) 6.0) z)))