
(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 16 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 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)
\end{array}
Initial program 99.5%
+-commutative99.5%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -5.2e+267)
t_0
(if (<= z -1.02e+225)
t_1
(if (<= z -2.7e+181)
t_0
(if (<= z -5.6e+107)
t_1
(if (<= z -0.68)
t_0
(if (<= z -1.95e-148)
(* y 4.0)
(if (<= z -2.8e-214)
(* x -3.0)
(if (<= z -3.8e-298)
(* y 4.0)
(if (<= z 4.3e-215)
(* x -3.0)
(if (<= z 1.05e-57)
(* y 4.0)
(if (<= z 3.5e-24)
(* x -3.0)
(if (<= z 0.66)
(* y 4.0)
(if (or (<= z 4.6e+29) (not (<= z 1.56e+90)))
t_0
t_1)))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -5.2e+267) {
tmp = t_0;
} else if (z <= -1.02e+225) {
tmp = t_1;
} else if (z <= -2.7e+181) {
tmp = t_0;
} else if (z <= -5.6e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -1.95e-148) {
tmp = y * 4.0;
} else if (z <= -2.8e-214) {
tmp = x * -3.0;
} else if (z <= -3.8e-298) {
tmp = y * 4.0;
} else if (z <= 4.3e-215) {
tmp = x * -3.0;
} else if (z <= 1.05e-57) {
tmp = y * 4.0;
} else if (z <= 3.5e-24) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if ((z <= 4.6e+29) || !(z <= 1.56e+90)) {
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) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-5.2d+267)) then
tmp = t_0
else if (z <= (-1.02d+225)) then
tmp = t_1
else if (z <= (-2.7d+181)) then
tmp = t_0
else if (z <= (-5.6d+107)) then
tmp = t_1
else if (z <= (-0.68d0)) then
tmp = t_0
else if (z <= (-1.95d-148)) then
tmp = y * 4.0d0
else if (z <= (-2.8d-214)) then
tmp = x * (-3.0d0)
else if (z <= (-3.8d-298)) then
tmp = y * 4.0d0
else if (z <= 4.3d-215) then
tmp = x * (-3.0d0)
else if (z <= 1.05d-57) then
tmp = y * 4.0d0
else if (z <= 3.5d-24) then
tmp = x * (-3.0d0)
else if (z <= 0.66d0) then
tmp = y * 4.0d0
else if ((z <= 4.6d+29) .or. (.not. (z <= 1.56d+90))) 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 = 6.0 * (x * z);
double tmp;
if (z <= -5.2e+267) {
tmp = t_0;
} else if (z <= -1.02e+225) {
tmp = t_1;
} else if (z <= -2.7e+181) {
tmp = t_0;
} else if (z <= -5.6e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -1.95e-148) {
tmp = y * 4.0;
} else if (z <= -2.8e-214) {
tmp = x * -3.0;
} else if (z <= -3.8e-298) {
tmp = y * 4.0;
} else if (z <= 4.3e-215) {
tmp = x * -3.0;
} else if (z <= 1.05e-57) {
tmp = y * 4.0;
} else if (z <= 3.5e-24) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if ((z <= 4.6e+29) || !(z <= 1.56e+90)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -5.2e+267: tmp = t_0 elif z <= -1.02e+225: tmp = t_1 elif z <= -2.7e+181: tmp = t_0 elif z <= -5.6e+107: tmp = t_1 elif z <= -0.68: tmp = t_0 elif z <= -1.95e-148: tmp = y * 4.0 elif z <= -2.8e-214: tmp = x * -3.0 elif z <= -3.8e-298: tmp = y * 4.0 elif z <= 4.3e-215: tmp = x * -3.0 elif z <= 1.05e-57: tmp = y * 4.0 elif z <= 3.5e-24: tmp = x * -3.0 elif z <= 0.66: tmp = y * 4.0 elif (z <= 4.6e+29) or not (z <= 1.56e+90): tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -5.2e+267) tmp = t_0; elseif (z <= -1.02e+225) tmp = t_1; elseif (z <= -2.7e+181) tmp = t_0; elseif (z <= -5.6e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -1.95e-148) tmp = Float64(y * 4.0); elseif (z <= -2.8e-214) tmp = Float64(x * -3.0); elseif (z <= -3.8e-298) tmp = Float64(y * 4.0); elseif (z <= 4.3e-215) tmp = Float64(x * -3.0); elseif (z <= 1.05e-57) tmp = Float64(y * 4.0); elseif (z <= 3.5e-24) tmp = Float64(x * -3.0); elseif (z <= 0.66) tmp = Float64(y * 4.0); elseif ((z <= 4.6e+29) || !(z <= 1.56e+90)) 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 = 6.0 * (x * z); tmp = 0.0; if (z <= -5.2e+267) tmp = t_0; elseif (z <= -1.02e+225) tmp = t_1; elseif (z <= -2.7e+181) tmp = t_0; elseif (z <= -5.6e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -1.95e-148) tmp = y * 4.0; elseif (z <= -2.8e-214) tmp = x * -3.0; elseif (z <= -3.8e-298) tmp = y * 4.0; elseif (z <= 4.3e-215) tmp = x * -3.0; elseif (z <= 1.05e-57) tmp = y * 4.0; elseif (z <= 3.5e-24) tmp = x * -3.0; elseif (z <= 0.66) tmp = y * 4.0; elseif ((z <= 4.6e+29) || ~((z <= 1.56e+90))) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+267], t$95$0, If[LessEqual[z, -1.02e+225], t$95$1, If[LessEqual[z, -2.7e+181], t$95$0, If[LessEqual[z, -5.6e+107], t$95$1, If[LessEqual[z, -0.68], t$95$0, If[LessEqual[z, -1.95e-148], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.8e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -3.8e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.3e-215], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.5e-24], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], If[Or[LessEqual[z, 4.6e+29], N[Not[LessEqual[z, 1.56e+90]], $MachinePrecision]], t$95$0, t$95$1]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+267}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+225}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+181}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.68:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-148}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-215}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-24}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+29} \lor \neg \left(z \leq 1.56 \cdot 10^{+90}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.20000000000000005e267 or -1.0200000000000001e225 < z < -2.70000000000000007e181 or -5.59999999999999969e107 < z < -0.680000000000000049 or 0.660000000000000031 < z < 4.6000000000000002e29 or 1.56000000000000004e90 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 67.0%
Taylor expanded in z around inf 66.3%
if -5.20000000000000005e267 < z < -1.0200000000000001e225 or -2.70000000000000007e181 < z < -5.59999999999999969e107 or 4.6000000000000002e29 < z < 1.56000000000000004e90Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 75.3%
sub-neg75.3%
distribute-rgt-in75.3%
metadata-eval75.3%
metadata-eval75.3%
distribute-lft-neg-in75.3%
associate-+r+75.3%
metadata-eval75.3%
metadata-eval75.3%
distribute-rgt-neg-in75.3%
metadata-eval75.3%
Simplified75.3%
Taylor expanded in z around inf 75.3%
*-commutative75.3%
Simplified75.3%
if -0.680000000000000049 < z < -1.94999999999999997e-148 or -2.8000000000000002e-214 < z < -3.8e-298 or 4.30000000000000024e-215 < z < 1.05e-57 or 3.4999999999999996e-24 < z < 0.660000000000000031Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around 0 62.0%
*-commutative62.0%
Simplified62.0%
if -1.94999999999999997e-148 < z < -2.8000000000000002e-214 or -3.8e-298 < z < 4.30000000000000024e-215 or 1.05e-57 < z < 3.4999999999999996e-24Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 69.0%
sub-neg69.0%
distribute-rgt-in69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-lft-neg-in69.0%
associate-+r+69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-rgt-neg-in69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in z around 0 69.0%
*-commutative69.0%
Simplified69.0%
Final simplification66.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -9.6e+272)
t_0
(if (<= z -3.7e+225)
(* x (* z 6.0))
(if (<= z -1.35e+179)
t_0
(if (<= z -6.5e+107)
t_1
(if (<= z -0.68)
t_0
(if (<= z -1.45e-148)
(* y 4.0)
(if (<= z -2.6e-212)
(* x -3.0)
(if (<= z -5.2e-298)
(* y 4.0)
(if (<= z 3.6e-215)
(* x -3.0)
(if (<= z 2.2e-57)
(* y 4.0)
(if (<= z 3.1e-25)
(* x -3.0)
(if (<= z 0.66)
(* y 4.0)
(if (or (<= z 6.5e+29) (not (<= z 1.6e+90)))
t_0
t_1)))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -9.6e+272) {
tmp = t_0;
} else if (z <= -3.7e+225) {
tmp = x * (z * 6.0);
} else if (z <= -1.35e+179) {
tmp = t_0;
} else if (z <= -6.5e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -1.45e-148) {
tmp = y * 4.0;
} else if (z <= -2.6e-212) {
tmp = x * -3.0;
} else if (z <= -5.2e-298) {
tmp = y * 4.0;
} else if (z <= 3.6e-215) {
tmp = x * -3.0;
} else if (z <= 2.2e-57) {
tmp = y * 4.0;
} else if (z <= 3.1e-25) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if ((z <= 6.5e+29) || !(z <= 1.6e+90)) {
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) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-9.6d+272)) then
tmp = t_0
else if (z <= (-3.7d+225)) then
tmp = x * (z * 6.0d0)
else if (z <= (-1.35d+179)) then
tmp = t_0
else if (z <= (-6.5d+107)) then
tmp = t_1
else if (z <= (-0.68d0)) then
tmp = t_0
else if (z <= (-1.45d-148)) then
tmp = y * 4.0d0
else if (z <= (-2.6d-212)) then
tmp = x * (-3.0d0)
else if (z <= (-5.2d-298)) then
tmp = y * 4.0d0
else if (z <= 3.6d-215) then
tmp = x * (-3.0d0)
else if (z <= 2.2d-57) then
tmp = y * 4.0d0
else if (z <= 3.1d-25) then
tmp = x * (-3.0d0)
else if (z <= 0.66d0) then
tmp = y * 4.0d0
else if ((z <= 6.5d+29) .or. (.not. (z <= 1.6d+90))) 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 = 6.0 * (x * z);
double tmp;
if (z <= -9.6e+272) {
tmp = t_0;
} else if (z <= -3.7e+225) {
tmp = x * (z * 6.0);
} else if (z <= -1.35e+179) {
tmp = t_0;
} else if (z <= -6.5e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -1.45e-148) {
tmp = y * 4.0;
} else if (z <= -2.6e-212) {
tmp = x * -3.0;
} else if (z <= -5.2e-298) {
tmp = y * 4.0;
} else if (z <= 3.6e-215) {
tmp = x * -3.0;
} else if (z <= 2.2e-57) {
tmp = y * 4.0;
} else if (z <= 3.1e-25) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if ((z <= 6.5e+29) || !(z <= 1.6e+90)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -9.6e+272: tmp = t_0 elif z <= -3.7e+225: tmp = x * (z * 6.0) elif z <= -1.35e+179: tmp = t_0 elif z <= -6.5e+107: tmp = t_1 elif z <= -0.68: tmp = t_0 elif z <= -1.45e-148: tmp = y * 4.0 elif z <= -2.6e-212: tmp = x * -3.0 elif z <= -5.2e-298: tmp = y * 4.0 elif z <= 3.6e-215: tmp = x * -3.0 elif z <= 2.2e-57: tmp = y * 4.0 elif z <= 3.1e-25: tmp = x * -3.0 elif z <= 0.66: tmp = y * 4.0 elif (z <= 6.5e+29) or not (z <= 1.6e+90): tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -9.6e+272) tmp = t_0; elseif (z <= -3.7e+225) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -1.35e+179) tmp = t_0; elseif (z <= -6.5e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -1.45e-148) tmp = Float64(y * 4.0); elseif (z <= -2.6e-212) tmp = Float64(x * -3.0); elseif (z <= -5.2e-298) tmp = Float64(y * 4.0); elseif (z <= 3.6e-215) tmp = Float64(x * -3.0); elseif (z <= 2.2e-57) tmp = Float64(y * 4.0); elseif (z <= 3.1e-25) tmp = Float64(x * -3.0); elseif (z <= 0.66) tmp = Float64(y * 4.0); elseif ((z <= 6.5e+29) || !(z <= 1.6e+90)) 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 = 6.0 * (x * z); tmp = 0.0; if (z <= -9.6e+272) tmp = t_0; elseif (z <= -3.7e+225) tmp = x * (z * 6.0); elseif (z <= -1.35e+179) tmp = t_0; elseif (z <= -6.5e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -1.45e-148) tmp = y * 4.0; elseif (z <= -2.6e-212) tmp = x * -3.0; elseif (z <= -5.2e-298) tmp = y * 4.0; elseif (z <= 3.6e-215) tmp = x * -3.0; elseif (z <= 2.2e-57) tmp = y * 4.0; elseif (z <= 3.1e-25) tmp = x * -3.0; elseif (z <= 0.66) tmp = y * 4.0; elseif ((z <= 6.5e+29) || ~((z <= 1.6e+90))) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.6e+272], t$95$0, If[LessEqual[z, -3.7e+225], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.35e+179], t$95$0, If[LessEqual[z, -6.5e+107], t$95$1, If[LessEqual[z, -0.68], t$95$0, If[LessEqual[z, -1.45e-148], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.6e-212], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.2e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.6e-215], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.2e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.1e-25], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], If[Or[LessEqual[z, 6.5e+29], N[Not[LessEqual[z, 1.6e+90]], $MachinePrecision]], t$95$0, t$95$1]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+272}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+179}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.68:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-148}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-212}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-215}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-25}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+29} \lor \neg \left(z \leq 1.6 \cdot 10^{+90}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.6000000000000001e272 or -3.69999999999999995e225 < z < -1.34999999999999991e179 or -6.5000000000000006e107 < z < -0.680000000000000049 or 0.660000000000000031 < z < 6.49999999999999971e29 or 1.59999999999999999e90 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 67.0%
Taylor expanded in z around inf 66.3%
if -9.6000000000000001e272 < z < -3.69999999999999995e225Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 86.2%
sub-neg86.2%
distribute-rgt-in86.2%
metadata-eval86.2%
metadata-eval86.2%
distribute-lft-neg-in86.2%
associate-+r+86.2%
metadata-eval86.2%
metadata-eval86.2%
distribute-rgt-neg-in86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in z around inf 86.2%
if -1.34999999999999991e179 < z < -6.5000000000000006e107 or 6.49999999999999971e29 < z < 1.59999999999999999e90Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 72.6%
sub-neg72.6%
distribute-rgt-in72.6%
metadata-eval72.6%
metadata-eval72.6%
distribute-lft-neg-in72.6%
associate-+r+72.6%
metadata-eval72.6%
metadata-eval72.6%
distribute-rgt-neg-in72.6%
metadata-eval72.6%
Simplified72.6%
Taylor expanded in z around inf 72.6%
*-commutative72.6%
Simplified72.6%
if -0.680000000000000049 < z < -1.4499999999999999e-148 or -2.6e-212 < z < -5.1999999999999998e-298 or 3.5999999999999999e-215 < z < 2.19999999999999999e-57 or 3.09999999999999995e-25 < z < 0.660000000000000031Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around 0 62.0%
*-commutative62.0%
Simplified62.0%
if -1.4499999999999999e-148 < z < -2.6e-212 or -5.1999999999999998e-298 < z < 3.5999999999999999e-215 or 2.19999999999999999e-57 < z < 3.09999999999999995e-25Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 69.0%
sub-neg69.0%
distribute-rgt-in69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-lft-neg-in69.0%
associate-+r+69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-rgt-neg-in69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in z around 0 69.0%
*-commutative69.0%
Simplified69.0%
Final simplification66.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -7.8e+278)
t_0
(if (<= z -1.02e+225)
(* x (* z 6.0))
(if (<= z -1.1e+183)
(* y (* z -6.0))
(if (<= z -5.6e+107)
t_1
(if (<= z -0.68)
t_0
(if (<= z -3.5e-147)
(* y 4.0)
(if (<= z -8.8e-212)
(* x -3.0)
(if (<= z -4.6e-299)
(* y 4.0)
(if (<= z 2.1e-214)
(* x -3.0)
(if (<= z 1.05e-53)
(* y 4.0)
(if (<= z 2.05e-25)
(* x -3.0)
(if (<= z 0.66)
(* y 4.0)
(if (or (<= z 2.15e+30) (not (<= z 7.5e+89)))
t_0
t_1)))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -7.8e+278) {
tmp = t_0;
} else if (z <= -1.02e+225) {
tmp = x * (z * 6.0);
} else if (z <= -1.1e+183) {
tmp = y * (z * -6.0);
} else if (z <= -5.6e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -3.5e-147) {
tmp = y * 4.0;
} else if (z <= -8.8e-212) {
tmp = x * -3.0;
} else if (z <= -4.6e-299) {
tmp = y * 4.0;
} else if (z <= 2.1e-214) {
tmp = x * -3.0;
} else if (z <= 1.05e-53) {
tmp = y * 4.0;
} else if (z <= 2.05e-25) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if ((z <= 2.15e+30) || !(z <= 7.5e+89)) {
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) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-7.8d+278)) then
tmp = t_0
else if (z <= (-1.02d+225)) then
tmp = x * (z * 6.0d0)
else if (z <= (-1.1d+183)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-5.6d+107)) then
tmp = t_1
else if (z <= (-0.68d0)) then
tmp = t_0
else if (z <= (-3.5d-147)) then
tmp = y * 4.0d0
else if (z <= (-8.8d-212)) then
tmp = x * (-3.0d0)
else if (z <= (-4.6d-299)) then
tmp = y * 4.0d0
else if (z <= 2.1d-214) then
tmp = x * (-3.0d0)
else if (z <= 1.05d-53) then
tmp = y * 4.0d0
else if (z <= 2.05d-25) then
tmp = x * (-3.0d0)
else if (z <= 0.66d0) then
tmp = y * 4.0d0
else if ((z <= 2.15d+30) .or. (.not. (z <= 7.5d+89))) 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 = 6.0 * (x * z);
double tmp;
if (z <= -7.8e+278) {
tmp = t_0;
} else if (z <= -1.02e+225) {
tmp = x * (z * 6.0);
} else if (z <= -1.1e+183) {
tmp = y * (z * -6.0);
} else if (z <= -5.6e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -3.5e-147) {
tmp = y * 4.0;
} else if (z <= -8.8e-212) {
tmp = x * -3.0;
} else if (z <= -4.6e-299) {
tmp = y * 4.0;
} else if (z <= 2.1e-214) {
tmp = x * -3.0;
} else if (z <= 1.05e-53) {
tmp = y * 4.0;
} else if (z <= 2.05e-25) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if ((z <= 2.15e+30) || !(z <= 7.5e+89)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -7.8e+278: tmp = t_0 elif z <= -1.02e+225: tmp = x * (z * 6.0) elif z <= -1.1e+183: tmp = y * (z * -6.0) elif z <= -5.6e+107: tmp = t_1 elif z <= -0.68: tmp = t_0 elif z <= -3.5e-147: tmp = y * 4.0 elif z <= -8.8e-212: tmp = x * -3.0 elif z <= -4.6e-299: tmp = y * 4.0 elif z <= 2.1e-214: tmp = x * -3.0 elif z <= 1.05e-53: tmp = y * 4.0 elif z <= 2.05e-25: tmp = x * -3.0 elif z <= 0.66: tmp = y * 4.0 elif (z <= 2.15e+30) or not (z <= 7.5e+89): tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -7.8e+278) tmp = t_0; elseif (z <= -1.02e+225) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -1.1e+183) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -5.6e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -3.5e-147) tmp = Float64(y * 4.0); elseif (z <= -8.8e-212) tmp = Float64(x * -3.0); elseif (z <= -4.6e-299) tmp = Float64(y * 4.0); elseif (z <= 2.1e-214) tmp = Float64(x * -3.0); elseif (z <= 1.05e-53) tmp = Float64(y * 4.0); elseif (z <= 2.05e-25) tmp = Float64(x * -3.0); elseif (z <= 0.66) tmp = Float64(y * 4.0); elseif ((z <= 2.15e+30) || !(z <= 7.5e+89)) 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 = 6.0 * (x * z); tmp = 0.0; if (z <= -7.8e+278) tmp = t_0; elseif (z <= -1.02e+225) tmp = x * (z * 6.0); elseif (z <= -1.1e+183) tmp = y * (z * -6.0); elseif (z <= -5.6e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -3.5e-147) tmp = y * 4.0; elseif (z <= -8.8e-212) tmp = x * -3.0; elseif (z <= -4.6e-299) tmp = y * 4.0; elseif (z <= 2.1e-214) tmp = x * -3.0; elseif (z <= 1.05e-53) tmp = y * 4.0; elseif (z <= 2.05e-25) tmp = x * -3.0; elseif (z <= 0.66) tmp = y * 4.0; elseif ((z <= 2.15e+30) || ~((z <= 7.5e+89))) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+278], t$95$0, If[LessEqual[z, -1.02e+225], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e+183], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.6e+107], t$95$1, If[LessEqual[z, -0.68], t$95$0, If[LessEqual[z, -3.5e-147], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -8.8e-212], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4.6e-299], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.1e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e-53], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.05e-25], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], If[Or[LessEqual[z, 2.15e+30], N[Not[LessEqual[z, 7.5e+89]], $MachinePrecision]], t$95$0, t$95$1]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+278}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+183}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.68:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-147}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-212}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-299}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-53}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-25}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+30} \lor \neg \left(z \leq 7.5 \cdot 10^{+89}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.8000000000000004e278 or -5.59999999999999969e107 < z < -0.680000000000000049 or 0.660000000000000031 < z < 2.15e30 or 7.49999999999999947e89 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 66.3%
Taylor expanded in z around inf 65.5%
if -7.8000000000000004e278 < z < -1.0200000000000001e225Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 86.2%
sub-neg86.2%
distribute-rgt-in86.2%
metadata-eval86.2%
metadata-eval86.2%
distribute-lft-neg-in86.2%
associate-+r+86.2%
metadata-eval86.2%
metadata-eval86.2%
distribute-rgt-neg-in86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in z around inf 86.2%
if -1.0200000000000001e225 < z < -1.09999999999999995e183Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 72.6%
Taylor expanded in z around inf 72.5%
*-commutative72.5%
associate-*l*72.6%
*-commutative72.6%
Simplified72.6%
if -1.09999999999999995e183 < z < -5.59999999999999969e107 or 2.15e30 < z < 7.49999999999999947e89Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 72.6%
sub-neg72.6%
distribute-rgt-in72.6%
metadata-eval72.6%
metadata-eval72.6%
distribute-lft-neg-in72.6%
associate-+r+72.6%
metadata-eval72.6%
metadata-eval72.6%
distribute-rgt-neg-in72.6%
metadata-eval72.6%
Simplified72.6%
Taylor expanded in z around inf 72.6%
*-commutative72.6%
Simplified72.6%
if -0.680000000000000049 < z < -3.50000000000000004e-147 or -8.80000000000000012e-212 < z < -4.6000000000000001e-299 or 2.09999999999999992e-214 < z < 1.04999999999999989e-53 or 2.04999999999999994e-25 < z < 0.660000000000000031Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around 0 62.0%
*-commutative62.0%
Simplified62.0%
if -3.50000000000000004e-147 < z < -8.80000000000000012e-212 or -4.6000000000000001e-299 < z < 2.09999999999999992e-214 or 1.04999999999999989e-53 < z < 2.04999999999999994e-25Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 69.0%
sub-neg69.0%
distribute-rgt-in69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-lft-neg-in69.0%
associate-+r+69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-rgt-neg-in69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in z around 0 69.0%
*-commutative69.0%
Simplified69.0%
Final simplification66.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -1.2e+264)
t_0
(if (<= z -1.28e+225)
(* x (* z 6.0))
(if (<= z -3.6e+180)
(* y (* z -6.0))
(if (<= z -8.5e+107)
t_1
(if (<= z -0.68)
t_0
(if (<= z -1.45e-147)
(* y 4.0)
(if (<= z -2.9e-212)
(* x -3.0)
(if (<= z -4.5e-299)
(* y 4.0)
(if (<= z 1.7e-211)
(* x -3.0)
(if (<= z 2.35e-57)
(* y 4.0)
(if (<= z 1.1e-24)
(* x -3.0)
(if (<= z 0.66)
(* y 4.0)
(if (<= z 3.8e+29)
(* z (* y -6.0))
(if (<= z 8.5e+89) t_1 t_0))))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.2e+264) {
tmp = t_0;
} else if (z <= -1.28e+225) {
tmp = x * (z * 6.0);
} else if (z <= -3.6e+180) {
tmp = y * (z * -6.0);
} else if (z <= -8.5e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -1.45e-147) {
tmp = y * 4.0;
} else if (z <= -2.9e-212) {
tmp = x * -3.0;
} else if (z <= -4.5e-299) {
tmp = y * 4.0;
} else if (z <= 1.7e-211) {
tmp = x * -3.0;
} else if (z <= 2.35e-57) {
tmp = y * 4.0;
} else if (z <= 1.1e-24) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if (z <= 3.8e+29) {
tmp = z * (y * -6.0);
} else if (z <= 8.5e+89) {
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) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-1.2d+264)) then
tmp = t_0
else if (z <= (-1.28d+225)) then
tmp = x * (z * 6.0d0)
else if (z <= (-3.6d+180)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-8.5d+107)) then
tmp = t_1
else if (z <= (-0.68d0)) then
tmp = t_0
else if (z <= (-1.45d-147)) then
tmp = y * 4.0d0
else if (z <= (-2.9d-212)) then
tmp = x * (-3.0d0)
else if (z <= (-4.5d-299)) then
tmp = y * 4.0d0
else if (z <= 1.7d-211) then
tmp = x * (-3.0d0)
else if (z <= 2.35d-57) then
tmp = y * 4.0d0
else if (z <= 1.1d-24) then
tmp = x * (-3.0d0)
else if (z <= 0.66d0) then
tmp = y * 4.0d0
else if (z <= 3.8d+29) then
tmp = z * (y * (-6.0d0))
else if (z <= 8.5d+89) 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 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.2e+264) {
tmp = t_0;
} else if (z <= -1.28e+225) {
tmp = x * (z * 6.0);
} else if (z <= -3.6e+180) {
tmp = y * (z * -6.0);
} else if (z <= -8.5e+107) {
tmp = t_1;
} else if (z <= -0.68) {
tmp = t_0;
} else if (z <= -1.45e-147) {
tmp = y * 4.0;
} else if (z <= -2.9e-212) {
tmp = x * -3.0;
} else if (z <= -4.5e-299) {
tmp = y * 4.0;
} else if (z <= 1.7e-211) {
tmp = x * -3.0;
} else if (z <= 2.35e-57) {
tmp = y * 4.0;
} else if (z <= 1.1e-24) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else if (z <= 3.8e+29) {
tmp = z * (y * -6.0);
} else if (z <= 8.5e+89) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -1.2e+264: tmp = t_0 elif z <= -1.28e+225: tmp = x * (z * 6.0) elif z <= -3.6e+180: tmp = y * (z * -6.0) elif z <= -8.5e+107: tmp = t_1 elif z <= -0.68: tmp = t_0 elif z <= -1.45e-147: tmp = y * 4.0 elif z <= -2.9e-212: tmp = x * -3.0 elif z <= -4.5e-299: tmp = y * 4.0 elif z <= 1.7e-211: tmp = x * -3.0 elif z <= 2.35e-57: tmp = y * 4.0 elif z <= 1.1e-24: tmp = x * -3.0 elif z <= 0.66: tmp = y * 4.0 elif z <= 3.8e+29: tmp = z * (y * -6.0) elif z <= 8.5e+89: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.2e+264) tmp = t_0; elseif (z <= -1.28e+225) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -3.6e+180) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -8.5e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -1.45e-147) tmp = Float64(y * 4.0); elseif (z <= -2.9e-212) tmp = Float64(x * -3.0); elseif (z <= -4.5e-299) tmp = Float64(y * 4.0); elseif (z <= 1.7e-211) tmp = Float64(x * -3.0); elseif (z <= 2.35e-57) tmp = Float64(y * 4.0); elseif (z <= 1.1e-24) tmp = Float64(x * -3.0); elseif (z <= 0.66) tmp = Float64(y * 4.0); elseif (z <= 3.8e+29) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= 8.5e+89) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.2e+264) tmp = t_0; elseif (z <= -1.28e+225) tmp = x * (z * 6.0); elseif (z <= -3.6e+180) tmp = y * (z * -6.0); elseif (z <= -8.5e+107) tmp = t_1; elseif (z <= -0.68) tmp = t_0; elseif (z <= -1.45e-147) tmp = y * 4.0; elseif (z <= -2.9e-212) tmp = x * -3.0; elseif (z <= -4.5e-299) tmp = y * 4.0; elseif (z <= 1.7e-211) tmp = x * -3.0; elseif (z <= 2.35e-57) tmp = y * 4.0; elseif (z <= 1.1e-24) tmp = x * -3.0; elseif (z <= 0.66) tmp = y * 4.0; elseif (z <= 3.8e+29) tmp = z * (y * -6.0); elseif (z <= 8.5e+89) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+264], t$95$0, If[LessEqual[z, -1.28e+225], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e+180], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.5e+107], t$95$1, If[LessEqual[z, -0.68], t$95$0, If[LessEqual[z, -1.45e-147], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.9e-212], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4.5e-299], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.7e-211], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.35e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.1e-24], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.8e+29], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+89], t$95$1, t$95$0]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+264}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.28 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+180}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.68:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-147}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-212}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-299}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-211}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-24}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+29}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+89}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -1.19999999999999996e264 or -8.4999999999999999e107 < z < -0.680000000000000049 or 8.50000000000000045e89 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 65.0%
Taylor expanded in z around inf 64.4%
if -1.19999999999999996e264 < z < -1.28000000000000006e225Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 86.2%
sub-neg86.2%
distribute-rgt-in86.2%
metadata-eval86.2%
metadata-eval86.2%
distribute-lft-neg-in86.2%
associate-+r+86.2%
metadata-eval86.2%
metadata-eval86.2%
distribute-rgt-neg-in86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in z around inf 86.2%
if -1.28000000000000006e225 < z < -3.6000000000000002e180Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 72.6%
Taylor expanded in z around inf 72.5%
*-commutative72.5%
associate-*l*72.6%
*-commutative72.6%
Simplified72.6%
if -3.6000000000000002e180 < z < -8.4999999999999999e107 or 3.79999999999999971e29 < z < 8.50000000000000045e89Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 72.6%
sub-neg72.6%
distribute-rgt-in72.6%
metadata-eval72.6%
metadata-eval72.6%
distribute-lft-neg-in72.6%
associate-+r+72.6%
metadata-eval72.6%
metadata-eval72.6%
distribute-rgt-neg-in72.6%
metadata-eval72.6%
Simplified72.6%
Taylor expanded in z around inf 72.6%
*-commutative72.6%
Simplified72.6%
if -0.680000000000000049 < z < -1.4500000000000001e-147 or -2.8999999999999999e-212 < z < -4.50000000000000003e-299 or 1.7e-211 < z < 2.3499999999999999e-57 or 1.10000000000000001e-24 < z < 0.660000000000000031Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around 0 62.0%
*-commutative62.0%
Simplified62.0%
if -1.4500000000000001e-147 < z < -2.8999999999999999e-212 or -4.50000000000000003e-299 < z < 1.7e-211 or 2.3499999999999999e-57 < z < 1.10000000000000001e-24Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 69.0%
sub-neg69.0%
distribute-rgt-in69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-lft-neg-in69.0%
associate-+r+69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-rgt-neg-in69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in z around 0 69.0%
*-commutative69.0%
Simplified69.0%
if 0.660000000000000031 < z < 3.79999999999999971e29Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 99.7%
Taylor expanded in y around inf 83.9%
associate-*r*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in z around inf 79.9%
associate-*r*79.9%
Simplified79.9%
Final simplification66.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.0215)
t_0
(if (<= z -1.55e-148)
(* y 4.0)
(if (<= z -1.45e-212)
(* x -3.0)
(if (<= z -7.6e-298)
(* y 4.0)
(if (<= z 2.3e-211)
(* x -3.0)
(if (<= z 8.2e-57)
(* y 4.0)
(if (<= z 1.7e-24)
(* x -3.0)
(if (<= z 0.6) (* y 4.0) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.0215) {
tmp = t_0;
} else if (z <= -1.55e-148) {
tmp = y * 4.0;
} else if (z <= -1.45e-212) {
tmp = x * -3.0;
} else if (z <= -7.6e-298) {
tmp = y * 4.0;
} else if (z <= 2.3e-211) {
tmp = x * -3.0;
} else if (z <= 8.2e-57) {
tmp = y * 4.0;
} else if (z <= 1.7e-24) {
tmp = x * -3.0;
} else if (z <= 0.6) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.0215d0)) then
tmp = t_0
else if (z <= (-1.55d-148)) then
tmp = y * 4.0d0
else if (z <= (-1.45d-212)) then
tmp = x * (-3.0d0)
else if (z <= (-7.6d-298)) then
tmp = y * 4.0d0
else if (z <= 2.3d-211) then
tmp = x * (-3.0d0)
else if (z <= 8.2d-57) then
tmp = y * 4.0d0
else if (z <= 1.7d-24) then
tmp = x * (-3.0d0)
else if (z <= 0.6d0) then
tmp = y * 4.0d0
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 * ((y - x) * z);
double tmp;
if (z <= -0.0215) {
tmp = t_0;
} else if (z <= -1.55e-148) {
tmp = y * 4.0;
} else if (z <= -1.45e-212) {
tmp = x * -3.0;
} else if (z <= -7.6e-298) {
tmp = y * 4.0;
} else if (z <= 2.3e-211) {
tmp = x * -3.0;
} else if (z <= 8.2e-57) {
tmp = y * 4.0;
} else if (z <= 1.7e-24) {
tmp = x * -3.0;
} else if (z <= 0.6) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.0215: tmp = t_0 elif z <= -1.55e-148: tmp = y * 4.0 elif z <= -1.45e-212: tmp = x * -3.0 elif z <= -7.6e-298: tmp = y * 4.0 elif z <= 2.3e-211: tmp = x * -3.0 elif z <= 8.2e-57: tmp = y * 4.0 elif z <= 1.7e-24: tmp = x * -3.0 elif z <= 0.6: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.0215) tmp = t_0; elseif (z <= -1.55e-148) tmp = Float64(y * 4.0); elseif (z <= -1.45e-212) tmp = Float64(x * -3.0); elseif (z <= -7.6e-298) tmp = Float64(y * 4.0); elseif (z <= 2.3e-211) tmp = Float64(x * -3.0); elseif (z <= 8.2e-57) tmp = Float64(y * 4.0); elseif (z <= 1.7e-24) tmp = Float64(x * -3.0); elseif (z <= 0.6) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.0215) tmp = t_0; elseif (z <= -1.55e-148) tmp = y * 4.0; elseif (z <= -1.45e-212) tmp = x * -3.0; elseif (z <= -7.6e-298) tmp = y * 4.0; elseif (z <= 2.3e-211) tmp = x * -3.0; elseif (z <= 8.2e-57) tmp = y * 4.0; elseif (z <= 1.7e-24) tmp = x * -3.0; elseif (z <= 0.6) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0215], t$95$0, If[LessEqual[z, -1.55e-148], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.45e-212], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7.6e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.3e-211], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.2e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.7e-24], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.6], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.0215:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-148}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-212}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-211}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-24}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.021499999999999998 or 0.599999999999999978 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 98.3%
Taylor expanded in z around inf 98.3%
if -0.021499999999999998 < z < -1.5500000000000001e-148 or -1.45e-212 < z < -7.6000000000000001e-298 or 2.29999999999999988e-211 < z < 8.2000000000000003e-57 or 1.69999999999999996e-24 < z < 0.599999999999999978Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around 0 62.0%
*-commutative62.0%
Simplified62.0%
if -1.5500000000000001e-148 < z < -1.45e-212 or -7.6000000000000001e-298 < z < 2.29999999999999988e-211 or 8.2000000000000003e-57 < z < 1.69999999999999996e-24Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 69.0%
sub-neg69.0%
distribute-rgt-in69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-lft-neg-in69.0%
associate-+r+69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-rgt-neg-in69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in z around 0 69.0%
*-commutative69.0%
Simplified69.0%
Final simplification82.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.68)
t_0
(if (<= z -3.6e-147)
(* y 4.0)
(if (<= z -3.8e-213)
(* x -3.0)
(if (<= z -7e-299)
(* y 4.0)
(if (<= z 9e-213)
(* x -3.0)
(if (<= z 2.3e-58)
(* y 4.0)
(if (<= z 9.2e-26)
(* x -3.0)
(if (<= z 0.66) (* y 4.0) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -0.68) {
tmp = t_0;
} else if (z <= -3.6e-147) {
tmp = y * 4.0;
} else if (z <= -3.8e-213) {
tmp = x * -3.0;
} else if (z <= -7e-299) {
tmp = y * 4.0;
} else if (z <= 9e-213) {
tmp = x * -3.0;
} else if (z <= 2.3e-58) {
tmp = y * 4.0;
} else if (z <= 9.2e-26) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-0.68d0)) then
tmp = t_0
else if (z <= (-3.6d-147)) then
tmp = y * 4.0d0
else if (z <= (-3.8d-213)) then
tmp = x * (-3.0d0)
else if (z <= (-7d-299)) then
tmp = y * 4.0d0
else if (z <= 9d-213) then
tmp = x * (-3.0d0)
else if (z <= 2.3d-58) then
tmp = y * 4.0d0
else if (z <= 9.2d-26) then
tmp = x * (-3.0d0)
else if (z <= 0.66d0) then
tmp = y * 4.0d0
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 * (y * z);
double tmp;
if (z <= -0.68) {
tmp = t_0;
} else if (z <= -3.6e-147) {
tmp = y * 4.0;
} else if (z <= -3.8e-213) {
tmp = x * -3.0;
} else if (z <= -7e-299) {
tmp = y * 4.0;
} else if (z <= 9e-213) {
tmp = x * -3.0;
} else if (z <= 2.3e-58) {
tmp = y * 4.0;
} else if (z <= 9.2e-26) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -0.68: tmp = t_0 elif z <= -3.6e-147: tmp = y * 4.0 elif z <= -3.8e-213: tmp = x * -3.0 elif z <= -7e-299: tmp = y * 4.0 elif z <= 9e-213: tmp = x * -3.0 elif z <= 2.3e-58: tmp = y * 4.0 elif z <= 9.2e-26: tmp = x * -3.0 elif z <= 0.66: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -0.68) tmp = t_0; elseif (z <= -3.6e-147) tmp = Float64(y * 4.0); elseif (z <= -3.8e-213) tmp = Float64(x * -3.0); elseif (z <= -7e-299) tmp = Float64(y * 4.0); elseif (z <= 9e-213) tmp = Float64(x * -3.0); elseif (z <= 2.3e-58) tmp = Float64(y * 4.0); elseif (z <= 9.2e-26) tmp = Float64(x * -3.0); elseif (z <= 0.66) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -0.68) tmp = t_0; elseif (z <= -3.6e-147) tmp = y * 4.0; elseif (z <= -3.8e-213) tmp = x * -3.0; elseif (z <= -7e-299) tmp = y * 4.0; elseif (z <= 9e-213) tmp = x * -3.0; elseif (z <= 2.3e-58) tmp = y * 4.0; elseif (z <= 9.2e-26) tmp = x * -3.0; elseif (z <= 0.66) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.68], t$95$0, If[LessEqual[z, -3.6e-147], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.8e-213], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7e-299], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 9e-213], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.3e-58], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 9.2e-26], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -0.68:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-147}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-213}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-299}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-213}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-58}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-26}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.680000000000000049 or 0.660000000000000031 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 56.6%
Taylor expanded in z around inf 56.0%
if -0.680000000000000049 < z < -3.60000000000000012e-147 or -3.8e-213 < z < -6.99999999999999981e-299 or 9.0000000000000002e-213 < z < 2.2999999999999999e-58 or 9.20000000000000035e-26 < z < 0.660000000000000031Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 62.5%
Taylor expanded in z around 0 62.0%
*-commutative62.0%
Simplified62.0%
if -3.60000000000000012e-147 < z < -3.8e-213 or -6.99999999999999981e-299 < z < 9.0000000000000002e-213 or 2.2999999999999999e-58 < z < 9.20000000000000035e-26Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 69.0%
sub-neg69.0%
distribute-rgt-in69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-lft-neg-in69.0%
associate-+r+69.0%
metadata-eval69.0%
metadata-eval69.0%
distribute-rgt-neg-in69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in z around 0 69.0%
*-commutative69.0%
Simplified69.0%
Final simplification60.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.014)
t_0
(if (<= z -1.15e-147)
(* y 4.0)
(if (<= z -3.6e-212)
(* x -3.0)
(if (<= z -8.5e-298)
(* y 4.0)
(if (<= z 2.3e-216)
(* x -3.0)
(if (<= z 6.2e-57)
(* y 4.0)
(if (<= z 135000.0) (* x (+ -3.0 (* z 6.0))) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.014) {
tmp = t_0;
} else if (z <= -1.15e-147) {
tmp = y * 4.0;
} else if (z <= -3.6e-212) {
tmp = x * -3.0;
} else if (z <= -8.5e-298) {
tmp = y * 4.0;
} else if (z <= 2.3e-216) {
tmp = x * -3.0;
} else if (z <= 6.2e-57) {
tmp = y * 4.0;
} else if (z <= 135000.0) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.014d0)) then
tmp = t_0
else if (z <= (-1.15d-147)) then
tmp = y * 4.0d0
else if (z <= (-3.6d-212)) then
tmp = x * (-3.0d0)
else if (z <= (-8.5d-298)) then
tmp = y * 4.0d0
else if (z <= 2.3d-216) then
tmp = x * (-3.0d0)
else if (z <= 6.2d-57) then
tmp = y * 4.0d0
else if (z <= 135000.0d0) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
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 * ((y - x) * z);
double tmp;
if (z <= -0.014) {
tmp = t_0;
} else if (z <= -1.15e-147) {
tmp = y * 4.0;
} else if (z <= -3.6e-212) {
tmp = x * -3.0;
} else if (z <= -8.5e-298) {
tmp = y * 4.0;
} else if (z <= 2.3e-216) {
tmp = x * -3.0;
} else if (z <= 6.2e-57) {
tmp = y * 4.0;
} else if (z <= 135000.0) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.014: tmp = t_0 elif z <= -1.15e-147: tmp = y * 4.0 elif z <= -3.6e-212: tmp = x * -3.0 elif z <= -8.5e-298: tmp = y * 4.0 elif z <= 2.3e-216: tmp = x * -3.0 elif z <= 6.2e-57: tmp = y * 4.0 elif z <= 135000.0: tmp = x * (-3.0 + (z * 6.0)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.014) tmp = t_0; elseif (z <= -1.15e-147) tmp = Float64(y * 4.0); elseif (z <= -3.6e-212) tmp = Float64(x * -3.0); elseif (z <= -8.5e-298) tmp = Float64(y * 4.0); elseif (z <= 2.3e-216) tmp = Float64(x * -3.0); elseif (z <= 6.2e-57) tmp = Float64(y * 4.0); elseif (z <= 135000.0) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.014) tmp = t_0; elseif (z <= -1.15e-147) tmp = y * 4.0; elseif (z <= -3.6e-212) tmp = x * -3.0; elseif (z <= -8.5e-298) tmp = y * 4.0; elseif (z <= 2.3e-216) tmp = x * -3.0; elseif (z <= 6.2e-57) tmp = y * 4.0; elseif (z <= 135000.0) tmp = x * (-3.0 + (z * 6.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.014], t$95$0, If[LessEqual[z, -1.15e-147], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.6e-212], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8.5e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.3e-216], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.2e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 135000.0], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.014:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-147}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-212}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-216}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 135000:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.0140000000000000003 or 135000 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 98.7%
Taylor expanded in z around inf 98.7%
if -0.0140000000000000003 < z < -1.14999999999999995e-147 or -3.6000000000000001e-212 < z < -8.49999999999999957e-298 or 2.29999999999999997e-216 < z < 6.19999999999999952e-57Initial program 99.4%
+-commutative99.4%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 63.1%
Taylor expanded in z around 0 62.6%
*-commutative62.6%
Simplified62.6%
if -1.14999999999999995e-147 < z < -3.6000000000000001e-212 or -8.49999999999999957e-298 < z < 2.29999999999999997e-216Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.0%
sub-neg66.0%
distribute-rgt-in66.0%
metadata-eval66.0%
metadata-eval66.0%
distribute-lft-neg-in66.0%
associate-+r+66.0%
metadata-eval66.0%
metadata-eval66.0%
distribute-rgt-neg-in66.0%
metadata-eval66.0%
Simplified66.0%
Taylor expanded in z around 0 66.0%
*-commutative66.0%
Simplified66.0%
if 6.19999999999999952e-57 < z < 135000Initial program 98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around inf 75.3%
sub-neg75.3%
distribute-rgt-in75.5%
metadata-eval75.5%
metadata-eval75.5%
distribute-lft-neg-in75.5%
associate-+r+75.5%
metadata-eval75.5%
metadata-eval75.5%
distribute-rgt-neg-in75.5%
metadata-eval75.5%
Simplified75.5%
Final simplification82.2%
(FPCore (x y z) :precision binary64 (+ (+ x (- (* (- y x) 8.0) (* -6.0 (* z (- x y))))) (* 4.0 (- x y))))
double code(double x, double y, double z) {
return (x + (((y - x) * 8.0) - (-6.0 * (z * (x - y))))) + (4.0 * (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 + (((y - x) * 8.0d0) - ((-6.0d0) * (z * (x - y))))) + (4.0d0 * (x - y))
end function
public static double code(double x, double y, double z) {
return (x + (((y - x) * 8.0) - (-6.0 * (z * (x - y))))) + (4.0 * (x - y));
}
def code(x, y, z): return (x + (((y - x) * 8.0) - (-6.0 * (z * (x - y))))) + (4.0 * (x - y))
function code(x, y, z) return Float64(Float64(x + Float64(Float64(Float64(y - x) * 8.0) - Float64(-6.0 * Float64(z * Float64(x - y))))) + Float64(4.0 * Float64(x - y))) end
function tmp = code(x, y, z) tmp = (x + (((y - x) * 8.0) - (-6.0 * (z * (x - y))))) + (4.0 * (x - y)); end
code[x_, y_, z_] := N[(N[(x + N[(N[(N[(y - x), $MachinePrecision] * 8.0), $MachinePrecision] - N[(-6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \left(\left(y - x\right) \cdot 8 - -6 \cdot \left(z \cdot \left(x - y\right)\right)\right)\right) + 4 \cdot \left(x - y\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
flip-+38.3%
pow238.3%
associate-*l*38.2%
pow238.2%
associate-*l*38.3%
Applied egg-rr38.3%
Taylor expanded in z around inf 99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.2e-15) (not (<= x 4.4e+23))) (* x (+ -3.0 (* z 6.0))) (* y (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.2e-15) || !(x <= 4.4e+23)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.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 ((x <= (-5.2d-15)) .or. (.not. (x <= 4.4d+23))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = y * (4.0d0 + (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.2e-15) || !(x <= 4.4e+23)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.2e-15) or not (x <= 4.4e+23): tmp = x * (-3.0 + (z * 6.0)) else: tmp = y * (4.0 + (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.2e-15) || !(x <= 4.4e+23)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.2e-15) || ~((x <= 4.4e+23))) tmp = x * (-3.0 + (z * 6.0)); else tmp = y * (4.0 + (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.2e-15], N[Not[LessEqual[x, 4.4e+23]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-15} \lor \neg \left(x \leq 4.4 \cdot 10^{+23}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\end{array}
\end{array}
if x < -5.20000000000000009e-15 or 4.40000000000000017e23 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 78.1%
sub-neg78.1%
distribute-rgt-in78.1%
metadata-eval78.1%
metadata-eval78.1%
distribute-lft-neg-in78.1%
associate-+r+78.1%
metadata-eval78.1%
metadata-eval78.1%
distribute-rgt-neg-in78.1%
metadata-eval78.1%
Simplified78.1%
if -5.20000000000000009e-15 < x < 4.40000000000000017e23Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 85.8%
Final simplification81.7%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* (- y x) (* z -6.0)) (if (<= z 0.65) (+ x (* (- y x) 4.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = (y - x) * (z * -6.0);
} else if (z <= 0.65) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = z * ((y - x) * -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 (z <= (-0.55d0)) then
tmp = (y - x) * (z * (-6.0d0))
else if (z <= 0.65d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = z * ((y - x) * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = (y - x) * (z * -6.0);
} else if (z <= 0.65) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = (y - x) * (z * -6.0) elif z <= 0.65: tmp = x + ((y - x) * 4.0) else: tmp = z * ((y - x) * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); elseif (z <= 0.65) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(z * Float64(Float64(y - x) * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = (y - x) * (z * -6.0); elseif (z <= 0.65) tmp = x + ((y - x) * 4.0); else tmp = z * ((y - x) * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.65], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 98.1%
Taylor expanded in z around inf 98.1%
associate-*r*98.2%
*-commutative98.2%
Simplified98.2%
if -0.55000000000000004 < z < 0.650000000000000022Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 98.6%
if 0.650000000000000022 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 98.5%
Taylor expanded in z around inf 98.5%
associate-*r*98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in z around 0 98.5%
associate-*r*98.5%
*-commutative98.5%
associate-*r*98.6%
Simplified98.6%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* (- y x) (* z -6.0)) (if (<= z 0.5) (+ (* y 4.0) (* x -3.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = (y - x) * (z * -6.0);
} else if (z <= 0.5) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = z * ((y - x) * -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 (z <= (-0.55d0)) then
tmp = (y - x) * (z * (-6.0d0))
else if (z <= 0.5d0) then
tmp = (y * 4.0d0) + (x * (-3.0d0))
else
tmp = z * ((y - x) * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = (y - x) * (z * -6.0);
} else if (z <= 0.5) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = (y - x) * (z * -6.0) elif z <= 0.5: tmp = (y * 4.0) + (x * -3.0) else: tmp = z * ((y - x) * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); elseif (z <= 0.5) tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0)); else tmp = Float64(z * Float64(Float64(y - x) * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = (y - x) * (z * -6.0); elseif (z <= 0.5) tmp = (y * 4.0) + (x * -3.0); else tmp = z * ((y - x) * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.5], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 98.1%
Taylor expanded in z around inf 98.1%
associate-*r*98.2%
*-commutative98.2%
Simplified98.2%
if -0.55000000000000004 < z < 0.5Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
Taylor expanded in z around 0 98.6%
if 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 98.5%
Taylor expanded in z around inf 98.5%
associate-*r*98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in z around 0 98.5%
associate-*r*98.5%
*-commutative98.5%
associate-*r*98.6%
Simplified98.6%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.1e-90) (not (<= x 1.18e+48))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.1e-90) || !(x <= 1.18e+48)) {
tmp = x * -3.0;
} else {
tmp = y * 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 ((x <= (-2.1d-90)) .or. (.not. (x <= 1.18d+48))) then
tmp = x * (-3.0d0)
else
tmp = y * 4.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.1e-90) || !(x <= 1.18e+48)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.1e-90) or not (x <= 1.18e+48): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.1e-90) || !(x <= 1.18e+48)) tmp = Float64(x * -3.0); else tmp = Float64(y * 4.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.1e-90) || ~((x <= 1.18e+48))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.1e-90], N[Not[LessEqual[x, 1.18e+48]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-90} \lor \neg \left(x \leq 1.18 \cdot 10^{+48}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -2.0999999999999999e-90 or 1.18000000000000007e48 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 76.0%
sub-neg76.0%
distribute-rgt-in76.0%
metadata-eval76.0%
metadata-eval76.0%
distribute-lft-neg-in76.0%
associate-+r+76.0%
metadata-eval76.0%
metadata-eval76.0%
distribute-rgt-neg-in76.0%
metadata-eval76.0%
Simplified76.0%
Taylor expanded in z around 0 36.6%
*-commutative36.6%
Simplified36.6%
if -2.0999999999999999e-90 < x < 1.18000000000000007e48Initial program 99.5%
+-commutative99.5%
associate-*l*99.7%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 85.3%
Taylor expanded in z around 0 44.3%
*-commutative44.3%
Simplified44.3%
Final simplification40.1%
(FPCore (x y z) :precision binary64 (+ x (* (* 6.0 (- x y)) (- z 0.6666666666666666))))
double code(double x, double y, double z) {
return x + ((6.0 * (x - y)) * (z - 0.6666666666666666));
}
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 * (x - y)) * (z - 0.6666666666666666d0))
end function
public static double code(double x, double y, double z) {
return x + ((6.0 * (x - y)) * (z - 0.6666666666666666));
}
def code(x, y, z): return x + ((6.0 * (x - y)) * (z - 0.6666666666666666))
function code(x, y, z) return Float64(x + Float64(Float64(6.0 * Float64(x - y)) * Float64(z - 0.6666666666666666))) end
function tmp = code(x, y, z) tmp = x + ((6.0 * (x - y)) * (z - 0.6666666666666666)); end
code[x_, y_, z_] := N[(x + N[(N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] * N[(z - 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(6 \cdot \left(x - y\right)\right) \cdot \left(z - 0.6666666666666666\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 48.6%
sub-neg48.6%
distribute-rgt-in48.7%
metadata-eval48.7%
metadata-eval48.7%
distribute-lft-neg-in48.7%
associate-+r+48.7%
metadata-eval48.7%
metadata-eval48.7%
distribute-rgt-neg-in48.7%
metadata-eval48.7%
Simplified48.7%
Taylor expanded in z around 0 24.5%
*-commutative24.5%
Simplified24.5%
Final simplification24.5%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 51.9%
Taylor expanded in z around 0 2.5%
Final simplification2.5%
herbie shell --seed 2024020
(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))))