
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.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) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.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) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (+ x (+ (* -6.0 (* z (- y x))) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0));
}
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))) + ((y - x) * 4.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0));
}
def code(x, y, z): return x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0))
function code(x, y, z) return Float64(x + Float64(Float64(-6.0 * Float64(z * Float64(y - x))) + Float64(Float64(y - x) * 4.0))) end
function tmp = code(x, y, z) tmp = x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0)); end
code[x_, y_, z_] := N[(x + N[(N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-6 \cdot \left(z \cdot \left(y - x\right)\right) + \left(y - x\right) \cdot 4\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (* y 4.0)))
(t_1 (* -6.0 (* z y)))
(t_2 (* x (* z 6.0)))
(t_3 (* 6.0 (* x z))))
(if (<= z -8e+129)
t_1
(if (<= z -1.7e+86)
t_3
(if (<= z -8.5e+68)
(* z (* -6.0 y))
(if (<= z -1.45e+41)
t_2
(if (<= z -0.0195)
t_1
(if (<= z -8.5e-292)
t_0
(if (<= z 1.85e-239)
(* x -3.0)
(if (<= z 6.1e-171)
t_0
(if (<= z 0.5)
(* x -3.0)
(if (<= z 9.5e+229)
t_2
(if (<= z 1.75e+303) t_1 t_3)))))))))))))
double code(double x, double y, double z) {
double t_0 = x + (y * 4.0);
double t_1 = -6.0 * (z * y);
double t_2 = x * (z * 6.0);
double t_3 = 6.0 * (x * z);
double tmp;
if (z <= -8e+129) {
tmp = t_1;
} else if (z <= -1.7e+86) {
tmp = t_3;
} else if (z <= -8.5e+68) {
tmp = z * (-6.0 * y);
} else if (z <= -1.45e+41) {
tmp = t_2;
} else if (z <= -0.0195) {
tmp = t_1;
} else if (z <= -8.5e-292) {
tmp = t_0;
} else if (z <= 1.85e-239) {
tmp = x * -3.0;
} else if (z <= 6.1e-171) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 9.5e+229) {
tmp = t_2;
} else if (z <= 1.75e+303) {
tmp = t_1;
} else {
tmp = t_3;
}
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 = x + (y * 4.0d0)
t_1 = (-6.0d0) * (z * y)
t_2 = x * (z * 6.0d0)
t_3 = 6.0d0 * (x * z)
if (z <= (-8d+129)) then
tmp = t_1
else if (z <= (-1.7d+86)) then
tmp = t_3
else if (z <= (-8.5d+68)) then
tmp = z * ((-6.0d0) * y)
else if (z <= (-1.45d+41)) then
tmp = t_2
else if (z <= (-0.0195d0)) then
tmp = t_1
else if (z <= (-8.5d-292)) then
tmp = t_0
else if (z <= 1.85d-239) then
tmp = x * (-3.0d0)
else if (z <= 6.1d-171) then
tmp = t_0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 9.5d+229) then
tmp = t_2
else if (z <= 1.75d+303) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y * 4.0);
double t_1 = -6.0 * (z * y);
double t_2 = x * (z * 6.0);
double t_3 = 6.0 * (x * z);
double tmp;
if (z <= -8e+129) {
tmp = t_1;
} else if (z <= -1.7e+86) {
tmp = t_3;
} else if (z <= -8.5e+68) {
tmp = z * (-6.0 * y);
} else if (z <= -1.45e+41) {
tmp = t_2;
} else if (z <= -0.0195) {
tmp = t_1;
} else if (z <= -8.5e-292) {
tmp = t_0;
} else if (z <= 1.85e-239) {
tmp = x * -3.0;
} else if (z <= 6.1e-171) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 9.5e+229) {
tmp = t_2;
} else if (z <= 1.75e+303) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y * 4.0) t_1 = -6.0 * (z * y) t_2 = x * (z * 6.0) t_3 = 6.0 * (x * z) tmp = 0 if z <= -8e+129: tmp = t_1 elif z <= -1.7e+86: tmp = t_3 elif z <= -8.5e+68: tmp = z * (-6.0 * y) elif z <= -1.45e+41: tmp = t_2 elif z <= -0.0195: tmp = t_1 elif z <= -8.5e-292: tmp = t_0 elif z <= 1.85e-239: tmp = x * -3.0 elif z <= 6.1e-171: tmp = t_0 elif z <= 0.5: tmp = x * -3.0 elif z <= 9.5e+229: tmp = t_2 elif z <= 1.75e+303: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y * 4.0)) t_1 = Float64(-6.0 * Float64(z * y)) t_2 = Float64(x * Float64(z * 6.0)) t_3 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -8e+129) tmp = t_1; elseif (z <= -1.7e+86) tmp = t_3; elseif (z <= -8.5e+68) tmp = Float64(z * Float64(-6.0 * y)); elseif (z <= -1.45e+41) tmp = t_2; elseif (z <= -0.0195) tmp = t_1; elseif (z <= -8.5e-292) tmp = t_0; elseif (z <= 1.85e-239) tmp = Float64(x * -3.0); elseif (z <= 6.1e-171) tmp = t_0; elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 9.5e+229) tmp = t_2; elseif (z <= 1.75e+303) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y * 4.0); t_1 = -6.0 * (z * y); t_2 = x * (z * 6.0); t_3 = 6.0 * (x * z); tmp = 0.0; if (z <= -8e+129) tmp = t_1; elseif (z <= -1.7e+86) tmp = t_3; elseif (z <= -8.5e+68) tmp = z * (-6.0 * y); elseif (z <= -1.45e+41) tmp = t_2; elseif (z <= -0.0195) tmp = t_1; elseif (z <= -8.5e-292) tmp = t_0; elseif (z <= 1.85e-239) tmp = x * -3.0; elseif (z <= 6.1e-171) tmp = t_0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 9.5e+229) tmp = t_2; elseif (z <= 1.75e+303) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+129], t$95$1, If[LessEqual[z, -1.7e+86], t$95$3, If[LessEqual[z, -8.5e+68], N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e+41], t$95$2, If[LessEqual[z, -0.0195], t$95$1, If[LessEqual[z, -8.5e-292], t$95$0, If[LessEqual[z, 1.85e-239], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.1e-171], t$95$0, If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 9.5e+229], t$95$2, If[LessEqual[z, 1.75e+303], t$95$1, t$95$3]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot 4\\
t_1 := -6 \cdot \left(z \cdot y\right)\\
t_2 := x \cdot \left(z \cdot 6\right)\\
t_3 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+86}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{+68}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+41}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -0.0195:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-292}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-239}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{-171}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+303}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -8e129 or -1.44999999999999994e41 < z < -0.0195 or 9.5e229 < z < 1.75000000000000008e303Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.9%
Taylor expanded in z around inf 96.8%
associate-*r*96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in y around inf 67.0%
if -8e129 < z < -1.6999999999999999e86 or 1.75000000000000008e303 < z Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 83.1%
fma-def83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
fma-neg82.8%
metadata-eval82.8%
fma-def82.8%
fma-udef83.1%
*-commutative83.1%
fma-udef82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in z around inf 100.0%
distribute-lft-in83.3%
associate-*r*83.1%
*-commutative83.1%
metadata-eval83.1%
distribute-lft-neg-in83.1%
distribute-lft-neg-in83.1%
distribute-rgt-neg-out83.1%
*-commutative83.1%
*-commutative83.1%
associate-*r*83.3%
distribute-rgt-out100.0%
*-commutative100.0%
distribute-rgt-in100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.6999999999999999e86 < z < -8.49999999999999966e68Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 85.5%
fma-def85.3%
*-commutative85.3%
+-commutative85.3%
*-commutative85.3%
fma-neg85.3%
metadata-eval85.3%
fma-def85.3%
fma-udef85.3%
*-commutative85.3%
fma-udef85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in z around inf 100.0%
distribute-lft-in85.7%
associate-*r*85.7%
*-commutative85.7%
metadata-eval85.7%
distribute-lft-neg-in85.7%
distribute-lft-neg-in85.7%
distribute-rgt-neg-out85.7%
*-commutative85.7%
*-commutative85.7%
associate-*r*85.7%
distribute-rgt-out100.0%
*-commutative100.0%
distribute-rgt-in100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 86.3%
if -8.49999999999999966e68 < z < -1.44999999999999994e41 or 0.5 < z < 9.5e229Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 61.6%
sub-neg61.6%
distribute-rgt-in61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-lft-neg-in61.6%
associate-+r+61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-rgt-neg-in61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in z around inf 61.6%
if -0.0195 < z < -8.50000000000000066e-292 or 1.85000000000000008e-239 < z < 6.1e-171Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 58.7%
associate-*r*58.7%
Simplified58.7%
Taylor expanded in z around 0 57.1%
*-commutative57.1%
Simplified57.1%
if -8.50000000000000066e-292 < z < 1.85000000000000008e-239 or 6.1e-171 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 65.6%
sub-neg65.6%
distribute-rgt-in65.7%
metadata-eval65.7%
metadata-eval65.7%
distribute-lft-neg-in65.7%
associate-+r+65.7%
metadata-eval65.7%
metadata-eval65.7%
distribute-rgt-neg-in65.7%
metadata-eval65.7%
Simplified65.7%
Taylor expanded in z around 0 64.1%
*-commutative64.1%
Simplified64.1%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))) (t_1 (* 6.0 (* x z))))
(if (<= z -1.3e+128)
t_0
(if (<= z -1.26e+85)
t_1
(if (<= z -1.36e+69)
t_0
(if (<= z -3.5e+37)
t_1
(if (<= z -900.0)
t_0
(if (<= z 0.5)
(* x -3.0)
(if (or (<= z 8.8e+229) (not (<= z 2.7e+296))) t_1 t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.3e+128) {
tmp = t_0;
} else if (z <= -1.26e+85) {
tmp = t_1;
} else if (z <= -1.36e+69) {
tmp = t_0;
} else if (z <= -3.5e+37) {
tmp = t_1;
} else if (z <= -900.0) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if ((z <= 8.8e+229) || !(z <= 2.7e+296)) {
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) * (z * y)
t_1 = 6.0d0 * (x * z)
if (z <= (-1.3d+128)) then
tmp = t_0
else if (z <= (-1.26d+85)) then
tmp = t_1
else if (z <= (-1.36d+69)) then
tmp = t_0
else if (z <= (-3.5d+37)) then
tmp = t_1
else if (z <= (-900.0d0)) then
tmp = t_0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if ((z <= 8.8d+229) .or. (.not. (z <= 2.7d+296))) 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 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.3e+128) {
tmp = t_0;
} else if (z <= -1.26e+85) {
tmp = t_1;
} else if (z <= -1.36e+69) {
tmp = t_0;
} else if (z <= -3.5e+37) {
tmp = t_1;
} else if (z <= -900.0) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if ((z <= 8.8e+229) || !(z <= 2.7e+296)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) t_1 = 6.0 * (x * z) tmp = 0 if z <= -1.3e+128: tmp = t_0 elif z <= -1.26e+85: tmp = t_1 elif z <= -1.36e+69: tmp = t_0 elif z <= -3.5e+37: tmp = t_1 elif z <= -900.0: tmp = t_0 elif z <= 0.5: tmp = x * -3.0 elif (z <= 8.8e+229) or not (z <= 2.7e+296): tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.3e+128) tmp = t_0; elseif (z <= -1.26e+85) tmp = t_1; elseif (z <= -1.36e+69) tmp = t_0; elseif (z <= -3.5e+37) tmp = t_1; elseif (z <= -900.0) tmp = t_0; elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif ((z <= 8.8e+229) || !(z <= 2.7e+296)) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.3e+128) tmp = t_0; elseif (z <= -1.26e+85) tmp = t_1; elseif (z <= -1.36e+69) tmp = t_0; elseif (z <= -3.5e+37) tmp = t_1; elseif (z <= -900.0) tmp = t_0; elseif (z <= 0.5) tmp = x * -3.0; elseif ((z <= 8.8e+229) || ~((z <= 2.7e+296))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+128], t$95$0, If[LessEqual[z, -1.26e+85], t$95$1, If[LessEqual[z, -1.36e+69], t$95$0, If[LessEqual[z, -3.5e+37], t$95$1, If[LessEqual[z, -900.0], t$95$0, If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 8.8e+229], N[Not[LessEqual[z, 2.7e+296]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.26 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{+69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -900:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+229} \lor \neg \left(z \leq 2.7 \cdot 10^{+296}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -1.3e128 or -1.26000000000000003e85 < z < -1.36000000000000006e69 or -3.5e37 < z < -900 or 8.80000000000000014e229 < z < 2.69999999999999986e296Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in z around inf 99.8%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 71.9%
if -1.3e128 < z < -1.26000000000000003e85 or -1.36000000000000006e69 < z < -3.5e37 or 0.5 < z < 8.80000000000000014e229 or 2.69999999999999986e296 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 96.5%
fma-def96.5%
*-commutative96.5%
+-commutative96.5%
*-commutative96.5%
fma-neg96.6%
metadata-eval96.6%
fma-def96.6%
fma-udef96.5%
*-commutative96.5%
fma-udef96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in z around inf 99.6%
distribute-lft-in96.4%
associate-*r*96.5%
*-commutative96.5%
metadata-eval96.5%
distribute-lft-neg-in96.5%
distribute-lft-neg-in96.5%
distribute-rgt-neg-out96.5%
*-commutative96.5%
*-commutative96.5%
associate-*r*96.4%
distribute-rgt-out99.6%
*-commutative99.6%
distribute-rgt-in99.6%
sub-neg99.6%
Simplified99.6%
Taylor expanded in y around 0 65.2%
*-commutative65.2%
Simplified65.2%
if -900 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 50.2%
sub-neg50.2%
distribute-rgt-in50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-+r+50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-rgt-neg-in50.2%
metadata-eval50.2%
Simplified50.2%
Taylor expanded in z around 0 48.2%
*-commutative48.2%
Simplified48.2%
Final simplification57.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))) (t_1 (* x (* z 6.0))) (t_2 (* 6.0 (* x z))))
(if (<= z -1.95e+127)
t_0
(if (<= z -5.2e+93)
t_2
(if (<= z -5.5e+67)
t_0
(if (<= z -2.6e+37)
t_1
(if (<= z -900.0)
t_0
(if (<= z 0.5)
(* x -3.0)
(if (<= z 1.75e+227) t_1 (if (<= z 4.5e+295) t_0 t_2))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = x * (z * 6.0);
double t_2 = 6.0 * (x * z);
double tmp;
if (z <= -1.95e+127) {
tmp = t_0;
} else if (z <= -5.2e+93) {
tmp = t_2;
} else if (z <= -5.5e+67) {
tmp = t_0;
} else if (z <= -2.6e+37) {
tmp = t_1;
} else if (z <= -900.0) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 1.75e+227) {
tmp = t_1;
} else if (z <= 4.5e+295) {
tmp = t_0;
} else {
tmp = t_2;
}
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 = (-6.0d0) * (z * y)
t_1 = x * (z * 6.0d0)
t_2 = 6.0d0 * (x * z)
if (z <= (-1.95d+127)) then
tmp = t_0
else if (z <= (-5.2d+93)) then
tmp = t_2
else if (z <= (-5.5d+67)) then
tmp = t_0
else if (z <= (-2.6d+37)) then
tmp = t_1
else if (z <= (-900.0d0)) then
tmp = t_0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 1.75d+227) then
tmp = t_1
else if (z <= 4.5d+295) then
tmp = t_0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = x * (z * 6.0);
double t_2 = 6.0 * (x * z);
double tmp;
if (z <= -1.95e+127) {
tmp = t_0;
} else if (z <= -5.2e+93) {
tmp = t_2;
} else if (z <= -5.5e+67) {
tmp = t_0;
} else if (z <= -2.6e+37) {
tmp = t_1;
} else if (z <= -900.0) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 1.75e+227) {
tmp = t_1;
} else if (z <= 4.5e+295) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) t_1 = x * (z * 6.0) t_2 = 6.0 * (x * z) tmp = 0 if z <= -1.95e+127: tmp = t_0 elif z <= -5.2e+93: tmp = t_2 elif z <= -5.5e+67: tmp = t_0 elif z <= -2.6e+37: tmp = t_1 elif z <= -900.0: tmp = t_0 elif z <= 0.5: tmp = x * -3.0 elif z <= 1.75e+227: tmp = t_1 elif z <= 4.5e+295: tmp = t_0 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) t_1 = Float64(x * Float64(z * 6.0)) t_2 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.95e+127) tmp = t_0; elseif (z <= -5.2e+93) tmp = t_2; elseif (z <= -5.5e+67) tmp = t_0; elseif (z <= -2.6e+37) tmp = t_1; elseif (z <= -900.0) tmp = t_0; elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 1.75e+227) tmp = t_1; elseif (z <= 4.5e+295) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); t_1 = x * (z * 6.0); t_2 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.95e+127) tmp = t_0; elseif (z <= -5.2e+93) tmp = t_2; elseif (z <= -5.5e+67) tmp = t_0; elseif (z <= -2.6e+37) tmp = t_1; elseif (z <= -900.0) tmp = t_0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 1.75e+227) tmp = t_1; elseif (z <= 4.5e+295) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+127], t$95$0, If[LessEqual[z, -5.2e+93], t$95$2, If[LessEqual[z, -5.5e+67], t$95$0, If[LessEqual[z, -2.6e+37], t$95$1, If[LessEqual[z, -900.0], t$95$0, If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.75e+227], t$95$1, If[LessEqual[z, 4.5e+295], t$95$0, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
t_2 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+127}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{+67}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -900:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+227}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+295}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.94999999999999991e127 or -5.19999999999999999e93 < z < -5.49999999999999968e67 or -2.5999999999999999e37 < z < -900 or 1.75e227 < z < 4.5000000000000004e295Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in z around inf 99.8%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 71.9%
if -1.94999999999999991e127 < z < -5.19999999999999999e93 or 4.5000000000000004e295 < z Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 83.1%
fma-def83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
fma-neg82.8%
metadata-eval82.8%
fma-def82.8%
fma-udef83.1%
*-commutative83.1%
fma-udef82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in z around inf 100.0%
distribute-lft-in83.3%
associate-*r*83.1%
*-commutative83.1%
metadata-eval83.1%
distribute-lft-neg-in83.1%
distribute-lft-neg-in83.1%
distribute-rgt-neg-out83.1%
*-commutative83.1%
*-commutative83.1%
associate-*r*83.3%
distribute-rgt-out100.0%
*-commutative100.0%
distribute-rgt-in100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -5.49999999999999968e67 < z < -2.5999999999999999e37 or 0.5 < z < 1.75e227Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 61.6%
sub-neg61.6%
distribute-rgt-in61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-lft-neg-in61.6%
associate-+r+61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-rgt-neg-in61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in z around inf 61.6%
if -900 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 50.2%
sub-neg50.2%
distribute-rgt-in50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-+r+50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-rgt-neg-in50.2%
metadata-eval50.2%
Simplified50.2%
Taylor expanded in z around 0 48.2%
*-commutative48.2%
Simplified48.2%
Final simplification57.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))) (t_1 (* x (* z 6.0))) (t_2 (* 6.0 (* x z))))
(if (<= z -2.1e+129)
t_0
(if (<= z -2.1e+91)
t_2
(if (<= z -2.25e+70)
(* z (* -6.0 y))
(if (<= z -2.1e+38)
t_1
(if (<= z -900.0)
t_0
(if (<= z 0.5)
(* x -3.0)
(if (<= z 4.25e+226) t_1 (if (<= z 1.1e+291) t_0 t_2))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = x * (z * 6.0);
double t_2 = 6.0 * (x * z);
double tmp;
if (z <= -2.1e+129) {
tmp = t_0;
} else if (z <= -2.1e+91) {
tmp = t_2;
} else if (z <= -2.25e+70) {
tmp = z * (-6.0 * y);
} else if (z <= -2.1e+38) {
tmp = t_1;
} else if (z <= -900.0) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 4.25e+226) {
tmp = t_1;
} else if (z <= 1.1e+291) {
tmp = t_0;
} else {
tmp = t_2;
}
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 = (-6.0d0) * (z * y)
t_1 = x * (z * 6.0d0)
t_2 = 6.0d0 * (x * z)
if (z <= (-2.1d+129)) then
tmp = t_0
else if (z <= (-2.1d+91)) then
tmp = t_2
else if (z <= (-2.25d+70)) then
tmp = z * ((-6.0d0) * y)
else if (z <= (-2.1d+38)) then
tmp = t_1
else if (z <= (-900.0d0)) then
tmp = t_0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 4.25d+226) then
tmp = t_1
else if (z <= 1.1d+291) then
tmp = t_0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = x * (z * 6.0);
double t_2 = 6.0 * (x * z);
double tmp;
if (z <= -2.1e+129) {
tmp = t_0;
} else if (z <= -2.1e+91) {
tmp = t_2;
} else if (z <= -2.25e+70) {
tmp = z * (-6.0 * y);
} else if (z <= -2.1e+38) {
tmp = t_1;
} else if (z <= -900.0) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 4.25e+226) {
tmp = t_1;
} else if (z <= 1.1e+291) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) t_1 = x * (z * 6.0) t_2 = 6.0 * (x * z) tmp = 0 if z <= -2.1e+129: tmp = t_0 elif z <= -2.1e+91: tmp = t_2 elif z <= -2.25e+70: tmp = z * (-6.0 * y) elif z <= -2.1e+38: tmp = t_1 elif z <= -900.0: tmp = t_0 elif z <= 0.5: tmp = x * -3.0 elif z <= 4.25e+226: tmp = t_1 elif z <= 1.1e+291: tmp = t_0 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) t_1 = Float64(x * Float64(z * 6.0)) t_2 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -2.1e+129) tmp = t_0; elseif (z <= -2.1e+91) tmp = t_2; elseif (z <= -2.25e+70) tmp = Float64(z * Float64(-6.0 * y)); elseif (z <= -2.1e+38) tmp = t_1; elseif (z <= -900.0) tmp = t_0; elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 4.25e+226) tmp = t_1; elseif (z <= 1.1e+291) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); t_1 = x * (z * 6.0); t_2 = 6.0 * (x * z); tmp = 0.0; if (z <= -2.1e+129) tmp = t_0; elseif (z <= -2.1e+91) tmp = t_2; elseif (z <= -2.25e+70) tmp = z * (-6.0 * y); elseif (z <= -2.1e+38) tmp = t_1; elseif (z <= -900.0) tmp = t_0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 4.25e+226) tmp = t_1; elseif (z <= 1.1e+291) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+129], t$95$0, If[LessEqual[z, -2.1e+91], t$95$2, If[LessEqual[z, -2.25e+70], N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e+38], t$95$1, If[LessEqual[z, -900.0], t$95$0, If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.25e+226], t$95$1, If[LessEqual[z, 1.1e+291], t$95$0, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
t_2 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{+91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{+70}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -900:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.25 \cdot 10^{+226}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+291}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.09999999999999997e129 or -2.1e38 < z < -900 or 4.24999999999999987e226 < z < 1.1e291Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in z around inf 99.8%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 69.8%
if -2.09999999999999997e129 < z < -2.10000000000000008e91 or 1.1e291 < z Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 83.1%
fma-def83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
fma-neg82.8%
metadata-eval82.8%
fma-def82.8%
fma-udef83.1%
*-commutative83.1%
fma-udef82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in z around inf 100.0%
distribute-lft-in83.3%
associate-*r*83.1%
*-commutative83.1%
metadata-eval83.1%
distribute-lft-neg-in83.1%
distribute-lft-neg-in83.1%
distribute-rgt-neg-out83.1%
*-commutative83.1%
*-commutative83.1%
associate-*r*83.3%
distribute-rgt-out100.0%
*-commutative100.0%
distribute-rgt-in100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -2.10000000000000008e91 < z < -2.25e70Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 85.5%
fma-def85.3%
*-commutative85.3%
+-commutative85.3%
*-commutative85.3%
fma-neg85.3%
metadata-eval85.3%
fma-def85.3%
fma-udef85.3%
*-commutative85.3%
fma-udef85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in z around inf 100.0%
distribute-lft-in85.7%
associate-*r*85.7%
*-commutative85.7%
metadata-eval85.7%
distribute-lft-neg-in85.7%
distribute-lft-neg-in85.7%
distribute-rgt-neg-out85.7%
*-commutative85.7%
*-commutative85.7%
associate-*r*85.7%
distribute-rgt-out100.0%
*-commutative100.0%
distribute-rgt-in100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 86.3%
if -2.25e70 < z < -2.1e38 or 0.5 < z < 4.24999999999999987e226Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 61.6%
sub-neg61.6%
distribute-rgt-in61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-lft-neg-in61.6%
associate-+r+61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-rgt-neg-in61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in z around inf 61.6%
if -900 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 50.2%
sub-neg50.2%
distribute-rgt-in50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-+r+50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-rgt-neg-in50.2%
metadata-eval50.2%
Simplified50.2%
Taylor expanded in z around 0 48.2%
*-commutative48.2%
Simplified48.2%
Final simplification57.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (* y 4.0))) (t_1 (* -6.0 (* z (- y x)))))
(if (<= z -0.0048)
t_1
(if (<= z -2e-290)
t_0
(if (<= z 2.6e-239)
(* x -3.0)
(if (<= z 7.2e-171) t_0 (if (<= z 0.5) (* x -3.0) t_1)))))))
double code(double x, double y, double z) {
double t_0 = x + (y * 4.0);
double t_1 = -6.0 * (z * (y - x));
double tmp;
if (z <= -0.0048) {
tmp = t_1;
} else if (z <= -2e-290) {
tmp = t_0;
} else if (z <= 2.6e-239) {
tmp = x * -3.0;
} else if (z <= 7.2e-171) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.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) :: tmp
t_0 = x + (y * 4.0d0)
t_1 = (-6.0d0) * (z * (y - x))
if (z <= (-0.0048d0)) then
tmp = t_1
else if (z <= (-2d-290)) then
tmp = t_0
else if (z <= 2.6d-239) then
tmp = x * (-3.0d0)
else if (z <= 7.2d-171) then
tmp = t_0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y * 4.0);
double t_1 = -6.0 * (z * (y - x));
double tmp;
if (z <= -0.0048) {
tmp = t_1;
} else if (z <= -2e-290) {
tmp = t_0;
} else if (z <= 2.6e-239) {
tmp = x * -3.0;
} else if (z <= 7.2e-171) {
tmp = t_0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y * 4.0) t_1 = -6.0 * (z * (y - x)) tmp = 0 if z <= -0.0048: tmp = t_1 elif z <= -2e-290: tmp = t_0 elif z <= 2.6e-239: tmp = x * -3.0 elif z <= 7.2e-171: tmp = t_0 elif z <= 0.5: tmp = x * -3.0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y * 4.0)) t_1 = Float64(-6.0 * Float64(z * Float64(y - x))) tmp = 0.0 if (z <= -0.0048) tmp = t_1; elseif (z <= -2e-290) tmp = t_0; elseif (z <= 2.6e-239) tmp = Float64(x * -3.0); elseif (z <= 7.2e-171) tmp = t_0; elseif (z <= 0.5) tmp = Float64(x * -3.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y * 4.0); t_1 = -6.0 * (z * (y - x)); tmp = 0.0; if (z <= -0.0048) tmp = t_1; elseif (z <= -2e-290) tmp = t_0; elseif (z <= 2.6e-239) tmp = x * -3.0; elseif (z <= 7.2e-171) tmp = t_0; elseif (z <= 0.5) tmp = x * -3.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0048], t$95$1, If[LessEqual[z, -2e-290], t$95$0, If[LessEqual[z, 2.6e-239], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.2e-171], t$95$0, If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot 4\\
t_1 := -6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -0.0048:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-290}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-239}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-171}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -0.00479999999999999958 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.5%
if -0.00479999999999999958 < z < -2.0000000000000001e-290 or 2.60000000000000003e-239 < z < 7.20000000000000006e-171Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 58.7%
associate-*r*58.7%
Simplified58.7%
Taylor expanded in z around 0 57.1%
*-commutative57.1%
Simplified57.1%
if -2.0000000000000001e-290 < z < 2.60000000000000003e-239 or 7.20000000000000006e-171 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 65.6%
sub-neg65.6%
distribute-rgt-in65.7%
metadata-eval65.7%
metadata-eval65.7%
distribute-lft-neg-in65.7%
associate-+r+65.7%
metadata-eval65.7%
metadata-eval65.7%
distribute-rgt-neg-in65.7%
metadata-eval65.7%
Simplified65.7%
Taylor expanded in z around 0 64.1%
*-commutative64.1%
Simplified64.1%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (* y 4.0))) (t_1 (* -6.0 (* z (- y x)))))
(if (<= z -0.0028)
t_1
(if (<= z -7.8e-291)
t_0
(if (<= z 2.2e-239)
(* x -3.0)
(if (<= z 8.5e-171)
t_0
(if (<= z 1.75e+15) (* x (+ -3.0 (* z 6.0))) t_1)))))))
double code(double x, double y, double z) {
double t_0 = x + (y * 4.0);
double t_1 = -6.0 * (z * (y - x));
double tmp;
if (z <= -0.0028) {
tmp = t_1;
} else if (z <= -7.8e-291) {
tmp = t_0;
} else if (z <= 2.2e-239) {
tmp = x * -3.0;
} else if (z <= 8.5e-171) {
tmp = t_0;
} else if (z <= 1.75e+15) {
tmp = x * (-3.0 + (z * 6.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) :: tmp
t_0 = x + (y * 4.0d0)
t_1 = (-6.0d0) * (z * (y - x))
if (z <= (-0.0028d0)) then
tmp = t_1
else if (z <= (-7.8d-291)) then
tmp = t_0
else if (z <= 2.2d-239) then
tmp = x * (-3.0d0)
else if (z <= 8.5d-171) then
tmp = t_0
else if (z <= 1.75d+15) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y * 4.0);
double t_1 = -6.0 * (z * (y - x));
double tmp;
if (z <= -0.0028) {
tmp = t_1;
} else if (z <= -7.8e-291) {
tmp = t_0;
} else if (z <= 2.2e-239) {
tmp = x * -3.0;
} else if (z <= 8.5e-171) {
tmp = t_0;
} else if (z <= 1.75e+15) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y * 4.0) t_1 = -6.0 * (z * (y - x)) tmp = 0 if z <= -0.0028: tmp = t_1 elif z <= -7.8e-291: tmp = t_0 elif z <= 2.2e-239: tmp = x * -3.0 elif z <= 8.5e-171: tmp = t_0 elif z <= 1.75e+15: tmp = x * (-3.0 + (z * 6.0)) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y * 4.0)) t_1 = Float64(-6.0 * Float64(z * Float64(y - x))) tmp = 0.0 if (z <= -0.0028) tmp = t_1; elseif (z <= -7.8e-291) tmp = t_0; elseif (z <= 2.2e-239) tmp = Float64(x * -3.0); elseif (z <= 8.5e-171) tmp = t_0; elseif (z <= 1.75e+15) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y * 4.0); t_1 = -6.0 * (z * (y - x)); tmp = 0.0; if (z <= -0.0028) tmp = t_1; elseif (z <= -7.8e-291) tmp = t_0; elseif (z <= 2.2e-239) tmp = x * -3.0; elseif (z <= 8.5e-171) tmp = t_0; elseif (z <= 1.75e+15) tmp = x * (-3.0 + (z * 6.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0028], t$95$1, If[LessEqual[z, -7.8e-291], t$95$0, If[LessEqual[z, 2.2e-239], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.5e-171], t$95$0, If[LessEqual[z, 1.75e+15], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + y \cdot 4\\
t_1 := -6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -0.0028:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-291}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-239}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-171}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+15}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -0.00279999999999999997 or 1.75e15 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.5%
if -0.00279999999999999997 < z < -7.80000000000000031e-291 or 2.19999999999999983e-239 < z < 8.50000000000000032e-171Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 58.7%
associate-*r*58.7%
Simplified58.7%
Taylor expanded in z around 0 57.1%
*-commutative57.1%
Simplified57.1%
if -7.80000000000000031e-291 < z < 2.19999999999999983e-239Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 69.8%
sub-neg69.8%
distribute-rgt-in69.8%
metadata-eval69.8%
metadata-eval69.8%
distribute-lft-neg-in69.8%
associate-+r+69.8%
metadata-eval69.8%
metadata-eval69.8%
distribute-rgt-neg-in69.8%
metadata-eval69.8%
Simplified69.8%
Taylor expanded in z around 0 69.8%
*-commutative69.8%
Simplified69.8%
if 8.50000000000000032e-171 < z < 1.75e15Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 64.5%
sub-neg64.5%
distribute-rgt-in64.6%
metadata-eval64.6%
metadata-eval64.6%
distribute-lft-neg-in64.6%
associate-+r+64.6%
metadata-eval64.6%
metadata-eval64.6%
distribute-rgt-neg-in64.6%
metadata-eval64.6%
Simplified64.6%
Final simplification77.9%
(FPCore (x y z)
:precision binary64
(if (or (<= y -3.9e+111)
(not
(or (<= y -2.7e-33) (and (not (<= y -2.95e-95)) (<= y 4.2e+45)))))
(* y (+ 4.0 (* -6.0 z)))
(* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.9e+111) || !((y <= -2.7e-33) || (!(y <= -2.95e-95) && (y <= 4.2e+45)))) {
tmp = y * (4.0 + (-6.0 * z));
} else {
tmp = x * (-3.0 + (z * 6.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) :: tmp
if ((y <= (-3.9d+111)) .or. (.not. (y <= (-2.7d-33)) .or. (.not. (y <= (-2.95d-95))) .and. (y <= 4.2d+45))) then
tmp = y * (4.0d0 + ((-6.0d0) * z))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -3.9e+111) || !((y <= -2.7e-33) || (!(y <= -2.95e-95) && (y <= 4.2e+45)))) {
tmp = y * (4.0 + (-6.0 * z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.9e+111) or not ((y <= -2.7e-33) or (not (y <= -2.95e-95) and (y <= 4.2e+45))): tmp = y * (4.0 + (-6.0 * z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.9e+111) || !((y <= -2.7e-33) || (!(y <= -2.95e-95) && (y <= 4.2e+45)))) tmp = Float64(y * Float64(4.0 + Float64(-6.0 * z))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -3.9e+111) || ~(((y <= -2.7e-33) || (~((y <= -2.95e-95)) && (y <= 4.2e+45))))) tmp = y * (4.0 + (-6.0 * z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.9e+111], N[Not[Or[LessEqual[y, -2.7e-33], And[N[Not[LessEqual[y, -2.95e-95]], $MachinePrecision], LessEqual[y, 4.2e+45]]]], $MachinePrecision]], N[(y * N[(4.0 + N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+111} \lor \neg \left(y \leq -2.7 \cdot 10^{-33} \lor \neg \left(y \leq -2.95 \cdot 10^{-95}\right) \land y \leq 4.2 \cdot 10^{+45}\right):\\
\;\;\;\;y \cdot \left(4 + -6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -3.89999999999999979e111 or -2.7000000000000001e-33 < y < -2.9499999999999999e-95 or 4.1999999999999999e45 < y Initial program 99.7%
+-commutative99.7%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 88.4%
if -3.89999999999999979e111 < y < -2.7000000000000001e-33 or -2.9499999999999999e-95 < y < 4.1999999999999999e45Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 73.1%
sub-neg73.1%
distribute-rgt-in73.1%
metadata-eval73.1%
metadata-eval73.1%
distribute-lft-neg-in73.1%
associate-+r+73.1%
metadata-eval73.1%
metadata-eval73.1%
distribute-rgt-neg-in73.1%
metadata-eval73.1%
Simplified73.1%
Final simplification79.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.52) (not (<= z 0.5))) (* -6.0 (* z (- y x))) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.52) || !(z <= 0.5)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = x + ((y - x) * 4.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) :: tmp
if ((z <= (-0.52d0)) .or. (.not. (z <= 0.5d0))) then
tmp = (-6.0d0) * (z * (y - x))
else
tmp = x + ((y - x) * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.52) || !(z <= 0.5)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.52) or not (z <= 0.5): tmp = -6.0 * (z * (y - x)) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.52) || !(z <= 0.5)) tmp = Float64(-6.0 * Float64(z * Float64(y - x))); else tmp = Float64(x + Float64(Float64(y - x) * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.52) || ~((z <= 0.5))) tmp = -6.0 * (z * (y - x)); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.52], N[Not[LessEqual[z, 0.5]], $MachinePrecision]], N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.52 \lor \neg \left(z \leq 0.5\right):\\
\;\;\;\;-6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.52000000000000002 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.2%
if -0.52000000000000002 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 97.1%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.6) (not (<= z 0.55))) (* -6.0 (* z (- y x))) (+ (* y 4.0) (* x -3.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.55)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = (y * 4.0) + (x * -3.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) :: tmp
if ((z <= (-0.6d0)) .or. (.not. (z <= 0.55d0))) then
tmp = (-6.0d0) * (z * (y - x))
else
tmp = (y * 4.0d0) + (x * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.55)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = (y * 4.0) + (x * -3.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.6) or not (z <= 0.55): tmp = -6.0 * (z * (y - x)) else: tmp = (y * 4.0) + (x * -3.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.6) || !(z <= 0.55)) tmp = Float64(-6.0 * Float64(z * Float64(y - x))); else tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.6) || ~((z <= 0.55))) tmp = -6.0 * (z * (y - x)); else tmp = (y * 4.0) + (x * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.6], N[Not[LessEqual[z, 0.55]], $MachinePrecision]], N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6 \lor \neg \left(z \leq 0.55\right):\\
\;\;\;\;-6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\end{array}
\end{array}
if z < -0.599999999999999978 or 0.55000000000000004 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.2%
if -0.599999999999999978 < z < 0.55000000000000004Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 99.8%
fma-def99.8%
*-commutative99.8%
+-commutative99.8%
*-commutative99.8%
fma-neg99.8%
metadata-eval99.8%
fma-def99.9%
fma-udef99.9%
*-commutative99.9%
fma-udef99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 97.1%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -900.0) (not (<= z 0.5))) (* -6.0 (* z y)) (* x -3.0)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -900.0) || !(z <= 0.5)) {
tmp = -6.0 * (z * y);
} else {
tmp = x * -3.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) :: tmp
if ((z <= (-900.0d0)) .or. (.not. (z <= 0.5d0))) then
tmp = (-6.0d0) * (z * y)
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -900.0) || !(z <= 0.5)) {
tmp = -6.0 * (z * y);
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -900.0) or not (z <= 0.5): tmp = -6.0 * (z * y) else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -900.0) || !(z <= 0.5)) tmp = Float64(-6.0 * Float64(z * y)); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -900.0) || ~((z <= 0.5))) tmp = -6.0 * (z * y); else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -900.0], N[Not[LessEqual[z, 0.5]], $MachinePrecision]], N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -900 \lor \neg \left(z \leq 0.5\right):\\
\;\;\;\;-6 \cdot \left(z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if z < -900 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.7%
associate-*r*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 54.9%
if -900 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 50.2%
sub-neg50.2%
distribute-rgt-in50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-+r+50.2%
metadata-eval50.2%
metadata-eval50.2%
distribute-rgt-neg-in50.2%
metadata-eval50.2%
Simplified50.2%
Taylor expanded in z around 0 48.2%
*-commutative48.2%
Simplified48.2%
Final simplification51.3%
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - 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) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (* x -3.0))
double code(double x, double y, double z) {
return x * -3.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-3.0d0)
end function
public static double code(double x, double y, double z) {
return x * -3.0;
}
def code(x, y, z): return x * -3.0
function code(x, y, z) return Float64(x * -3.0) end
function tmp = code(x, y, z) tmp = x * -3.0; end
code[x_, y_, z_] := N[(x * -3.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -3
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 50.8%
sub-neg50.8%
distribute-rgt-in50.9%
metadata-eval50.9%
metadata-eval50.9%
distribute-lft-neg-in50.9%
associate-+r+50.9%
metadata-eval50.9%
metadata-eval50.9%
distribute-rgt-neg-in50.9%
metadata-eval50.9%
Simplified50.9%
Taylor expanded in z around 0 27.3%
*-commutative27.3%
Simplified27.3%
Final simplification27.3%
(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.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 52.2%
associate-*r*52.2%
Simplified52.2%
Taylor expanded in x around inf 2.9%
Final simplification2.9%
herbie shell --seed 2024024
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
:precision binary64
(+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))