
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (+ x (* (* (- 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.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -350000000.0)
t_0
(if (<= z -5e-119)
(* x -3.0)
(if (<= z -1.1e-232)
(* y 4.0)
(if (<= z 5.2e-250)
(* x -3.0)
(if (<= z 4.2e-58)
(* y 4.0)
(if (<= z 1860.0)
(* x -3.0)
(if (or (<= z 8.6e+108) (not (<= z 5e+233)))
(* 6.0 (* x z))
t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -350000000.0) {
tmp = t_0;
} else if (z <= -5e-119) {
tmp = x * -3.0;
} else if (z <= -1.1e-232) {
tmp = y * 4.0;
} else if (z <= 5.2e-250) {
tmp = x * -3.0;
} else if (z <= 4.2e-58) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if ((z <= 8.6e+108) || !(z <= 5e+233)) {
tmp = 6.0 * (x * z);
} 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 <= (-350000000.0d0)) then
tmp = t_0
else if (z <= (-5d-119)) then
tmp = x * (-3.0d0)
else if (z <= (-1.1d-232)) then
tmp = y * 4.0d0
else if (z <= 5.2d-250) then
tmp = x * (-3.0d0)
else if (z <= 4.2d-58) then
tmp = y * 4.0d0
else if (z <= 1860.0d0) then
tmp = x * (-3.0d0)
else if ((z <= 8.6d+108) .or. (.not. (z <= 5d+233))) then
tmp = 6.0d0 * (x * z)
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 <= -350000000.0) {
tmp = t_0;
} else if (z <= -5e-119) {
tmp = x * -3.0;
} else if (z <= -1.1e-232) {
tmp = y * 4.0;
} else if (z <= 5.2e-250) {
tmp = x * -3.0;
} else if (z <= 4.2e-58) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if ((z <= 8.6e+108) || !(z <= 5e+233)) {
tmp = 6.0 * (x * z);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -350000000.0: tmp = t_0 elif z <= -5e-119: tmp = x * -3.0 elif z <= -1.1e-232: tmp = y * 4.0 elif z <= 5.2e-250: tmp = x * -3.0 elif z <= 4.2e-58: tmp = y * 4.0 elif z <= 1860.0: tmp = x * -3.0 elif (z <= 8.6e+108) or not (z <= 5e+233): tmp = 6.0 * (x * z) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -350000000.0) tmp = t_0; elseif (z <= -5e-119) tmp = Float64(x * -3.0); elseif (z <= -1.1e-232) tmp = Float64(y * 4.0); elseif (z <= 5.2e-250) tmp = Float64(x * -3.0); elseif (z <= 4.2e-58) tmp = Float64(y * 4.0); elseif (z <= 1860.0) tmp = Float64(x * -3.0); elseif ((z <= 8.6e+108) || !(z <= 5e+233)) tmp = Float64(6.0 * Float64(x * z)); 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 <= -350000000.0) tmp = t_0; elseif (z <= -5e-119) tmp = x * -3.0; elseif (z <= -1.1e-232) tmp = y * 4.0; elseif (z <= 5.2e-250) tmp = x * -3.0; elseif (z <= 4.2e-58) tmp = y * 4.0; elseif (z <= 1860.0) tmp = x * -3.0; elseif ((z <= 8.6e+108) || ~((z <= 5e+233))) tmp = 6.0 * (x * z); 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, -350000000.0], t$95$0, If[LessEqual[z, -5e-119], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.1e-232], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.2e-250], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.2e-58], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1860.0], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 8.6e+108], N[Not[LessEqual[z, 5e+233]], $MachinePrecision]], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -350000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-119}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-232}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-250}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-58}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1860:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+108} \lor \neg \left(z \leq 5 \cdot 10^{+233}\right):\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.5e8 or 8.59999999999999993e108 < z < 5.00000000000000009e233Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 66.7%
Taylor expanded in z around inf 66.3%
*-commutative66.3%
Simplified66.3%
if -3.5e8 < z < -4.99999999999999993e-119 or -1.10000000000000001e-232 < z < 5.20000000000000016e-250 or 4.19999999999999975e-58 < z < 1860Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.9%
sub-neg70.9%
distribute-rgt-in71.0%
metadata-eval71.0%
distribute-lft-neg-in71.0%
associate-+r+71.0%
metadata-eval71.0%
distribute-rgt-neg-in71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if -4.99999999999999993e-119 < z < -1.10000000000000001e-232 or 5.20000000000000016e-250 < z < 4.19999999999999975e-58Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 72.7%
Taylor expanded in z around 0 72.9%
*-commutative72.9%
Simplified72.9%
if 1860 < z < 8.59999999999999993e108 or 5.00000000000000009e233 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 70.2%
sub-neg70.2%
distribute-rgt-in70.2%
metadata-eval70.2%
distribute-lft-neg-in70.2%
associate-+r+70.2%
metadata-eval70.2%
distribute-rgt-neg-in70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in z around inf 70.8%
Final simplification69.1%
(FPCore (x y z)
:precision binary64
(if (<= z -350000000.0)
(* y (* z -6.0))
(if (<= z -2.2e-118)
(* x -3.0)
(if (<= z -1.95e-231)
(* y 4.0)
(if (<= z 1e-253)
(* x -3.0)
(if (<= z 5.4e-58)
(* y 4.0)
(if (<= z 1860.0)
(* x -3.0)
(if (or (<= z 2.1e+108) (not (<= z 4.3e+234)))
(* 6.0 (* x z))
(* -6.0 (* y z))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -350000000.0) {
tmp = y * (z * -6.0);
} else if (z <= -2.2e-118) {
tmp = x * -3.0;
} else if (z <= -1.95e-231) {
tmp = y * 4.0;
} else if (z <= 1e-253) {
tmp = x * -3.0;
} else if (z <= 5.4e-58) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if ((z <= 2.1e+108) || !(z <= 4.3e+234)) {
tmp = 6.0 * (x * z);
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-350000000.0d0)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-2.2d-118)) then
tmp = x * (-3.0d0)
else if (z <= (-1.95d-231)) then
tmp = y * 4.0d0
else if (z <= 1d-253) then
tmp = x * (-3.0d0)
else if (z <= 5.4d-58) then
tmp = y * 4.0d0
else if (z <= 1860.0d0) then
tmp = x * (-3.0d0)
else if ((z <= 2.1d+108) .or. (.not. (z <= 4.3d+234))) then
tmp = 6.0d0 * (x * z)
else
tmp = (-6.0d0) * (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -350000000.0) {
tmp = y * (z * -6.0);
} else if (z <= -2.2e-118) {
tmp = x * -3.0;
} else if (z <= -1.95e-231) {
tmp = y * 4.0;
} else if (z <= 1e-253) {
tmp = x * -3.0;
} else if (z <= 5.4e-58) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if ((z <= 2.1e+108) || !(z <= 4.3e+234)) {
tmp = 6.0 * (x * z);
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -350000000.0: tmp = y * (z * -6.0) elif z <= -2.2e-118: tmp = x * -3.0 elif z <= -1.95e-231: tmp = y * 4.0 elif z <= 1e-253: tmp = x * -3.0 elif z <= 5.4e-58: tmp = y * 4.0 elif z <= 1860.0: tmp = x * -3.0 elif (z <= 2.1e+108) or not (z <= 4.3e+234): tmp = 6.0 * (x * z) else: tmp = -6.0 * (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -350000000.0) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -2.2e-118) tmp = Float64(x * -3.0); elseif (z <= -1.95e-231) tmp = Float64(y * 4.0); elseif (z <= 1e-253) tmp = Float64(x * -3.0); elseif (z <= 5.4e-58) tmp = Float64(y * 4.0); elseif (z <= 1860.0) tmp = Float64(x * -3.0); elseif ((z <= 2.1e+108) || !(z <= 4.3e+234)) tmp = Float64(6.0 * Float64(x * z)); else tmp = Float64(-6.0 * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -350000000.0) tmp = y * (z * -6.0); elseif (z <= -2.2e-118) tmp = x * -3.0; elseif (z <= -1.95e-231) tmp = y * 4.0; elseif (z <= 1e-253) tmp = x * -3.0; elseif (z <= 5.4e-58) tmp = y * 4.0; elseif (z <= 1860.0) tmp = x * -3.0; elseif ((z <= 2.1e+108) || ~((z <= 4.3e+234))) tmp = 6.0 * (x * z); else tmp = -6.0 * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -350000000.0], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e-118], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.95e-231], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.4e-58], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1860.0], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 2.1e+108], N[Not[LessEqual[z, 4.3e+234]], $MachinePrecision]], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -350000000:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-118}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-58}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1860:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+108} \lor \neg \left(z \leq 4.3 \cdot 10^{+234}\right):\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if z < -3.5e8Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around inf 66.7%
*-commutative66.7%
associate-*r*66.8%
Simplified66.8%
if -3.5e8 < z < -2.19999999999999984e-118 or -1.9499999999999999e-231 < z < 1.0000000000000001e-253 or 5.3999999999999998e-58 < z < 1860Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.9%
sub-neg70.9%
distribute-rgt-in71.0%
metadata-eval71.0%
distribute-lft-neg-in71.0%
associate-+r+71.0%
metadata-eval71.0%
distribute-rgt-neg-in71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if -2.19999999999999984e-118 < z < -1.9499999999999999e-231 or 1.0000000000000001e-253 < z < 5.3999999999999998e-58Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 72.7%
Taylor expanded in z around 0 72.9%
*-commutative72.9%
Simplified72.9%
if 1860 < z < 2.1000000000000001e108 or 4.2999999999999998e234 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 70.2%
sub-neg70.2%
distribute-rgt-in70.2%
metadata-eval70.2%
distribute-lft-neg-in70.2%
associate-+r+70.2%
metadata-eval70.2%
distribute-rgt-neg-in70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in z around inf 70.8%
if 2.1000000000000001e108 < z < 4.2999999999999998e234Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 65.2%
Taylor expanded in z around inf 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification69.1%
(FPCore (x y z)
:precision binary64
(if (<= z -350000000.0)
(* y (* z -6.0))
(if (<= z -1.32e-118)
(* x -3.0)
(if (<= z -1.5e-232)
(* y 4.0)
(if (<= z 2.25e-254)
(* x -3.0)
(if (<= z 1.6e-57)
(* y 4.0)
(if (<= z 1860.0)
(* x -3.0)
(if (<= z 1.9e+109)
(* z (* x 6.0))
(if (<= z 1.4e+231) (* -6.0 (* y z)) (* 6.0 (* x z)))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -350000000.0) {
tmp = y * (z * -6.0);
} else if (z <= -1.32e-118) {
tmp = x * -3.0;
} else if (z <= -1.5e-232) {
tmp = y * 4.0;
} else if (z <= 2.25e-254) {
tmp = x * -3.0;
} else if (z <= 1.6e-57) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if (z <= 1.9e+109) {
tmp = z * (x * 6.0);
} else if (z <= 1.4e+231) {
tmp = -6.0 * (y * z);
} else {
tmp = 6.0 * (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 <= (-350000000.0d0)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-1.32d-118)) then
tmp = x * (-3.0d0)
else if (z <= (-1.5d-232)) then
tmp = y * 4.0d0
else if (z <= 2.25d-254) then
tmp = x * (-3.0d0)
else if (z <= 1.6d-57) then
tmp = y * 4.0d0
else if (z <= 1860.0d0) then
tmp = x * (-3.0d0)
else if (z <= 1.9d+109) then
tmp = z * (x * 6.0d0)
else if (z <= 1.4d+231) then
tmp = (-6.0d0) * (y * z)
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -350000000.0) {
tmp = y * (z * -6.0);
} else if (z <= -1.32e-118) {
tmp = x * -3.0;
} else if (z <= -1.5e-232) {
tmp = y * 4.0;
} else if (z <= 2.25e-254) {
tmp = x * -3.0;
} else if (z <= 1.6e-57) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if (z <= 1.9e+109) {
tmp = z * (x * 6.0);
} else if (z <= 1.4e+231) {
tmp = -6.0 * (y * z);
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -350000000.0: tmp = y * (z * -6.0) elif z <= -1.32e-118: tmp = x * -3.0 elif z <= -1.5e-232: tmp = y * 4.0 elif z <= 2.25e-254: tmp = x * -3.0 elif z <= 1.6e-57: tmp = y * 4.0 elif z <= 1860.0: tmp = x * -3.0 elif z <= 1.9e+109: tmp = z * (x * 6.0) elif z <= 1.4e+231: tmp = -6.0 * (y * z) else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -350000000.0) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -1.32e-118) tmp = Float64(x * -3.0); elseif (z <= -1.5e-232) tmp = Float64(y * 4.0); elseif (z <= 2.25e-254) tmp = Float64(x * -3.0); elseif (z <= 1.6e-57) tmp = Float64(y * 4.0); elseif (z <= 1860.0) tmp = Float64(x * -3.0); elseif (z <= 1.9e+109) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= 1.4e+231) tmp = Float64(-6.0 * Float64(y * z)); else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -350000000.0) tmp = y * (z * -6.0); elseif (z <= -1.32e-118) tmp = x * -3.0; elseif (z <= -1.5e-232) tmp = y * 4.0; elseif (z <= 2.25e-254) tmp = x * -3.0; elseif (z <= 1.6e-57) tmp = y * 4.0; elseif (z <= 1860.0) tmp = x * -3.0; elseif (z <= 1.9e+109) tmp = z * (x * 6.0); elseif (z <= 1.4e+231) tmp = -6.0 * (y * z); else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -350000000.0], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.32e-118], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.5e-232], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.25e-254], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.6e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1860.0], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.9e+109], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+231], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -350000000:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{-118}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-232}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-254}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1860:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+109}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+231}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -3.5e8Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around inf 66.7%
*-commutative66.7%
associate-*r*66.8%
Simplified66.8%
if -3.5e8 < z < -1.32000000000000003e-118 or -1.49999999999999995e-232 < z < 2.25e-254 or 1.6e-57 < z < 1860Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.9%
sub-neg70.9%
distribute-rgt-in71.0%
metadata-eval71.0%
distribute-lft-neg-in71.0%
associate-+r+71.0%
metadata-eval71.0%
distribute-rgt-neg-in71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if -1.32000000000000003e-118 < z < -1.49999999999999995e-232 or 2.25e-254 < z < 1.6e-57Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 72.7%
Taylor expanded in z around 0 72.9%
*-commutative72.9%
Simplified72.9%
if 1860 < z < 1.90000000000000019e109Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 70.1%
sub-neg70.1%
distribute-rgt-in70.1%
metadata-eval70.1%
distribute-lft-neg-in70.1%
associate-+r+70.1%
metadata-eval70.1%
distribute-rgt-neg-in70.1%
metadata-eval70.1%
Simplified70.1%
Taylor expanded in z around inf 66.9%
*-commutative66.9%
associate-*r*66.8%
Simplified66.8%
Taylor expanded in x around 0 66.9%
associate-*r*66.9%
*-commutative66.9%
*-commutative66.9%
Simplified66.9%
if 1.90000000000000019e109 < z < 1.4e231Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 65.2%
Taylor expanded in z around inf 65.2%
*-commutative65.2%
Simplified65.2%
if 1.4e231 < z Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 70.4%
sub-neg70.4%
distribute-rgt-in70.4%
metadata-eval70.4%
distribute-lft-neg-in70.4%
associate-+r+70.4%
metadata-eval70.4%
distribute-rgt-neg-in70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in z around inf 75.2%
Final simplification69.1%
(FPCore (x y z)
:precision binary64
(if (<= z -350000000.0)
(* y (* z -6.0))
(if (<= z -2.2e-119)
(* x -3.0)
(if (<= z -2.8e-232)
(* y 4.0)
(if (<= z 1.8e-250)
(* x -3.0)
(if (<= z 2e-57)
(* y 4.0)
(if (<= z 1860.0)
(* x -3.0)
(if (<= z 2.45e+107)
(* z (* x 6.0))
(if (<= z 3.9e+233) (* z (* y -6.0)) (* 6.0 (* x z)))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -350000000.0) {
tmp = y * (z * -6.0);
} else if (z <= -2.2e-119) {
tmp = x * -3.0;
} else if (z <= -2.8e-232) {
tmp = y * 4.0;
} else if (z <= 1.8e-250) {
tmp = x * -3.0;
} else if (z <= 2e-57) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if (z <= 2.45e+107) {
tmp = z * (x * 6.0);
} else if (z <= 3.9e+233) {
tmp = z * (y * -6.0);
} else {
tmp = 6.0 * (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 <= (-350000000.0d0)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-2.2d-119)) then
tmp = x * (-3.0d0)
else if (z <= (-2.8d-232)) then
tmp = y * 4.0d0
else if (z <= 1.8d-250) then
tmp = x * (-3.0d0)
else if (z <= 2d-57) then
tmp = y * 4.0d0
else if (z <= 1860.0d0) then
tmp = x * (-3.0d0)
else if (z <= 2.45d+107) then
tmp = z * (x * 6.0d0)
else if (z <= 3.9d+233) then
tmp = z * (y * (-6.0d0))
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -350000000.0) {
tmp = y * (z * -6.0);
} else if (z <= -2.2e-119) {
tmp = x * -3.0;
} else if (z <= -2.8e-232) {
tmp = y * 4.0;
} else if (z <= 1.8e-250) {
tmp = x * -3.0;
} else if (z <= 2e-57) {
tmp = y * 4.0;
} else if (z <= 1860.0) {
tmp = x * -3.0;
} else if (z <= 2.45e+107) {
tmp = z * (x * 6.0);
} else if (z <= 3.9e+233) {
tmp = z * (y * -6.0);
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -350000000.0: tmp = y * (z * -6.0) elif z <= -2.2e-119: tmp = x * -3.0 elif z <= -2.8e-232: tmp = y * 4.0 elif z <= 1.8e-250: tmp = x * -3.0 elif z <= 2e-57: tmp = y * 4.0 elif z <= 1860.0: tmp = x * -3.0 elif z <= 2.45e+107: tmp = z * (x * 6.0) elif z <= 3.9e+233: tmp = z * (y * -6.0) else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -350000000.0) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -2.2e-119) tmp = Float64(x * -3.0); elseif (z <= -2.8e-232) tmp = Float64(y * 4.0); elseif (z <= 1.8e-250) tmp = Float64(x * -3.0); elseif (z <= 2e-57) tmp = Float64(y * 4.0); elseif (z <= 1860.0) tmp = Float64(x * -3.0); elseif (z <= 2.45e+107) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= 3.9e+233) tmp = Float64(z * Float64(y * -6.0)); else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -350000000.0) tmp = y * (z * -6.0); elseif (z <= -2.2e-119) tmp = x * -3.0; elseif (z <= -2.8e-232) tmp = y * 4.0; elseif (z <= 1.8e-250) tmp = x * -3.0; elseif (z <= 2e-57) tmp = y * 4.0; elseif (z <= 1860.0) tmp = x * -3.0; elseif (z <= 2.45e+107) tmp = z * (x * 6.0); elseif (z <= 3.9e+233) tmp = z * (y * -6.0); else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -350000000.0], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e-119], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.8e-232], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.8e-250], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1860.0], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.45e+107], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e+233], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -350000000:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-119}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-232}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-250}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1860:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+107}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+233}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -3.5e8Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around inf 66.7%
*-commutative66.7%
associate-*r*66.8%
Simplified66.8%
if -3.5e8 < z < -2.2000000000000001e-119 or -2.79999999999999993e-232 < z < 1.79999999999999991e-250 or 1.99999999999999991e-57 < z < 1860Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.9%
sub-neg70.9%
distribute-rgt-in71.0%
metadata-eval71.0%
distribute-lft-neg-in71.0%
associate-+r+71.0%
metadata-eval71.0%
distribute-rgt-neg-in71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if -2.2000000000000001e-119 < z < -2.79999999999999993e-232 or 1.79999999999999991e-250 < z < 1.99999999999999991e-57Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 72.7%
Taylor expanded in z around 0 72.9%
*-commutative72.9%
Simplified72.9%
if 1860 < z < 2.4500000000000001e107Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 70.1%
sub-neg70.1%
distribute-rgt-in70.1%
metadata-eval70.1%
distribute-lft-neg-in70.1%
associate-+r+70.1%
metadata-eval70.1%
distribute-rgt-neg-in70.1%
metadata-eval70.1%
Simplified70.1%
Taylor expanded in z around inf 66.9%
*-commutative66.9%
associate-*r*66.8%
Simplified66.8%
Taylor expanded in x around 0 66.9%
associate-*r*66.9%
*-commutative66.9%
*-commutative66.9%
Simplified66.9%
if 2.4500000000000001e107 < z < 3.8999999999999999e233Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around inf 65.3%
*-commutative65.3%
Simplified65.3%
if 3.8999999999999999e233 < z Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 70.4%
sub-neg70.4%
distribute-rgt-in70.4%
metadata-eval70.4%
distribute-lft-neg-in70.4%
associate-+r+70.4%
metadata-eval70.4%
distribute-rgt-neg-in70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in z around inf 75.2%
Final simplification69.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -5.4e-12)
t_0
(if (<= z -1.8e-120)
(* x -3.0)
(if (<= z -1.4e-231)
(* y 4.0)
(if (<= z 9.2e-253)
(* x -3.0)
(if (<= z 1.6e-57) (* y 4.0) (if (<= z 0.5) (* x -3.0) t_0))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -5.4e-12) {
tmp = t_0;
} else if (z <= -1.8e-120) {
tmp = x * -3.0;
} else if (z <= -1.4e-231) {
tmp = y * 4.0;
} else if (z <= 9.2e-253) {
tmp = x * -3.0;
} else if (z <= 1.6e-57) {
tmp = y * 4.0;
} else if (z <= 0.5) {
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 - x) * z)
if (z <= (-5.4d-12)) then
tmp = t_0
else if (z <= (-1.8d-120)) then
tmp = x * (-3.0d0)
else if (z <= (-1.4d-231)) then
tmp = y * 4.0d0
else if (z <= 9.2d-253) then
tmp = x * (-3.0d0)
else if (z <= 1.6d-57) then
tmp = y * 4.0d0
else if (z <= 0.5d0) 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 - x) * z);
double tmp;
if (z <= -5.4e-12) {
tmp = t_0;
} else if (z <= -1.8e-120) {
tmp = x * -3.0;
} else if (z <= -1.4e-231) {
tmp = y * 4.0;
} else if (z <= 9.2e-253) {
tmp = x * -3.0;
} else if (z <= 1.6e-57) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -5.4e-12: tmp = t_0 elif z <= -1.8e-120: tmp = x * -3.0 elif z <= -1.4e-231: tmp = y * 4.0 elif z <= 9.2e-253: tmp = x * -3.0 elif z <= 1.6e-57: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.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 <= -5.4e-12) tmp = t_0; elseif (z <= -1.8e-120) tmp = Float64(x * -3.0); elseif (z <= -1.4e-231) tmp = Float64(y * 4.0); elseif (z <= 9.2e-253) tmp = Float64(x * -3.0); elseif (z <= 1.6e-57) tmp = Float64(y * 4.0); elseif (z <= 0.5) 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 - x) * z); tmp = 0.0; if (z <= -5.4e-12) tmp = t_0; elseif (z <= -1.8e-120) tmp = x * -3.0; elseif (z <= -1.4e-231) tmp = y * 4.0; elseif (z <= 9.2e-253) tmp = x * -3.0; elseif (z <= 1.6e-57) tmp = y * 4.0; elseif (z <= 0.5) 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[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-12], t$95$0, If[LessEqual[z, -1.8e-120], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.4e-231], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 9.2e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.6e-57], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.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 -5.4 \cdot 10^{-12}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-120}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.39999999999999961e-12 or 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.0%
if -5.39999999999999961e-12 < z < -1.8000000000000001e-120 or -1.3999999999999999e-231 < z < 9.2000000000000001e-253 or 1.6e-57 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 74.6%
sub-neg74.6%
distribute-rgt-in74.6%
metadata-eval74.6%
distribute-lft-neg-in74.6%
associate-+r+74.6%
metadata-eval74.6%
distribute-rgt-neg-in74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in z around 0 72.9%
*-commutative72.9%
Simplified72.9%
if -1.8000000000000001e-120 < z < -1.3999999999999999e-231 or 9.2000000000000001e-253 < z < 1.6e-57Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 72.7%
Taylor expanded in z around 0 72.9%
*-commutative72.9%
Simplified72.9%
Final simplification86.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -350000000.0)
t_0
(if (<= z -1.02e-119)
(* x -3.0)
(if (<= z -1.52e-232)
(* y 4.0)
(if (<= z 1.22e-253)
(* x -3.0)
(if (<= z 5.9e-58) (* y 4.0) (if (<= z 0.58) (* x -3.0) t_0))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -350000000.0) {
tmp = t_0;
} else if (z <= -1.02e-119) {
tmp = x * -3.0;
} else if (z <= -1.52e-232) {
tmp = y * 4.0;
} else if (z <= 1.22e-253) {
tmp = x * -3.0;
} else if (z <= 5.9e-58) {
tmp = y * 4.0;
} else if (z <= 0.58) {
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 <= (-350000000.0d0)) then
tmp = t_0
else if (z <= (-1.02d-119)) then
tmp = x * (-3.0d0)
else if (z <= (-1.52d-232)) then
tmp = y * 4.0d0
else if (z <= 1.22d-253) then
tmp = x * (-3.0d0)
else if (z <= 5.9d-58) then
tmp = y * 4.0d0
else if (z <= 0.58d0) 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 <= -350000000.0) {
tmp = t_0;
} else if (z <= -1.02e-119) {
tmp = x * -3.0;
} else if (z <= -1.52e-232) {
tmp = y * 4.0;
} else if (z <= 1.22e-253) {
tmp = x * -3.0;
} else if (z <= 5.9e-58) {
tmp = y * 4.0;
} else if (z <= 0.58) {
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 <= -350000000.0: tmp = t_0 elif z <= -1.02e-119: tmp = x * -3.0 elif z <= -1.52e-232: tmp = y * 4.0 elif z <= 1.22e-253: tmp = x * -3.0 elif z <= 5.9e-58: tmp = y * 4.0 elif z <= 0.58: 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 <= -350000000.0) tmp = t_0; elseif (z <= -1.02e-119) tmp = Float64(x * -3.0); elseif (z <= -1.52e-232) tmp = Float64(y * 4.0); elseif (z <= 1.22e-253) tmp = Float64(x * -3.0); elseif (z <= 5.9e-58) tmp = Float64(y * 4.0); elseif (z <= 0.58) 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 <= -350000000.0) tmp = t_0; elseif (z <= -1.02e-119) tmp = x * -3.0; elseif (z <= -1.52e-232) tmp = y * 4.0; elseif (z <= 1.22e-253) tmp = x * -3.0; elseif (z <= 5.9e-58) tmp = y * 4.0; elseif (z <= 0.58) 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, -350000000.0], t$95$0, If[LessEqual[z, -1.02e-119], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.52e-232], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.22e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.9e-58], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.58], 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 -350000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-119}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.52 \cdot 10^{-232}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{-58}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.5e8 or 0.57999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 57.2%
Taylor expanded in z around inf 55.8%
*-commutative55.8%
Simplified55.8%
if -3.5e8 < z < -1.02e-119 or -1.52e-232 < z < 1.22e-253 or 5.9e-58 < z < 0.57999999999999996Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 73.6%
sub-neg73.6%
distribute-rgt-in73.7%
metadata-eval73.7%
distribute-lft-neg-in73.7%
associate-+r+73.7%
metadata-eval73.7%
distribute-rgt-neg-in73.7%
metadata-eval73.7%
Simplified73.7%
Taylor expanded in z around 0 70.3%
*-commutative70.3%
Simplified70.3%
if -1.02e-119 < z < -1.52e-232 or 1.22e-253 < z < 5.9e-58Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 72.7%
Taylor expanded in z around 0 72.9%
*-commutative72.9%
Simplified72.9%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -63000.0)
t_0
(if (<= z -5.6e-231)
(* 6.0 (* y (- 0.6666666666666666 z)))
(if (<= z 1.28e-253)
(* x -3.0)
(if (<= z 6.8e-58) (* y 4.0) (if (<= z 0.5) (* x -3.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -63000.0) {
tmp = t_0;
} else if (z <= -5.6e-231) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else if (z <= 1.28e-253) {
tmp = x * -3.0;
} else if (z <= 6.8e-58) {
tmp = y * 4.0;
} else if (z <= 0.5) {
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 - x) * z)
if (z <= (-63000.0d0)) then
tmp = t_0
else if (z <= (-5.6d-231)) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else if (z <= 1.28d-253) then
tmp = x * (-3.0d0)
else if (z <= 6.8d-58) then
tmp = y * 4.0d0
else if (z <= 0.5d0) 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 - x) * z);
double tmp;
if (z <= -63000.0) {
tmp = t_0;
} else if (z <= -5.6e-231) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else if (z <= 1.28e-253) {
tmp = x * -3.0;
} else if (z <= 6.8e-58) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -63000.0: tmp = t_0 elif z <= -5.6e-231: tmp = 6.0 * (y * (0.6666666666666666 - z)) elif z <= 1.28e-253: tmp = x * -3.0 elif z <= 6.8e-58: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.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 <= -63000.0) tmp = t_0; elseif (z <= -5.6e-231) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); elseif (z <= 1.28e-253) tmp = Float64(x * -3.0); elseif (z <= 6.8e-58) tmp = Float64(y * 4.0); elseif (z <= 0.5) 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 - x) * z); tmp = 0.0; if (z <= -63000.0) tmp = t_0; elseif (z <= -5.6e-231) tmp = 6.0 * (y * (0.6666666666666666 - z)); elseif (z <= 1.28e-253) tmp = x * -3.0; elseif (z <= 6.8e-58) tmp = y * 4.0; elseif (z <= 0.5) 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[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -63000.0], t$95$0, If[LessEqual[z, -5.6e-231], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.28e-253], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.8e-58], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.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 -63000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-231}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-253}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-58}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -63000 or 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.6%
if -63000 < z < -5.5999999999999997e-231Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 62.5%
if -5.5999999999999997e-231 < z < 1.28e-253 or 6.79999999999999947e-58 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 79.2%
sub-neg79.2%
distribute-rgt-in79.2%
metadata-eval79.2%
distribute-lft-neg-in79.2%
associate-+r+79.2%
metadata-eval79.2%
distribute-rgt-neg-in79.2%
metadata-eval79.2%
Simplified79.2%
Taylor expanded in z around 0 76.8%
*-commutative76.8%
Simplified76.8%
if 1.28e-253 < z < 6.79999999999999947e-58Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.6%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 68.6%
Taylor expanded in z around 0 68.9%
*-commutative68.9%
Simplified68.9%
Final simplification84.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.02e+46) (not (<= x 2.6e-53))) (* x (+ -3.0 (* 6.0 z))) (* 6.0 (* y (- 0.6666666666666666 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.02e+46) || !(x <= 2.6e-53)) {
tmp = x * (-3.0 + (6.0 * z));
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.02d+46)) .or. (.not. (x <= 2.6d-53))) then
tmp = x * ((-3.0d0) + (6.0d0 * z))
else
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.02e+46) || !(x <= 2.6e-53)) {
tmp = x * (-3.0 + (6.0 * z));
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.02e+46) or not (x <= 2.6e-53): tmp = x * (-3.0 + (6.0 * z)) else: tmp = 6.0 * (y * (0.6666666666666666 - z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.02e+46) || !(x <= 2.6e-53)) tmp = Float64(x * Float64(-3.0 + Float64(6.0 * z))); else tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.02e+46) || ~((x <= 2.6e-53))) tmp = x * (-3.0 + (6.0 * z)); else tmp = 6.0 * (y * (0.6666666666666666 - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.02e+46], N[Not[LessEqual[x, 2.6e-53]], $MachinePrecision]], N[(x * N[(-3.0 + N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+46} \lor \neg \left(x \leq 2.6 \cdot 10^{-53}\right):\\
\;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\end{array}
\end{array}
if x < -1.0199999999999999e46 or 2.59999999999999996e-53 < x Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 81.4%
sub-neg81.4%
distribute-rgt-in81.4%
metadata-eval81.4%
distribute-lft-neg-in81.4%
associate-+r+81.4%
metadata-eval81.4%
distribute-rgt-neg-in81.4%
metadata-eval81.4%
Simplified81.4%
if -1.0199999999999999e46 < x < 2.59999999999999996e-53Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 81.1%
Final simplification81.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -9.2e+50) (not (<= x 8.2e-56))) (* x (+ -3.0 (* 6.0 z))) (* y (+ (* z -6.0) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -9.2e+50) || !(x <= 8.2e-56)) {
tmp = x * (-3.0 + (6.0 * z));
} else {
tmp = y * ((z * -6.0) + 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 <= (-9.2d+50)) .or. (.not. (x <= 8.2d-56))) then
tmp = x * ((-3.0d0) + (6.0d0 * z))
else
tmp = y * ((z * (-6.0d0)) + 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -9.2e+50) || !(x <= 8.2e-56)) {
tmp = x * (-3.0 + (6.0 * z));
} else {
tmp = y * ((z * -6.0) + 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -9.2e+50) or not (x <= 8.2e-56): tmp = x * (-3.0 + (6.0 * z)) else: tmp = y * ((z * -6.0) + 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -9.2e+50) || !(x <= 8.2e-56)) tmp = Float64(x * Float64(-3.0 + Float64(6.0 * z))); else tmp = Float64(y * Float64(Float64(z * -6.0) + 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -9.2e+50) || ~((x <= 8.2e-56))) tmp = x * (-3.0 + (6.0 * z)); else tmp = y * ((z * -6.0) + 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -9.2e+50], N[Not[LessEqual[x, 8.2e-56]], $MachinePrecision]], N[(x * N[(-3.0 + N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z * -6.0), $MachinePrecision] + 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+50} \lor \neg \left(x \leq 8.2 \cdot 10^{-56}\right):\\
\;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot -6 + 4\right)\\
\end{array}
\end{array}
if x < -9.19999999999999987e50 or 8.2000000000000003e-56 < x Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 81.4%
sub-neg81.4%
distribute-rgt-in81.4%
metadata-eval81.4%
distribute-lft-neg-in81.4%
associate-+r+81.4%
metadata-eval81.4%
distribute-rgt-neg-in81.4%
metadata-eval81.4%
Simplified81.4%
if -9.19999999999999987e50 < x < 8.2000000000000003e-56Initial program 99.6%
+-commutative99.6%
associate-*l*99.1%
fma-define99.1%
sub-neg99.1%
distribute-rgt-in99.1%
metadata-eval99.1%
metadata-eval99.1%
distribute-lft-neg-out99.1%
distribute-rgt-neg-in99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in y around inf 81.3%
Final simplification81.3%
(FPCore (x y z) :precision binary64 (if (<= z -0.58) (* (- y x) (* z -6.0)) (if (<= z 0.52) (+ x (* (- y x) 4.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.58) {
tmp = (y - x) * (z * -6.0);
} else if (z <= 0.52) {
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.58d0)) then
tmp = (y - x) * (z * (-6.0d0))
else if (z <= 0.52d0) 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.58) {
tmp = (y - x) * (z * -6.0);
} else if (z <= 0.52) {
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.58: tmp = (y - x) * (z * -6.0) elif z <= 0.52: 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.58) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); elseif (z <= 0.52) 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.58) tmp = (y - x) * (z * -6.0); elseif (z <= 0.52) 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.58], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.52], 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.58:\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;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.57999999999999996Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
associate-*r*98.6%
*-commutative98.6%
associate-*l*98.6%
Simplified98.6%
if -0.57999999999999996 < z < 0.52000000000000002Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 98.6%
if 0.52000000000000002 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.9%
Taylor expanded in z around inf 96.8%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.05e+43) (not (<= x 3.3e-41))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.05e+43) || !(x <= 3.3e-41)) {
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.05d+43)) .or. (.not. (x <= 3.3d-41))) 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.05e+43) || !(x <= 3.3e-41)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.05e+43) or not (x <= 3.3e-41): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.05e+43) || !(x <= 3.3e-41)) 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.05e+43) || ~((x <= 3.3e-41))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.05e+43], N[Not[LessEqual[x, 3.3e-41]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.05 \cdot 10^{+43} \lor \neg \left(x \leq 3.3 \cdot 10^{-41}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -2.05e43 or 3.30000000000000024e-41 < x Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 81.4%
sub-neg81.4%
distribute-rgt-in81.4%
metadata-eval81.4%
distribute-lft-neg-in81.4%
associate-+r+81.4%
metadata-eval81.4%
distribute-rgt-neg-in81.4%
metadata-eval81.4%
Simplified81.4%
Taylor expanded in z around 0 40.8%
*-commutative40.8%
Simplified40.8%
if -2.05e43 < x < 3.30000000000000024e-41Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 81.1%
Taylor expanded in z around 0 37.3%
*-commutative37.3%
Simplified37.3%
Final simplification38.9%
(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.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 46.7%
sub-neg46.7%
distribute-rgt-in46.7%
metadata-eval46.7%
distribute-lft-neg-in46.7%
associate-+r+46.7%
metadata-eval46.7%
distribute-rgt-neg-in46.7%
metadata-eval46.7%
Simplified46.7%
Taylor expanded in z around 0 22.8%
*-commutative22.8%
Simplified22.8%
Final simplification22.8%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 54.8%
associate-*r*54.8%
Simplified54.8%
Taylor expanded in x around inf 2.7%
Final simplification2.7%
herbie shell --seed 2024080
(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))))