
(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 18 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.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%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -2.8e+256)
t_0
(if (<= z -1.95e+214)
t_1
(if (<= z -3.2e+47)
t_0
(if (<= z -920.0)
t_1
(if (<= z -2.9e-102)
(* x -3.0)
(if (<= z -1.05e-129)
(* y 4.0)
(if (<= z -5.5e-148)
(* x -3.0)
(if (<= z -1.18e-263)
(* y 4.0)
(if (<= z -4.8e-305)
(* x -3.0)
(if (<= z 2.15e-305)
(* y 4.0)
(if (<= z 3.9e-253)
(* x -3.0)
(if (<= z 4.8e-190)
(* y 4.0)
(if (<= z 0.185)
(* x -3.0)
(if (or (<= z 1.65e+146) (not (<= z 8e+221)))
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 <= -2.8e+256) {
tmp = t_0;
} else if (z <= -1.95e+214) {
tmp = t_1;
} else if (z <= -3.2e+47) {
tmp = t_0;
} else if (z <= -920.0) {
tmp = t_1;
} else if (z <= -2.9e-102) {
tmp = x * -3.0;
} else if (z <= -1.05e-129) {
tmp = y * 4.0;
} else if (z <= -5.5e-148) {
tmp = x * -3.0;
} else if (z <= -1.18e-263) {
tmp = y * 4.0;
} else if (z <= -4.8e-305) {
tmp = x * -3.0;
} else if (z <= 2.15e-305) {
tmp = y * 4.0;
} else if (z <= 3.9e-253) {
tmp = x * -3.0;
} else if (z <= 4.8e-190) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 1.65e+146) || !(z <= 8e+221)) {
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 <= (-2.8d+256)) then
tmp = t_0
else if (z <= (-1.95d+214)) then
tmp = t_1
else if (z <= (-3.2d+47)) then
tmp = t_0
else if (z <= (-920.0d0)) then
tmp = t_1
else if (z <= (-2.9d-102)) then
tmp = x * (-3.0d0)
else if (z <= (-1.05d-129)) then
tmp = y * 4.0d0
else if (z <= (-5.5d-148)) then
tmp = x * (-3.0d0)
else if (z <= (-1.18d-263)) then
tmp = y * 4.0d0
else if (z <= (-4.8d-305)) then
tmp = x * (-3.0d0)
else if (z <= 2.15d-305) then
tmp = y * 4.0d0
else if (z <= 3.9d-253) then
tmp = x * (-3.0d0)
else if (z <= 4.8d-190) then
tmp = y * 4.0d0
else if (z <= 0.185d0) then
tmp = x * (-3.0d0)
else if ((z <= 1.65d+146) .or. (.not. (z <= 8d+221))) 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 <= -2.8e+256) {
tmp = t_0;
} else if (z <= -1.95e+214) {
tmp = t_1;
} else if (z <= -3.2e+47) {
tmp = t_0;
} else if (z <= -920.0) {
tmp = t_1;
} else if (z <= -2.9e-102) {
tmp = x * -3.0;
} else if (z <= -1.05e-129) {
tmp = y * 4.0;
} else if (z <= -5.5e-148) {
tmp = x * -3.0;
} else if (z <= -1.18e-263) {
tmp = y * 4.0;
} else if (z <= -4.8e-305) {
tmp = x * -3.0;
} else if (z <= 2.15e-305) {
tmp = y * 4.0;
} else if (z <= 3.9e-253) {
tmp = x * -3.0;
} else if (z <= 4.8e-190) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 1.65e+146) || !(z <= 8e+221)) {
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 <= -2.8e+256: tmp = t_0 elif z <= -1.95e+214: tmp = t_1 elif z <= -3.2e+47: tmp = t_0 elif z <= -920.0: tmp = t_1 elif z <= -2.9e-102: tmp = x * -3.0 elif z <= -1.05e-129: tmp = y * 4.0 elif z <= -5.5e-148: tmp = x * -3.0 elif z <= -1.18e-263: tmp = y * 4.0 elif z <= -4.8e-305: tmp = x * -3.0 elif z <= 2.15e-305: tmp = y * 4.0 elif z <= 3.9e-253: tmp = x * -3.0 elif z <= 4.8e-190: tmp = y * 4.0 elif z <= 0.185: tmp = x * -3.0 elif (z <= 1.65e+146) or not (z <= 8e+221): 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 <= -2.8e+256) tmp = t_0; elseif (z <= -1.95e+214) tmp = t_1; elseif (z <= -3.2e+47) tmp = t_0; elseif (z <= -920.0) tmp = t_1; elseif (z <= -2.9e-102) tmp = Float64(x * -3.0); elseif (z <= -1.05e-129) tmp = Float64(y * 4.0); elseif (z <= -5.5e-148) tmp = Float64(x * -3.0); elseif (z <= -1.18e-263) tmp = Float64(y * 4.0); elseif (z <= -4.8e-305) tmp = Float64(x * -3.0); elseif (z <= 2.15e-305) tmp = Float64(y * 4.0); elseif (z <= 3.9e-253) tmp = Float64(x * -3.0); elseif (z <= 4.8e-190) tmp = Float64(y * 4.0); elseif (z <= 0.185) tmp = Float64(x * -3.0); elseif ((z <= 1.65e+146) || !(z <= 8e+221)) 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 <= -2.8e+256) tmp = t_0; elseif (z <= -1.95e+214) tmp = t_1; elseif (z <= -3.2e+47) tmp = t_0; elseif (z <= -920.0) tmp = t_1; elseif (z <= -2.9e-102) tmp = x * -3.0; elseif (z <= -1.05e-129) tmp = y * 4.0; elseif (z <= -5.5e-148) tmp = x * -3.0; elseif (z <= -1.18e-263) tmp = y * 4.0; elseif (z <= -4.8e-305) tmp = x * -3.0; elseif (z <= 2.15e-305) tmp = y * 4.0; elseif (z <= 3.9e-253) tmp = x * -3.0; elseif (z <= 4.8e-190) tmp = y * 4.0; elseif (z <= 0.185) tmp = x * -3.0; elseif ((z <= 1.65e+146) || ~((z <= 8e+221))) 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, -2.8e+256], t$95$0, If[LessEqual[z, -1.95e+214], t$95$1, If[LessEqual[z, -3.2e+47], t$95$0, If[LessEqual[z, -920.0], t$95$1, If[LessEqual[z, -2.9e-102], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.05e-129], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -5.5e-148], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.18e-263], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -4.8e-305], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.15e-305], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.9e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.8e-190], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.185], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 1.65e+146], N[Not[LessEqual[z, 8e+221]], $MachinePrecision]], 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 -2.8 \cdot 10^{+256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+47}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -920:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-102}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-129}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-148}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-263}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-305}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-305}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-190}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.185:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+146} \lor \neg \left(z \leq 8 \cdot 10^{+221}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.79999999999999988e256 or -1.95000000000000007e214 < z < -3.2e47 or 1.65000000000000008e146 < z < 8.0000000000000004e221Initial program 99.8%
+-commutative99.8%
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 72.2%
Taylor expanded in z around inf 72.2%
if -2.79999999999999988e256 < z < -1.95000000000000007e214 or -3.2e47 < z < -920 or 0.185 < z < 1.65000000000000008e146 or 8.0000000000000004e221 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 69.9%
sub-neg69.9%
distribute-rgt-in69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-lft-neg-in69.9%
associate-+r+69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-rgt-neg-in69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in z around inf 68.1%
if -920 < z < -2.89999999999999986e-102 or -1.05e-129 < z < -5.5000000000000003e-148 or -1.17999999999999998e-263 < z < -4.80000000000000039e-305 or 2.1500000000000001e-305 < z < 3.8999999999999999e-253 or 4.8000000000000001e-190 < z < 0.185Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.2%
sub-neg70.2%
distribute-rgt-in70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-lft-neg-in70.2%
associate-+r+70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-rgt-neg-in70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in z around 0 68.9%
*-commutative68.9%
Simplified68.9%
if -2.89999999999999986e-102 < z < -1.05e-129 or -5.5000000000000003e-148 < z < -1.17999999999999998e-263 or -4.80000000000000039e-305 < z < 2.1500000000000001e-305 or 3.8999999999999999e-253 < z < 4.8000000000000001e-190Initial program 99.5%
+-commutative99.5%
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 76.8%
Taylor expanded in z around 0 76.8%
Final simplification71.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -2.2e+256)
t_0
(if (<= z -9.5e+212)
t_1
(if (<= z -1.5e+47)
t_0
(if (<= z -920.0)
t_1
(if (<= z -4.2e-102)
(* x -3.0)
(if (<= z -3.9e-130)
(* y 4.0)
(if (<= z -8.5e-147)
(* x -3.0)
(if (<= z -7.8e-263)
(* y 4.0)
(if (<= z -1.66e-304)
(* x -3.0)
(if (<= z 7.2e-306)
(* y 4.0)
(if (<= z 4e-253)
(* x -3.0)
(if (<= z 1.9e-191)
(* y 4.0)
(if (<= z 0.185)
(* x -3.0)
(if (or (<= z 1.7e+146) (not (<= z 1.55e+219)))
t_1
t_0))))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -2.2e+256) {
tmp = t_0;
} else if (z <= -9.5e+212) {
tmp = t_1;
} else if (z <= -1.5e+47) {
tmp = t_0;
} else if (z <= -920.0) {
tmp = t_1;
} else if (z <= -4.2e-102) {
tmp = x * -3.0;
} else if (z <= -3.9e-130) {
tmp = y * 4.0;
} else if (z <= -8.5e-147) {
tmp = x * -3.0;
} else if (z <= -7.8e-263) {
tmp = y * 4.0;
} else if (z <= -1.66e-304) {
tmp = x * -3.0;
} else if (z <= 7.2e-306) {
tmp = y * 4.0;
} else if (z <= 4e-253) {
tmp = x * -3.0;
} else if (z <= 1.9e-191) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 1.7e+146) || !(z <= 1.55e+219)) {
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 = x * (z * 6.0d0)
if (z <= (-2.2d+256)) then
tmp = t_0
else if (z <= (-9.5d+212)) then
tmp = t_1
else if (z <= (-1.5d+47)) then
tmp = t_0
else if (z <= (-920.0d0)) then
tmp = t_1
else if (z <= (-4.2d-102)) then
tmp = x * (-3.0d0)
else if (z <= (-3.9d-130)) then
tmp = y * 4.0d0
else if (z <= (-8.5d-147)) then
tmp = x * (-3.0d0)
else if (z <= (-7.8d-263)) then
tmp = y * 4.0d0
else if (z <= (-1.66d-304)) then
tmp = x * (-3.0d0)
else if (z <= 7.2d-306) then
tmp = y * 4.0d0
else if (z <= 4d-253) then
tmp = x * (-3.0d0)
else if (z <= 1.9d-191) then
tmp = y * 4.0d0
else if (z <= 0.185d0) then
tmp = x * (-3.0d0)
else if ((z <= 1.7d+146) .or. (.not. (z <= 1.55d+219))) 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 = x * (z * 6.0);
double tmp;
if (z <= -2.2e+256) {
tmp = t_0;
} else if (z <= -9.5e+212) {
tmp = t_1;
} else if (z <= -1.5e+47) {
tmp = t_0;
} else if (z <= -920.0) {
tmp = t_1;
} else if (z <= -4.2e-102) {
tmp = x * -3.0;
} else if (z <= -3.9e-130) {
tmp = y * 4.0;
} else if (z <= -8.5e-147) {
tmp = x * -3.0;
} else if (z <= -7.8e-263) {
tmp = y * 4.0;
} else if (z <= -1.66e-304) {
tmp = x * -3.0;
} else if (z <= 7.2e-306) {
tmp = y * 4.0;
} else if (z <= 4e-253) {
tmp = x * -3.0;
} else if (z <= 1.9e-191) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 1.7e+146) || !(z <= 1.55e+219)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -2.2e+256: tmp = t_0 elif z <= -9.5e+212: tmp = t_1 elif z <= -1.5e+47: tmp = t_0 elif z <= -920.0: tmp = t_1 elif z <= -4.2e-102: tmp = x * -3.0 elif z <= -3.9e-130: tmp = y * 4.0 elif z <= -8.5e-147: tmp = x * -3.0 elif z <= -7.8e-263: tmp = y * 4.0 elif z <= -1.66e-304: tmp = x * -3.0 elif z <= 7.2e-306: tmp = y * 4.0 elif z <= 4e-253: tmp = x * -3.0 elif z <= 1.9e-191: tmp = y * 4.0 elif z <= 0.185: tmp = x * -3.0 elif (z <= 1.7e+146) or not (z <= 1.55e+219): 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(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -2.2e+256) tmp = t_0; elseif (z <= -9.5e+212) tmp = t_1; elseif (z <= -1.5e+47) tmp = t_0; elseif (z <= -920.0) tmp = t_1; elseif (z <= -4.2e-102) tmp = Float64(x * -3.0); elseif (z <= -3.9e-130) tmp = Float64(y * 4.0); elseif (z <= -8.5e-147) tmp = Float64(x * -3.0); elseif (z <= -7.8e-263) tmp = Float64(y * 4.0); elseif (z <= -1.66e-304) tmp = Float64(x * -3.0); elseif (z <= 7.2e-306) tmp = Float64(y * 4.0); elseif (z <= 4e-253) tmp = Float64(x * -3.0); elseif (z <= 1.9e-191) tmp = Float64(y * 4.0); elseif (z <= 0.185) tmp = Float64(x * -3.0); elseif ((z <= 1.7e+146) || !(z <= 1.55e+219)) 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 = x * (z * 6.0); tmp = 0.0; if (z <= -2.2e+256) tmp = t_0; elseif (z <= -9.5e+212) tmp = t_1; elseif (z <= -1.5e+47) tmp = t_0; elseif (z <= -920.0) tmp = t_1; elseif (z <= -4.2e-102) tmp = x * -3.0; elseif (z <= -3.9e-130) tmp = y * 4.0; elseif (z <= -8.5e-147) tmp = x * -3.0; elseif (z <= -7.8e-263) tmp = y * 4.0; elseif (z <= -1.66e-304) tmp = x * -3.0; elseif (z <= 7.2e-306) tmp = y * 4.0; elseif (z <= 4e-253) tmp = x * -3.0; elseif (z <= 1.9e-191) tmp = y * 4.0; elseif (z <= 0.185) tmp = x * -3.0; elseif ((z <= 1.7e+146) || ~((z <= 1.55e+219))) 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[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+256], t$95$0, If[LessEqual[z, -9.5e+212], t$95$1, If[LessEqual[z, -1.5e+47], t$95$0, If[LessEqual[z, -920.0], t$95$1, If[LessEqual[z, -4.2e-102], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -3.9e-130], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -8.5e-147], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7.8e-263], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.66e-304], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.2e-306], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.9e-191], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.185], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 1.7e+146], N[Not[LessEqual[z, 1.55e+219]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+47}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -920:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-102}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-130}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-147}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-263}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.66 \cdot 10^{-304}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-306}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-191}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.185:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+146} \lor \neg \left(z \leq 1.55 \cdot 10^{+219}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.1999999999999999e256 or -9.4999999999999993e212 < z < -1.5000000000000001e47 or 1.69999999999999995e146 < z < 1.54999999999999984e219Initial program 99.8%
+-commutative99.8%
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 72.2%
Taylor expanded in z around inf 72.2%
if -2.1999999999999999e256 < z < -9.4999999999999993e212 or -1.5000000000000001e47 < z < -920 or 0.185 < z < 1.69999999999999995e146 or 1.54999999999999984e219 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 69.9%
sub-neg69.9%
distribute-rgt-in69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-lft-neg-in69.9%
associate-+r+69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-rgt-neg-in69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in z around inf 68.1%
associate-*r*68.1%
*-commutative68.1%
associate-*r*68.3%
*-commutative68.3%
Simplified68.3%
if -920 < z < -4.2e-102 or -3.9000000000000001e-130 < z < -8.5000000000000002e-147 or -7.79999999999999939e-263 < z < -1.66e-304 or 7.19999999999999982e-306 < z < 4.0000000000000003e-253 or 1.8999999999999999e-191 < z < 0.185Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.2%
sub-neg70.2%
distribute-rgt-in70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-lft-neg-in70.2%
associate-+r+70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-rgt-neg-in70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in z around 0 68.9%
*-commutative68.9%
Simplified68.9%
if -4.2e-102 < z < -3.9000000000000001e-130 or -8.5000000000000002e-147 < z < -7.79999999999999939e-263 or -1.66e-304 < z < 7.19999999999999982e-306 or 4.0000000000000003e-253 < z < 1.8999999999999999e-191Initial program 99.5%
+-commutative99.5%
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 76.8%
Taylor expanded in z around 0 76.8%
Final simplification71.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -2.7e+256)
t_0
(if (<= z -2.3e+214)
t_1
(if (<= z -1.5e+47)
(* y (* z -6.0))
(if (<= z -920.0)
t_1
(if (<= z -5.2e-102)
(* x -3.0)
(if (<= z -1.8e-131)
(* y 4.0)
(if (<= z -4.4e-148)
(* x -3.0)
(if (<= z -4.4e-266)
(* y 4.0)
(if (<= z -1.12e-305)
(* x -3.0)
(if (<= z 1.55e-304)
(* y 4.0)
(if (<= z 2.55e-253)
(* x -3.0)
(if (<= z 2.7e-191)
(* y 4.0)
(if (<= z 0.185)
(* x -3.0)
(if (or (<= z 2.2e+146) (not (<= z 2.7e+221)))
t_1
t_0))))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -2.7e+256) {
tmp = t_0;
} else if (z <= -2.3e+214) {
tmp = t_1;
} else if (z <= -1.5e+47) {
tmp = y * (z * -6.0);
} else if (z <= -920.0) {
tmp = t_1;
} else if (z <= -5.2e-102) {
tmp = x * -3.0;
} else if (z <= -1.8e-131) {
tmp = y * 4.0;
} else if (z <= -4.4e-148) {
tmp = x * -3.0;
} else if (z <= -4.4e-266) {
tmp = y * 4.0;
} else if (z <= -1.12e-305) {
tmp = x * -3.0;
} else if (z <= 1.55e-304) {
tmp = y * 4.0;
} else if (z <= 2.55e-253) {
tmp = x * -3.0;
} else if (z <= 2.7e-191) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 2.2e+146) || !(z <= 2.7e+221)) {
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 = x * (z * 6.0d0)
if (z <= (-2.7d+256)) then
tmp = t_0
else if (z <= (-2.3d+214)) then
tmp = t_1
else if (z <= (-1.5d+47)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-920.0d0)) then
tmp = t_1
else if (z <= (-5.2d-102)) then
tmp = x * (-3.0d0)
else if (z <= (-1.8d-131)) then
tmp = y * 4.0d0
else if (z <= (-4.4d-148)) then
tmp = x * (-3.0d0)
else if (z <= (-4.4d-266)) then
tmp = y * 4.0d0
else if (z <= (-1.12d-305)) then
tmp = x * (-3.0d0)
else if (z <= 1.55d-304) then
tmp = y * 4.0d0
else if (z <= 2.55d-253) then
tmp = x * (-3.0d0)
else if (z <= 2.7d-191) then
tmp = y * 4.0d0
else if (z <= 0.185d0) then
tmp = x * (-3.0d0)
else if ((z <= 2.2d+146) .or. (.not. (z <= 2.7d+221))) 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 = x * (z * 6.0);
double tmp;
if (z <= -2.7e+256) {
tmp = t_0;
} else if (z <= -2.3e+214) {
tmp = t_1;
} else if (z <= -1.5e+47) {
tmp = y * (z * -6.0);
} else if (z <= -920.0) {
tmp = t_1;
} else if (z <= -5.2e-102) {
tmp = x * -3.0;
} else if (z <= -1.8e-131) {
tmp = y * 4.0;
} else if (z <= -4.4e-148) {
tmp = x * -3.0;
} else if (z <= -4.4e-266) {
tmp = y * 4.0;
} else if (z <= -1.12e-305) {
tmp = x * -3.0;
} else if (z <= 1.55e-304) {
tmp = y * 4.0;
} else if (z <= 2.55e-253) {
tmp = x * -3.0;
} else if (z <= 2.7e-191) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 2.2e+146) || !(z <= 2.7e+221)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -2.7e+256: tmp = t_0 elif z <= -2.3e+214: tmp = t_1 elif z <= -1.5e+47: tmp = y * (z * -6.0) elif z <= -920.0: tmp = t_1 elif z <= -5.2e-102: tmp = x * -3.0 elif z <= -1.8e-131: tmp = y * 4.0 elif z <= -4.4e-148: tmp = x * -3.0 elif z <= -4.4e-266: tmp = y * 4.0 elif z <= -1.12e-305: tmp = x * -3.0 elif z <= 1.55e-304: tmp = y * 4.0 elif z <= 2.55e-253: tmp = x * -3.0 elif z <= 2.7e-191: tmp = y * 4.0 elif z <= 0.185: tmp = x * -3.0 elif (z <= 2.2e+146) or not (z <= 2.7e+221): 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(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -2.7e+256) tmp = t_0; elseif (z <= -2.3e+214) tmp = t_1; elseif (z <= -1.5e+47) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -920.0) tmp = t_1; elseif (z <= -5.2e-102) tmp = Float64(x * -3.0); elseif (z <= -1.8e-131) tmp = Float64(y * 4.0); elseif (z <= -4.4e-148) tmp = Float64(x * -3.0); elseif (z <= -4.4e-266) tmp = Float64(y * 4.0); elseif (z <= -1.12e-305) tmp = Float64(x * -3.0); elseif (z <= 1.55e-304) tmp = Float64(y * 4.0); elseif (z <= 2.55e-253) tmp = Float64(x * -3.0); elseif (z <= 2.7e-191) tmp = Float64(y * 4.0); elseif (z <= 0.185) tmp = Float64(x * -3.0); elseif ((z <= 2.2e+146) || !(z <= 2.7e+221)) 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 = x * (z * 6.0); tmp = 0.0; if (z <= -2.7e+256) tmp = t_0; elseif (z <= -2.3e+214) tmp = t_1; elseif (z <= -1.5e+47) tmp = y * (z * -6.0); elseif (z <= -920.0) tmp = t_1; elseif (z <= -5.2e-102) tmp = x * -3.0; elseif (z <= -1.8e-131) tmp = y * 4.0; elseif (z <= -4.4e-148) tmp = x * -3.0; elseif (z <= -4.4e-266) tmp = y * 4.0; elseif (z <= -1.12e-305) tmp = x * -3.0; elseif (z <= 1.55e-304) tmp = y * 4.0; elseif (z <= 2.55e-253) tmp = x * -3.0; elseif (z <= 2.7e-191) tmp = y * 4.0; elseif (z <= 0.185) tmp = x * -3.0; elseif ((z <= 2.2e+146) || ~((z <= 2.7e+221))) 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[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+256], t$95$0, If[LessEqual[z, -2.3e+214], t$95$1, If[LessEqual[z, -1.5e+47], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -920.0], t$95$1, If[LessEqual[z, -5.2e-102], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.8e-131], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -4.4e-148], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4.4e-266], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.12e-305], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.55e-304], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.55e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.7e-191], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.185], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 2.2e+146], N[Not[LessEqual[z, 2.7e+221]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -920:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-102}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-131}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-148}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-266}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-305}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-304}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-191}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.185:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+146} \lor \neg \left(z \leq 2.7 \cdot 10^{+221}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.69999999999999995e256 or 2.1999999999999998e146 < z < 2.7e221Initial 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 76.6%
Taylor expanded in z around inf 76.6%
if -2.69999999999999995e256 < z < -2.2999999999999999e214 or -1.5000000000000001e47 < z < -920 or 0.185 < z < 2.1999999999999998e146 or 2.7e221 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 69.9%
sub-neg69.9%
distribute-rgt-in69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-lft-neg-in69.9%
associate-+r+69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-rgt-neg-in69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in z around inf 68.1%
associate-*r*68.1%
*-commutative68.1%
associate-*r*68.3%
*-commutative68.3%
Simplified68.3%
if -2.2999999999999999e214 < z < -1.5000000000000001e47Initial program 99.9%
+-commutative99.9%
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 67.5%
Taylor expanded in z around inf 67.5%
if -920 < z < -5.19999999999999973e-102 or -1.8e-131 < z < -4.40000000000000034e-148 or -4.3999999999999999e-266 < z < -1.1200000000000001e-305 or 1.54999999999999992e-304 < z < 2.55000000000000004e-253 or 2.69999999999999999e-191 < z < 0.185Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.2%
sub-neg70.2%
distribute-rgt-in70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-lft-neg-in70.2%
associate-+r+70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-rgt-neg-in70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in z around 0 68.9%
*-commutative68.9%
Simplified68.9%
if -5.19999999999999973e-102 < z < -1.8e-131 or -4.40000000000000034e-148 < z < -4.3999999999999999e-266 or -1.1200000000000001e-305 < z < 1.54999999999999992e-304 or 2.55000000000000004e-253 < z < 2.69999999999999999e-191Initial program 99.5%
+-commutative99.5%
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 76.8%
Taylor expanded in z around 0 76.8%
Final simplification71.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -2.95e+256)
(* -6.0 (* y z))
(if (<= z -4.6e+214)
t_0
(if (<= z -7.8e+46)
(* y (* z -6.0))
(if (<= z -920.0)
t_0
(if (<= z -1.42e-102)
(* x -3.0)
(if (<= z -1.52e-127)
(* y 4.0)
(if (<= z -9e-148)
(* x -3.0)
(if (<= z -1.52e-263)
(* y 4.0)
(if (<= z -4e-305)
(* x -3.0)
(if (<= z 4.2e-306)
(* y 4.0)
(if (<= z 2.65e-253)
(* x -3.0)
(if (<= z 7.5e-190)
(* y 4.0)
(if (<= z 0.185)
(* x -3.0)
(if (or (<= z 1.4e+146) (not (<= z 9.6e+218)))
t_0
(* z (* y -6.0))))))))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -2.95e+256) {
tmp = -6.0 * (y * z);
} else if (z <= -4.6e+214) {
tmp = t_0;
} else if (z <= -7.8e+46) {
tmp = y * (z * -6.0);
} else if (z <= -920.0) {
tmp = t_0;
} else if (z <= -1.42e-102) {
tmp = x * -3.0;
} else if (z <= -1.52e-127) {
tmp = y * 4.0;
} else if (z <= -9e-148) {
tmp = x * -3.0;
} else if (z <= -1.52e-263) {
tmp = y * 4.0;
} else if (z <= -4e-305) {
tmp = x * -3.0;
} else if (z <= 4.2e-306) {
tmp = y * 4.0;
} else if (z <= 2.65e-253) {
tmp = x * -3.0;
} else if (z <= 7.5e-190) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 1.4e+146) || !(z <= 9.6e+218)) {
tmp = t_0;
} else {
tmp = z * (y * -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) :: t_0
real(8) :: tmp
t_0 = x * (z * 6.0d0)
if (z <= (-2.95d+256)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-4.6d+214)) then
tmp = t_0
else if (z <= (-7.8d+46)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-920.0d0)) then
tmp = t_0
else if (z <= (-1.42d-102)) then
tmp = x * (-3.0d0)
else if (z <= (-1.52d-127)) then
tmp = y * 4.0d0
else if (z <= (-9d-148)) then
tmp = x * (-3.0d0)
else if (z <= (-1.52d-263)) then
tmp = y * 4.0d0
else if (z <= (-4d-305)) then
tmp = x * (-3.0d0)
else if (z <= 4.2d-306) then
tmp = y * 4.0d0
else if (z <= 2.65d-253) then
tmp = x * (-3.0d0)
else if (z <= 7.5d-190) then
tmp = y * 4.0d0
else if (z <= 0.185d0) then
tmp = x * (-3.0d0)
else if ((z <= 1.4d+146) .or. (.not. (z <= 9.6d+218))) then
tmp = t_0
else
tmp = z * (y * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -2.95e+256) {
tmp = -6.0 * (y * z);
} else if (z <= -4.6e+214) {
tmp = t_0;
} else if (z <= -7.8e+46) {
tmp = y * (z * -6.0);
} else if (z <= -920.0) {
tmp = t_0;
} else if (z <= -1.42e-102) {
tmp = x * -3.0;
} else if (z <= -1.52e-127) {
tmp = y * 4.0;
} else if (z <= -9e-148) {
tmp = x * -3.0;
} else if (z <= -1.52e-263) {
tmp = y * 4.0;
} else if (z <= -4e-305) {
tmp = x * -3.0;
} else if (z <= 4.2e-306) {
tmp = y * 4.0;
} else if (z <= 2.65e-253) {
tmp = x * -3.0;
} else if (z <= 7.5e-190) {
tmp = y * 4.0;
} else if (z <= 0.185) {
tmp = x * -3.0;
} else if ((z <= 1.4e+146) || !(z <= 9.6e+218)) {
tmp = t_0;
} else {
tmp = z * (y * -6.0);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -2.95e+256: tmp = -6.0 * (y * z) elif z <= -4.6e+214: tmp = t_0 elif z <= -7.8e+46: tmp = y * (z * -6.0) elif z <= -920.0: tmp = t_0 elif z <= -1.42e-102: tmp = x * -3.0 elif z <= -1.52e-127: tmp = y * 4.0 elif z <= -9e-148: tmp = x * -3.0 elif z <= -1.52e-263: tmp = y * 4.0 elif z <= -4e-305: tmp = x * -3.0 elif z <= 4.2e-306: tmp = y * 4.0 elif z <= 2.65e-253: tmp = x * -3.0 elif z <= 7.5e-190: tmp = y * 4.0 elif z <= 0.185: tmp = x * -3.0 elif (z <= 1.4e+146) or not (z <= 9.6e+218): tmp = t_0 else: tmp = z * (y * -6.0) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -2.95e+256) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -4.6e+214) tmp = t_0; elseif (z <= -7.8e+46) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -920.0) tmp = t_0; elseif (z <= -1.42e-102) tmp = Float64(x * -3.0); elseif (z <= -1.52e-127) tmp = Float64(y * 4.0); elseif (z <= -9e-148) tmp = Float64(x * -3.0); elseif (z <= -1.52e-263) tmp = Float64(y * 4.0); elseif (z <= -4e-305) tmp = Float64(x * -3.0); elseif (z <= 4.2e-306) tmp = Float64(y * 4.0); elseif (z <= 2.65e-253) tmp = Float64(x * -3.0); elseif (z <= 7.5e-190) tmp = Float64(y * 4.0); elseif (z <= 0.185) tmp = Float64(x * -3.0); elseif ((z <= 1.4e+146) || !(z <= 9.6e+218)) tmp = t_0; else tmp = Float64(z * Float64(y * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -2.95e+256) tmp = -6.0 * (y * z); elseif (z <= -4.6e+214) tmp = t_0; elseif (z <= -7.8e+46) tmp = y * (z * -6.0); elseif (z <= -920.0) tmp = t_0; elseif (z <= -1.42e-102) tmp = x * -3.0; elseif (z <= -1.52e-127) tmp = y * 4.0; elseif (z <= -9e-148) tmp = x * -3.0; elseif (z <= -1.52e-263) tmp = y * 4.0; elseif (z <= -4e-305) tmp = x * -3.0; elseif (z <= 4.2e-306) tmp = y * 4.0; elseif (z <= 2.65e-253) tmp = x * -3.0; elseif (z <= 7.5e-190) tmp = y * 4.0; elseif (z <= 0.185) tmp = x * -3.0; elseif ((z <= 1.4e+146) || ~((z <= 9.6e+218))) tmp = t_0; else tmp = z * (y * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.95e+256], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e+214], t$95$0, If[LessEqual[z, -7.8e+46], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -920.0], t$95$0, If[LessEqual[z, -1.42e-102], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.52e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -9e-148], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.52e-263], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -4e-305], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.2e-306], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.65e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.5e-190], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.185], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 1.4e+146], N[Not[LessEqual[z, 9.6e+218]], $MachinePrecision]], t$95$0, N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -2.95 \cdot 10^{+256}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{+214}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{+46}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -920:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.42 \cdot 10^{-102}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.52 \cdot 10^{-127}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-148}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.52 \cdot 10^{-263}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-305}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-306}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-190}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.185:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+146} \lor \neg \left(z \leq 9.6 \cdot 10^{+218}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\end{array}
\end{array}
if z < -2.95000000000000012e256Initial program 100.0%
+-commutative100.0%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
metadata-eval100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 88.9%
Taylor expanded in z around inf 88.9%
if -2.95000000000000012e256 < z < -4.5999999999999998e214 or -7.7999999999999999e46 < z < -920 or 0.185 < z < 1.4e146 or 9.59999999999999923e218 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 69.9%
sub-neg69.9%
distribute-rgt-in69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-lft-neg-in69.9%
associate-+r+69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-rgt-neg-in69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in z around inf 68.1%
associate-*r*68.1%
*-commutative68.1%
associate-*r*68.3%
*-commutative68.3%
Simplified68.3%
if -4.5999999999999998e214 < z < -7.7999999999999999e46Initial program 99.9%
+-commutative99.9%
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 67.5%
Taylor expanded in z around inf 67.5%
if -920 < z < -1.42000000000000009e-102 or -1.5200000000000001e-127 < z < -9.00000000000000029e-148 or -1.52000000000000005e-263 < z < -3.99999999999999999e-305 or 4.2000000000000002e-306 < z < 2.6500000000000001e-253 or 7.5e-190 < z < 0.185Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.2%
sub-neg70.2%
distribute-rgt-in70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-lft-neg-in70.2%
associate-+r+70.2%
metadata-eval70.2%
metadata-eval70.2%
distribute-rgt-neg-in70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in z around 0 68.9%
*-commutative68.9%
Simplified68.9%
if -1.42000000000000009e-102 < z < -1.5200000000000001e-127 or -9.00000000000000029e-148 < z < -1.52000000000000005e-263 or -3.99999999999999999e-305 < z < 4.2000000000000002e-306 or 2.6500000000000001e-253 < z < 7.5e-190Initial program 99.5%
+-commutative99.5%
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 76.8%
Taylor expanded in z around 0 76.8%
if 1.4e146 < z < 9.59999999999999923e218Initial program 99.5%
+-commutative99.5%
associate-*l*99.5%
fma-def99.5%
sub-neg99.5%
distribute-rgt-in99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-out99.5%
distribute-rgt-neg-in99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 70.1%
Taylor expanded in z around inf 70.1%
associate-*r*70.2%
Simplified70.2%
Final simplification71.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.08)
t_0
(if (<= z -6e-102)
(* x -3.0)
(if (<= z -4.4e-128)
(* y 4.0)
(if (<= z -1.2e-148)
(* x -3.0)
(if (<= z -1.7e-263)
(* y 4.0)
(if (<= z -3.1e-305)
(* x -3.0)
(if (<= z 4e-306)
(* y 4.0)
(if (<= z 8.8e-253)
(* x -3.0)
(if (<= z 1.6e-191)
(* y 4.0)
(if (<= z 0.52) (* x -3.0) t_0))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -0.08) {
tmp = t_0;
} else if (z <= -6e-102) {
tmp = x * -3.0;
} else if (z <= -4.4e-128) {
tmp = y * 4.0;
} else if (z <= -1.2e-148) {
tmp = x * -3.0;
} else if (z <= -1.7e-263) {
tmp = y * 4.0;
} else if (z <= -3.1e-305) {
tmp = x * -3.0;
} else if (z <= 4e-306) {
tmp = y * 4.0;
} else if (z <= 8.8e-253) {
tmp = x * -3.0;
} else if (z <= 1.6e-191) {
tmp = y * 4.0;
} else if (z <= 0.52) {
tmp = x * -3.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.08d0)) then
tmp = t_0
else if (z <= (-6d-102)) then
tmp = x * (-3.0d0)
else if (z <= (-4.4d-128)) then
tmp = y * 4.0d0
else if (z <= (-1.2d-148)) then
tmp = x * (-3.0d0)
else if (z <= (-1.7d-263)) then
tmp = y * 4.0d0
else if (z <= (-3.1d-305)) then
tmp = x * (-3.0d0)
else if (z <= 4d-306) then
tmp = y * 4.0d0
else if (z <= 8.8d-253) then
tmp = x * (-3.0d0)
else if (z <= 1.6d-191) then
tmp = y * 4.0d0
else if (z <= 0.52d0) then
tmp = x * (-3.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.08) {
tmp = t_0;
} else if (z <= -6e-102) {
tmp = x * -3.0;
} else if (z <= -4.4e-128) {
tmp = y * 4.0;
} else if (z <= -1.2e-148) {
tmp = x * -3.0;
} else if (z <= -1.7e-263) {
tmp = y * 4.0;
} else if (z <= -3.1e-305) {
tmp = x * -3.0;
} else if (z <= 4e-306) {
tmp = y * 4.0;
} else if (z <= 8.8e-253) {
tmp = x * -3.0;
} else if (z <= 1.6e-191) {
tmp = y * 4.0;
} else if (z <= 0.52) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -0.08: tmp = t_0 elif z <= -6e-102: tmp = x * -3.0 elif z <= -4.4e-128: tmp = y * 4.0 elif z <= -1.2e-148: tmp = x * -3.0 elif z <= -1.7e-263: tmp = y * 4.0 elif z <= -3.1e-305: tmp = x * -3.0 elif z <= 4e-306: tmp = y * 4.0 elif z <= 8.8e-253: tmp = x * -3.0 elif z <= 1.6e-191: tmp = y * 4.0 elif z <= 0.52: tmp = x * -3.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.08) tmp = t_0; elseif (z <= -6e-102) tmp = Float64(x * -3.0); elseif (z <= -4.4e-128) tmp = Float64(y * 4.0); elseif (z <= -1.2e-148) tmp = Float64(x * -3.0); elseif (z <= -1.7e-263) tmp = Float64(y * 4.0); elseif (z <= -3.1e-305) tmp = Float64(x * -3.0); elseif (z <= 4e-306) tmp = Float64(y * 4.0); elseif (z <= 8.8e-253) tmp = Float64(x * -3.0); elseif (z <= 1.6e-191) tmp = Float64(y * 4.0); elseif (z <= 0.52) tmp = Float64(x * -3.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.08) tmp = t_0; elseif (z <= -6e-102) tmp = x * -3.0; elseif (z <= -4.4e-128) tmp = y * 4.0; elseif (z <= -1.2e-148) tmp = x * -3.0; elseif (z <= -1.7e-263) tmp = y * 4.0; elseif (z <= -3.1e-305) tmp = x * -3.0; elseif (z <= 4e-306) tmp = y * 4.0; elseif (z <= 8.8e-253) tmp = x * -3.0; elseif (z <= 1.6e-191) tmp = y * 4.0; elseif (z <= 0.52) tmp = x * -3.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.08], t$95$0, If[LessEqual[z, -6e-102], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4.4e-128], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.2e-148], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.7e-263], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.1e-305], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4e-306], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.8e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.6e-191], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.52], N[(x * -3.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.08:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-102}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-128}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-148}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-263}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-305}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-306}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-191}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.0800000000000000017 or 0.52000000000000002 < 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 49.6%
Taylor expanded in z around inf 47.9%
if -0.0800000000000000017 < z < -6e-102 or -4.40000000000000019e-128 < z < -1.2000000000000001e-148 or -1.70000000000000002e-263 < z < -3.0999999999999998e-305 or 4.00000000000000011e-306 < z < 8.79999999999999983e-253 or 1.6000000000000002e-191 < z < 0.52000000000000002Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 71.0%
sub-neg71.0%
distribute-rgt-in71.0%
metadata-eval71.0%
metadata-eval71.0%
distribute-lft-neg-in71.0%
associate-+r+71.0%
metadata-eval71.0%
metadata-eval71.0%
distribute-rgt-neg-in71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in z around 0 69.7%
*-commutative69.7%
Simplified69.7%
if -6e-102 < z < -4.40000000000000019e-128 or -1.2000000000000001e-148 < z < -1.70000000000000002e-263 or -3.0999999999999998e-305 < z < 4.00000000000000011e-306 or 8.79999999999999983e-253 < z < 1.6000000000000002e-191Initial program 99.5%
+-commutative99.5%
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 76.8%
Taylor expanded in z around 0 76.8%
Final simplification61.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z)))
(t_1 (* x (+ -3.0 (* z 6.0))))
(t_2 (* x (* z 6.0))))
(if (<= z -4.2e+256)
t_0
(if (<= z -2.9e+215)
t_2
(if (<= z -2e+46)
(* y (* z -6.0))
(if (<= z -1.3e-10)
t_1
(if (<= z 0.19)
(+ x (* (- y x) 4.0))
(if (<= z 3.4e+146) t_1 (if (<= z 3.2e+223) (+ x t_0) t_2)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (-3.0 + (z * 6.0));
double t_2 = x * (z * 6.0);
double tmp;
if (z <= -4.2e+256) {
tmp = t_0;
} else if (z <= -2.9e+215) {
tmp = t_2;
} else if (z <= -2e+46) {
tmp = y * (z * -6.0);
} else if (z <= -1.3e-10) {
tmp = t_1;
} else if (z <= 0.19) {
tmp = x + ((y - x) * 4.0);
} else if (z <= 3.4e+146) {
tmp = t_1;
} else if (z <= 3.2e+223) {
tmp = x + 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) * (y * z)
t_1 = x * ((-3.0d0) + (z * 6.0d0))
t_2 = x * (z * 6.0d0)
if (z <= (-4.2d+256)) then
tmp = t_0
else if (z <= (-2.9d+215)) then
tmp = t_2
else if (z <= (-2d+46)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-1.3d-10)) then
tmp = t_1
else if (z <= 0.19d0) then
tmp = x + ((y - x) * 4.0d0)
else if (z <= 3.4d+146) then
tmp = t_1
else if (z <= 3.2d+223) then
tmp = x + 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 * (y * z);
double t_1 = x * (-3.0 + (z * 6.0));
double t_2 = x * (z * 6.0);
double tmp;
if (z <= -4.2e+256) {
tmp = t_0;
} else if (z <= -2.9e+215) {
tmp = t_2;
} else if (z <= -2e+46) {
tmp = y * (z * -6.0);
} else if (z <= -1.3e-10) {
tmp = t_1;
} else if (z <= 0.19) {
tmp = x + ((y - x) * 4.0);
} else if (z <= 3.4e+146) {
tmp = t_1;
} else if (z <= 3.2e+223) {
tmp = x + t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (-3.0 + (z * 6.0)) t_2 = x * (z * 6.0) tmp = 0 if z <= -4.2e+256: tmp = t_0 elif z <= -2.9e+215: tmp = t_2 elif z <= -2e+46: tmp = y * (z * -6.0) elif z <= -1.3e-10: tmp = t_1 elif z <= 0.19: tmp = x + ((y - x) * 4.0) elif z <= 3.4e+146: tmp = t_1 elif z <= 3.2e+223: tmp = x + t_0 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) t_2 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -4.2e+256) tmp = t_0; elseif (z <= -2.9e+215) tmp = t_2; elseif (z <= -2e+46) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -1.3e-10) tmp = t_1; elseif (z <= 0.19) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); elseif (z <= 3.4e+146) tmp = t_1; elseif (z <= 3.2e+223) tmp = Float64(x + t_0); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = x * (-3.0 + (z * 6.0)); t_2 = x * (z * 6.0); tmp = 0.0; if (z <= -4.2e+256) tmp = t_0; elseif (z <= -2.9e+215) tmp = t_2; elseif (z <= -2e+46) tmp = y * (z * -6.0); elseif (z <= -1.3e-10) tmp = t_1; elseif (z <= 0.19) tmp = x + ((y - x) * 4.0); elseif (z <= 3.4e+146) tmp = t_1; elseif (z <= 3.2e+223) tmp = x + t_0; else tmp = t_2; 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[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+256], t$95$0, If[LessEqual[z, -2.9e+215], t$95$2, If[LessEqual[z, -2e+46], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-10], t$95$1, If[LessEqual[z, 0.19], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+146], t$95$1, If[LessEqual[z, 3.2e+223], N[(x + t$95$0), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(-3 + z \cdot 6\right)\\
t_2 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{+215}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2 \cdot 10^{+46}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.19:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+223}:\\
\;\;\;\;x + t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.2e256Initial program 100.0%
+-commutative100.0%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
metadata-eval100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 88.9%
Taylor expanded in z around inf 88.9%
if -4.2e256 < z < -2.8999999999999999e215 or 3.2000000000000001e223 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 75.9%
sub-neg75.9%
distribute-rgt-in75.9%
metadata-eval75.9%
metadata-eval75.9%
distribute-lft-neg-in75.9%
associate-+r+75.9%
metadata-eval75.9%
metadata-eval75.9%
distribute-rgt-neg-in75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in z around inf 75.7%
associate-*r*75.8%
*-commutative75.8%
associate-*r*75.9%
*-commutative75.9%
Simplified75.9%
if -2.8999999999999999e215 < z < -2e46Initial program 99.9%
+-commutative99.9%
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 67.5%
Taylor expanded in z around inf 67.5%
if -2e46 < z < -1.29999999999999991e-10 or 0.19 < z < 3.39999999999999991e146Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
if -1.29999999999999991e-10 < z < 0.19Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 98.5%
if 3.39999999999999991e146 < z < 3.2000000000000001e223Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 70.2%
associate-*r*70.3%
Simplified70.3%
Taylor expanded in z around inf 70.2%
*-commutative70.2%
Simplified70.2%
Final simplification85.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z)))
(t_1 (* x (+ -3.0 (* z 6.0))))
(t_2 (* x (* z 6.0))))
(if (<= z -4.6e+256)
t_0
(if (<= z -1.22e+213)
t_2
(if (<= z -2.7e+47)
(* y (* z -6.0))
(if (<= z -1.7e-9)
t_1
(if (<= z 0.19)
(+ (* x -3.0) (* y 4.0))
(if (<= z 4.6e+146) t_1 (if (<= z 3.2e+221) (+ x t_0) t_2)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (-3.0 + (z * 6.0));
double t_2 = x * (z * 6.0);
double tmp;
if (z <= -4.6e+256) {
tmp = t_0;
} else if (z <= -1.22e+213) {
tmp = t_2;
} else if (z <= -2.7e+47) {
tmp = y * (z * -6.0);
} else if (z <= -1.7e-9) {
tmp = t_1;
} else if (z <= 0.19) {
tmp = (x * -3.0) + (y * 4.0);
} else if (z <= 4.6e+146) {
tmp = t_1;
} else if (z <= 3.2e+221) {
tmp = x + 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) * (y * z)
t_1 = x * ((-3.0d0) + (z * 6.0d0))
t_2 = x * (z * 6.0d0)
if (z <= (-4.6d+256)) then
tmp = t_0
else if (z <= (-1.22d+213)) then
tmp = t_2
else if (z <= (-2.7d+47)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-1.7d-9)) then
tmp = t_1
else if (z <= 0.19d0) then
tmp = (x * (-3.0d0)) + (y * 4.0d0)
else if (z <= 4.6d+146) then
tmp = t_1
else if (z <= 3.2d+221) then
tmp = x + 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 * (y * z);
double t_1 = x * (-3.0 + (z * 6.0));
double t_2 = x * (z * 6.0);
double tmp;
if (z <= -4.6e+256) {
tmp = t_0;
} else if (z <= -1.22e+213) {
tmp = t_2;
} else if (z <= -2.7e+47) {
tmp = y * (z * -6.0);
} else if (z <= -1.7e-9) {
tmp = t_1;
} else if (z <= 0.19) {
tmp = (x * -3.0) + (y * 4.0);
} else if (z <= 4.6e+146) {
tmp = t_1;
} else if (z <= 3.2e+221) {
tmp = x + t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (-3.0 + (z * 6.0)) t_2 = x * (z * 6.0) tmp = 0 if z <= -4.6e+256: tmp = t_0 elif z <= -1.22e+213: tmp = t_2 elif z <= -2.7e+47: tmp = y * (z * -6.0) elif z <= -1.7e-9: tmp = t_1 elif z <= 0.19: tmp = (x * -3.0) + (y * 4.0) elif z <= 4.6e+146: tmp = t_1 elif z <= 3.2e+221: tmp = x + t_0 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) t_2 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -4.6e+256) tmp = t_0; elseif (z <= -1.22e+213) tmp = t_2; elseif (z <= -2.7e+47) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -1.7e-9) tmp = t_1; elseif (z <= 0.19) tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); elseif (z <= 4.6e+146) tmp = t_1; elseif (z <= 3.2e+221) tmp = Float64(x + t_0); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = x * (-3.0 + (z * 6.0)); t_2 = x * (z * 6.0); tmp = 0.0; if (z <= -4.6e+256) tmp = t_0; elseif (z <= -1.22e+213) tmp = t_2; elseif (z <= -2.7e+47) tmp = y * (z * -6.0); elseif (z <= -1.7e-9) tmp = t_1; elseif (z <= 0.19) tmp = (x * -3.0) + (y * 4.0); elseif (z <= 4.6e+146) tmp = t_1; elseif (z <= 3.2e+221) tmp = x + t_0; else tmp = t_2; 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[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+256], t$95$0, If[LessEqual[z, -1.22e+213], t$95$2, If[LessEqual[z, -2.7e+47], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e-9], t$95$1, If[LessEqual[z, 0.19], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+146], t$95$1, If[LessEqual[z, 3.2e+221], N[(x + t$95$0), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(-3 + z \cdot 6\right)\\
t_2 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{+213}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.19:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+221}:\\
\;\;\;\;x + t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.5999999999999997e256Initial program 100.0%
+-commutative100.0%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
metadata-eval100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 88.9%
Taylor expanded in z around inf 88.9%
if -4.5999999999999997e256 < z < -1.2199999999999999e213 or 3.2e221 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 75.9%
sub-neg75.9%
distribute-rgt-in75.9%
metadata-eval75.9%
metadata-eval75.9%
distribute-lft-neg-in75.9%
associate-+r+75.9%
metadata-eval75.9%
metadata-eval75.9%
distribute-rgt-neg-in75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in z around inf 75.7%
associate-*r*75.8%
*-commutative75.8%
associate-*r*75.9%
*-commutative75.9%
Simplified75.9%
if -1.2199999999999999e213 < z < -2.69999999999999996e47Initial program 99.9%
+-commutative99.9%
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 67.5%
Taylor expanded in z around inf 67.5%
if -2.69999999999999996e47 < z < -1.6999999999999999e-9 or 0.19 < z < 4.60000000000000001e146Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
if -1.6999999999999999e-9 < z < 0.19Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.7%
Taylor expanded in z around 0 98.5%
if 4.60000000000000001e146 < z < 3.2e221Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 70.2%
associate-*r*70.3%
Simplified70.3%
Taylor expanded in z around inf 70.2%
*-commutative70.2%
Simplified70.2%
Final simplification85.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ -3.0 (* z 6.0)))) (t_1 (* x (* z 6.0))))
(if (<= z -3.3e+256)
(* -6.0 (* y z))
(if (<= z -1.5e+214)
t_1
(if (<= z -1.7e+47)
(* y (* z -6.0))
(if (<= z -1.4e-10)
t_0
(if (<= z 0.19)
(+ (* x -3.0) (* y 4.0))
(if (<= z 3e+146)
t_0
(if (<= z 2.4e+221) (- x (* z (* y 6.0))) t_1)))))))))
double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -3.3e+256) {
tmp = -6.0 * (y * z);
} else if (z <= -1.5e+214) {
tmp = t_1;
} else if (z <= -1.7e+47) {
tmp = y * (z * -6.0);
} else if (z <= -1.4e-10) {
tmp = t_0;
} else if (z <= 0.19) {
tmp = (x * -3.0) + (y * 4.0);
} else if (z <= 3e+146) {
tmp = t_0;
} else if (z <= 2.4e+221) {
tmp = x - (z * (y * 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 * ((-3.0d0) + (z * 6.0d0))
t_1 = x * (z * 6.0d0)
if (z <= (-3.3d+256)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-1.5d+214)) then
tmp = t_1
else if (z <= (-1.7d+47)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-1.4d-10)) then
tmp = t_0
else if (z <= 0.19d0) then
tmp = (x * (-3.0d0)) + (y * 4.0d0)
else if (z <= 3d+146) then
tmp = t_0
else if (z <= 2.4d+221) then
tmp = x - (z * (y * 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 * (-3.0 + (z * 6.0));
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -3.3e+256) {
tmp = -6.0 * (y * z);
} else if (z <= -1.5e+214) {
tmp = t_1;
} else if (z <= -1.7e+47) {
tmp = y * (z * -6.0);
} else if (z <= -1.4e-10) {
tmp = t_0;
} else if (z <= 0.19) {
tmp = (x * -3.0) + (y * 4.0);
} else if (z <= 3e+146) {
tmp = t_0;
} else if (z <= 2.4e+221) {
tmp = x - (z * (y * 6.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (-3.0 + (z * 6.0)) t_1 = x * (z * 6.0) tmp = 0 if z <= -3.3e+256: tmp = -6.0 * (y * z) elif z <= -1.5e+214: tmp = t_1 elif z <= -1.7e+47: tmp = y * (z * -6.0) elif z <= -1.4e-10: tmp = t_0 elif z <= 0.19: tmp = (x * -3.0) + (y * 4.0) elif z <= 3e+146: tmp = t_0 elif z <= 2.4e+221: tmp = x - (z * (y * 6.0)) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -3.3e+256) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -1.5e+214) tmp = t_1; elseif (z <= -1.7e+47) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -1.4e-10) tmp = t_0; elseif (z <= 0.19) tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); elseif (z <= 3e+146) tmp = t_0; elseif (z <= 2.4e+221) tmp = Float64(x - Float64(z * Float64(y * 6.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (-3.0 + (z * 6.0)); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -3.3e+256) tmp = -6.0 * (y * z); elseif (z <= -1.5e+214) tmp = t_1; elseif (z <= -1.7e+47) tmp = y * (z * -6.0); elseif (z <= -1.4e-10) tmp = t_0; elseif (z <= 0.19) tmp = (x * -3.0) + (y * 4.0); elseif (z <= 3e+146) tmp = t_0; elseif (z <= 2.4e+221) tmp = x - (z * (y * 6.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+256], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e+214], t$95$1, If[LessEqual[z, -1.7e+47], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.4e-10], t$95$0, If[LessEqual[z, 0.19], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+146], t$95$0, If[LessEqual[z, 2.4e+221], N[(x - N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-3 + z \cdot 6\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+256}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 0.19:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+146}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+221}:\\
\;\;\;\;x - z \cdot \left(y \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.2999999999999999e256Initial program 100.0%
+-commutative100.0%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
metadata-eval100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 88.9%
Taylor expanded in z around inf 88.9%
if -3.2999999999999999e256 < z < -1.5000000000000001e214 or 2.40000000000000019e221 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 75.9%
sub-neg75.9%
distribute-rgt-in75.9%
metadata-eval75.9%
metadata-eval75.9%
distribute-lft-neg-in75.9%
associate-+r+75.9%
metadata-eval75.9%
metadata-eval75.9%
distribute-rgt-neg-in75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in z around inf 75.7%
associate-*r*75.8%
*-commutative75.8%
associate-*r*75.9%
*-commutative75.9%
Simplified75.9%
if -1.5000000000000001e214 < z < -1.6999999999999999e47Initial program 99.9%
+-commutative99.9%
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 67.5%
Taylor expanded in z around inf 67.5%
if -1.6999999999999999e47 < z < -1.40000000000000008e-10 or 0.19 < z < 3.00000000000000002e146Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
if -1.40000000000000008e-10 < z < 0.19Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.7%
Taylor expanded in z around 0 98.5%
if 3.00000000000000002e146 < z < 2.40000000000000019e221Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 70.2%
associate-*r*70.3%
Simplified70.3%
Taylor expanded in z around inf 70.3%
neg-mul-170.3%
Simplified70.3%
Final simplification85.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z)))))
(if (<= y -7.3e-104)
t_0
(if (<= y -5.6e-205)
(* x -3.0)
(if (<= y -6.2e-277)
(* x (* z 6.0))
(if (<= y 1.3e-96) (* x -3.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double tmp;
if (y <= -7.3e-104) {
tmp = t_0;
} else if (y <= -5.6e-205) {
tmp = x * -3.0;
} else if (y <= -6.2e-277) {
tmp = x * (z * 6.0);
} else if (y <= 1.3e-96) {
tmp = x * -3.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 * (0.6666666666666666d0 - z))
if (y <= (-7.3d-104)) then
tmp = t_0
else if (y <= (-5.6d-205)) then
tmp = x * (-3.0d0)
else if (y <= (-6.2d-277)) then
tmp = x * (z * 6.0d0)
else if (y <= 1.3d-96) then
tmp = x * (-3.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 * (0.6666666666666666 - z));
double tmp;
if (y <= -7.3e-104) {
tmp = t_0;
} else if (y <= -5.6e-205) {
tmp = x * -3.0;
} else if (y <= -6.2e-277) {
tmp = x * (z * 6.0);
} else if (y <= 1.3e-96) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) tmp = 0 if y <= -7.3e-104: tmp = t_0 elif y <= -5.6e-205: tmp = x * -3.0 elif y <= -6.2e-277: tmp = x * (z * 6.0) elif y <= 1.3e-96: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) tmp = 0.0 if (y <= -7.3e-104) tmp = t_0; elseif (y <= -5.6e-205) tmp = Float64(x * -3.0); elseif (y <= -6.2e-277) tmp = Float64(x * Float64(z * 6.0)); elseif (y <= 1.3e-96) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); tmp = 0.0; if (y <= -7.3e-104) tmp = t_0; elseif (y <= -5.6e-205) tmp = x * -3.0; elseif (y <= -6.2e-277) tmp = x * (z * 6.0); elseif (y <= 1.3e-96) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.3e-104], t$95$0, If[LessEqual[y, -5.6e-205], N[(x * -3.0), $MachinePrecision], If[LessEqual[y, -6.2e-277], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-96], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{if}\;y \leq -7.3 \cdot 10^{-104}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-205}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-277}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-96}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -7.3e-104 or 1.3000000000000001e-96 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
flip-+32.2%
pow232.2%
associate-*l*32.1%
pow232.1%
associate-*l*32.3%
Applied egg-rr32.3%
Taylor expanded in y around inf 90.2%
Taylor expanded in x around 0 69.7%
if -7.3e-104 < y < -5.59999999999999983e-205 or -6.19999999999999958e-277 < y < 1.3000000000000001e-96Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 86.5%
sub-neg86.5%
distribute-rgt-in86.5%
metadata-eval86.5%
metadata-eval86.5%
distribute-lft-neg-in86.5%
associate-+r+86.5%
metadata-eval86.5%
metadata-eval86.5%
distribute-rgt-neg-in86.5%
metadata-eval86.5%
Simplified86.5%
Taylor expanded in z around 0 53.4%
*-commutative53.4%
Simplified53.4%
if -5.59999999999999983e-205 < y < -6.19999999999999958e-277Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
associate-+r+99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 67.5%
associate-*r*67.5%
*-commutative67.5%
associate-*r*67.7%
*-commutative67.7%
Simplified67.7%
Final simplification64.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.5))) (* z (+ (* y -6.0) (* x 6.0))) (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.5)) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else {
tmp = (x * -3.0) + (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 ((z <= (-0.58d0)) .or. (.not. (z <= 0.5d0))) then
tmp = z * ((y * (-6.0d0)) + (x * 6.0d0))
else
tmp = (x * (-3.0d0)) + (y * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.5)) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.5): tmp = z * ((y * -6.0) + (x * 6.0)) else: tmp = (x * -3.0) + (y * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.5)) tmp = Float64(z * Float64(Float64(y * -6.0) + Float64(x * 6.0))); else tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.5))) tmp = z * ((y * -6.0) + (x * 6.0)); else tmp = (x * -3.0) + (y * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.5]], $MachinePrecision]], N[(z * N[(N[(y * -6.0), $MachinePrecision] + N[(x * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.5\right):\\
\;\;\;\;z \cdot \left(y \cdot -6 + x \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 97.1%
Taylor expanded in z around inf 97.8%
if -0.57999999999999996 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.7%
Taylor expanded in z around 0 97.5%
Final simplification97.6%
(FPCore (x y z) :precision binary64 (if (<= z -0.52) (* z (+ (* y -6.0) (* x 6.0))) (if (<= z 0.5) (+ (* x -3.0) (* y 4.0)) (+ x (* -6.0 (* (- y x) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.52) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else if (z <= 0.5) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = x + (-6.0 * ((y - x) * z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.52d0)) then
tmp = z * ((y * (-6.0d0)) + (x * 6.0d0))
else if (z <= 0.5d0) then
tmp = (x * (-3.0d0)) + (y * 4.0d0)
else
tmp = x + ((-6.0d0) * ((y - x) * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.52) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else if (z <= 0.5) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = x + (-6.0 * ((y - x) * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.52: tmp = z * ((y * -6.0) + (x * 6.0)) elif z <= 0.5: tmp = (x * -3.0) + (y * 4.0) else: tmp = x + (-6.0 * ((y - x) * z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.52) tmp = Float64(z * Float64(Float64(y * -6.0) + Float64(x * 6.0))); elseif (z <= 0.5) tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); else tmp = Float64(x + Float64(-6.0 * Float64(Float64(y - x) * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.52) tmp = z * ((y * -6.0) + (x * 6.0)); elseif (z <= 0.5) tmp = (x * -3.0) + (y * 4.0); else tmp = x + (-6.0 * ((y - x) * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.52], N[(z * N[(N[(y * -6.0), $MachinePrecision] + N[(x * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.5], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.52:\\
\;\;\;\;z \cdot \left(y \cdot -6 + x \cdot 6\right)\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x + -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.52000000000000002Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 96.3%
Taylor expanded in z around inf 97.8%
if -0.52000000000000002 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.7%
Taylor expanded in z around 0 97.5%
if 0.5 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 97.9%
Final simplification97.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.4e+50) (not (<= y 9.6e+54))) (* 6.0 (* y (- 0.6666666666666666 z))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.4e+50) || !(y <= 9.6e+54)) {
tmp = 6.0 * (y * (0.6666666666666666 - 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.4d+50)) .or. (.not. (y <= 9.6d+54))) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - 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.4e+50) || !(y <= 9.6e+54)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.4e+50) or not (y <= 9.6e+54): tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.4e+50) || !(y <= 9.6e+54)) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - 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.4e+50) || ~((y <= 9.6e+54))) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.4e+50], N[Not[LessEqual[y, 9.6e+54]], $MachinePrecision]], N[(6.0 * N[(y * N[(0.6666666666666666 - 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.4 \cdot 10^{+50} \lor \neg \left(y \leq 9.6 \cdot 10^{+54}\right):\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -3.3999999999999998e50 or 9.59999999999999993e54 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
flip-+21.9%
pow221.9%
associate-*l*21.9%
pow221.9%
associate-*l*22.0%
Applied egg-rr22.0%
Taylor expanded in y around inf 92.7%
Taylor expanded in x around 0 83.1%
if -3.3999999999999998e50 < y < 9.59999999999999993e54Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 76.1%
sub-neg76.1%
distribute-rgt-in76.1%
metadata-eval76.1%
metadata-eval76.1%
distribute-lft-neg-in76.1%
associate-+r+76.2%
metadata-eval76.2%
metadata-eval76.2%
distribute-rgt-neg-in76.2%
metadata-eval76.2%
Simplified76.2%
Final simplification78.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.3e+50) (not (<= y 1.12e+55))) (* y (+ 4.0 (* z -6.0))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.3e+50) || !(y <= 1.12e+55)) {
tmp = y * (4.0 + (z * -6.0));
} 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.3d+50)) .or. (.not. (y <= 1.12d+55))) then
tmp = y * (4.0d0 + (z * (-6.0d0)))
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.3e+50) || !(y <= 1.12e+55)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.3e+50) or not (y <= 1.12e+55): tmp = y * (4.0 + (z * -6.0)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.3e+50) || !(y <= 1.12e+55)) tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); 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.3e+50) || ~((y <= 1.12e+55))) tmp = y * (4.0 + (z * -6.0)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.3e+50], N[Not[LessEqual[y, 1.12e+55]], $MachinePrecision]], N[(y * N[(4.0 + N[(z * -6.0), $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.3 \cdot 10^{+50} \lor \neg \left(y \leq 1.12 \cdot 10^{+55}\right):\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -3.3e50 or 1.12000000000000006e55 < y Initial program 99.6%
+-commutative99.6%
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 83.2%
if -3.3e50 < y < 1.12000000000000006e55Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 76.1%
sub-neg76.1%
distribute-rgt-in76.1%
metadata-eval76.1%
metadata-eval76.1%
distribute-lft-neg-in76.1%
associate-+r+76.2%
metadata-eval76.2%
metadata-eval76.2%
distribute-rgt-neg-in76.2%
metadata-eval76.2%
Simplified76.2%
Final simplification79.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -1e+74) (not (<= x 1.65e-59))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1e+74) || !(x <= 1.65e-59)) {
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 <= (-1d+74)) .or. (.not. (x <= 1.65d-59))) 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 <= -1e+74) || !(x <= 1.65e-59)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1e+74) or not (x <= 1.65e-59): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1e+74) || !(x <= 1.65e-59)) 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 <= -1e+74) || ~((x <= 1.65e-59))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1e+74], N[Not[LessEqual[x, 1.65e-59]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+74} \lor \neg \left(x \leq 1.65 \cdot 10^{-59}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -9.99999999999999952e73 or 1.64999999999999991e-59 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 78.8%
sub-neg78.8%
distribute-rgt-in78.8%
metadata-eval78.8%
metadata-eval78.8%
distribute-lft-neg-in78.8%
associate-+r+78.8%
metadata-eval78.8%
metadata-eval78.8%
distribute-rgt-neg-in78.8%
metadata-eval78.8%
Simplified78.8%
Taylor expanded in z around 0 45.4%
*-commutative45.4%
Simplified45.4%
if -9.99999999999999952e73 < x < 1.64999999999999991e-59Initial 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 76.3%
Taylor expanded in z around 0 45.5%
Final simplification45.5%
(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 53.7%
sub-neg53.7%
distribute-rgt-in53.7%
metadata-eval53.7%
metadata-eval53.7%
distribute-lft-neg-in53.7%
associate-+r+53.7%
metadata-eval53.7%
metadata-eval53.7%
distribute-rgt-neg-in53.7%
metadata-eval53.7%
Simplified53.7%
Taylor expanded in z around 0 30.6%
*-commutative30.6%
Simplified30.6%
Final simplification30.6%
(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 48.0%
associate-*r*48.0%
Simplified48.0%
Taylor expanded in x around inf 2.3%
Final simplification2.3%
herbie shell --seed 2024026
(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))))