
(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 17 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.6%
+-commutative99.6%
associate-*l*99.8%
fma-define99.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 -4.5e+68)
t_0
(if (<= z -1.5e+28)
t_1
(if (<= z -7e-15)
(* y 4.0)
(if (<= z -1e-228)
(* x -3.0)
(if (<= z 5.6e-273)
(* y 4.0)
(if (<= z 1.4e-81)
(* x -3.0)
(if (<= z 1.5e-20)
(* y 4.0)
(if (<= z 0.52)
(* x -3.0)
(if (<= z 9e+125) t_0 t_1)))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -4.5e+68) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = t_1;
} else if (z <= -7e-15) {
tmp = y * 4.0;
} else if (z <= -1e-228) {
tmp = x * -3.0;
} else if (z <= 5.6e-273) {
tmp = y * 4.0;
} else if (z <= 1.4e-81) {
tmp = x * -3.0;
} else if (z <= 1.5e-20) {
tmp = y * 4.0;
} else if (z <= 0.52) {
tmp = x * -3.0;
} else if (z <= 9e+125) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-4.5d+68)) then
tmp = t_0
else if (z <= (-1.5d+28)) then
tmp = t_1
else if (z <= (-7d-15)) then
tmp = y * 4.0d0
else if (z <= (-1d-228)) then
tmp = x * (-3.0d0)
else if (z <= 5.6d-273) then
tmp = y * 4.0d0
else if (z <= 1.4d-81) then
tmp = x * (-3.0d0)
else if (z <= 1.5d-20) then
tmp = y * 4.0d0
else if (z <= 0.52d0) then
tmp = x * (-3.0d0)
else if (z <= 9d+125) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -4.5e+68) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = t_1;
} else if (z <= -7e-15) {
tmp = y * 4.0;
} else if (z <= -1e-228) {
tmp = x * -3.0;
} else if (z <= 5.6e-273) {
tmp = y * 4.0;
} else if (z <= 1.4e-81) {
tmp = x * -3.0;
} else if (z <= 1.5e-20) {
tmp = y * 4.0;
} else if (z <= 0.52) {
tmp = x * -3.0;
} else if (z <= 9e+125) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -4.5e+68: tmp = t_0 elif z <= -1.5e+28: tmp = t_1 elif z <= -7e-15: tmp = y * 4.0 elif z <= -1e-228: tmp = x * -3.0 elif z <= 5.6e-273: tmp = y * 4.0 elif z <= 1.4e-81: tmp = x * -3.0 elif z <= 1.5e-20: tmp = y * 4.0 elif z <= 0.52: tmp = x * -3.0 elif z <= 9e+125: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -4.5e+68) tmp = t_0; elseif (z <= -1.5e+28) tmp = t_1; elseif (z <= -7e-15) tmp = Float64(y * 4.0); elseif (z <= -1e-228) tmp = Float64(x * -3.0); elseif (z <= 5.6e-273) tmp = Float64(y * 4.0); elseif (z <= 1.4e-81) tmp = Float64(x * -3.0); elseif (z <= 1.5e-20) tmp = Float64(y * 4.0); elseif (z <= 0.52) tmp = Float64(x * -3.0); elseif (z <= 9e+125) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -4.5e+68) tmp = t_0; elseif (z <= -1.5e+28) tmp = t_1; elseif (z <= -7e-15) tmp = y * 4.0; elseif (z <= -1e-228) tmp = x * -3.0; elseif (z <= 5.6e-273) tmp = y * 4.0; elseif (z <= 1.4e-81) tmp = x * -3.0; elseif (z <= 1.5e-20) tmp = y * 4.0; elseif (z <= 0.52) tmp = x * -3.0; elseif (z <= 9e+125) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+68], t$95$0, If[LessEqual[z, -1.5e+28], t$95$1, If[LessEqual[z, -7e-15], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1e-228], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.6e-273], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-81], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.5e-20], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.52], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 9e+125], t$95$0, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-15}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-228}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-273}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-81}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-20}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+125}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5000000000000003e68 or 0.52000000000000002 < z < 9.0000000000000001e125Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.6%
Taylor expanded in y around inf 63.6%
*-commutative63.6%
Simplified63.6%
if -4.5000000000000003e68 < z < -1.5e28 or 9.0000000000000001e125 < z Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 66.4%
sub-neg66.4%
distribute-rgt-in66.4%
metadata-eval66.4%
metadata-eval66.4%
neg-mul-166.4%
associate-*r*66.4%
*-commutative66.4%
distribute-lft-in66.4%
distribute-lft-in66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
flip-+64.3%
associate-*r/55.5%
metadata-eval55.5%
swap-sqr55.6%
pow255.6%
metadata-eval55.6%
*-commutative55.6%
cancel-sign-sub-inv55.6%
metadata-eval55.6%
Applied egg-rr55.6%
associate-/l*64.3%
+-commutative64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in z around inf 66.4%
if -1.5e28 < z < -7.0000000000000001e-15 or -1.00000000000000003e-228 < z < 5.59999999999999971e-273 or 1.3999999999999999e-81 < z < 1.50000000000000014e-20Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
add099.4%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 62.6%
Taylor expanded in z around 0 57.2%
*-commutative57.2%
Simplified57.2%
if -7.0000000000000001e-15 < z < -1.00000000000000003e-228 or 5.59999999999999971e-273 < z < 1.3999999999999999e-81 or 1.50000000000000014e-20 < z < 0.52000000000000002Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 63.4%
sub-neg63.4%
distribute-rgt-in63.5%
metadata-eval63.5%
metadata-eval63.5%
neg-mul-163.5%
associate-*r*63.5%
*-commutative63.5%
distribute-lft-in63.5%
distribute-lft-in63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-+r+63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-*r*63.5%
metadata-eval63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in z around 0 62.7%
*-commutative62.7%
Simplified62.7%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -2.9e+72)
t_0
(if (<= z -1.5e+28)
(* 6.0 (* x z))
(if (<= z -6.4e-16)
(* y 4.0)
(if (<= z -1.4e-229)
(* x -3.0)
(if (<= z 5.2e-273)
(* y 4.0)
(if (<= z 7.8e-82)
(* x -3.0)
(if (<= z 5e-21)
(* y 4.0)
(if (<= z 0.55)
(* x -3.0)
(if (<= z 6.2e+126) t_0 (* x (* z 6.0)))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -2.9e+72) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = 6.0 * (x * z);
} else if (z <= -6.4e-16) {
tmp = y * 4.0;
} else if (z <= -1.4e-229) {
tmp = x * -3.0;
} else if (z <= 5.2e-273) {
tmp = y * 4.0;
} else if (z <= 7.8e-82) {
tmp = x * -3.0;
} else if (z <= 5e-21) {
tmp = y * 4.0;
} else if (z <= 0.55) {
tmp = x * -3.0;
} else if (z <= 6.2e+126) {
tmp = t_0;
} else {
tmp = x * (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) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-2.9d+72)) then
tmp = t_0
else if (z <= (-1.5d+28)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-6.4d-16)) then
tmp = y * 4.0d0
else if (z <= (-1.4d-229)) then
tmp = x * (-3.0d0)
else if (z <= 5.2d-273) then
tmp = y * 4.0d0
else if (z <= 7.8d-82) then
tmp = x * (-3.0d0)
else if (z <= 5d-21) then
tmp = y * 4.0d0
else if (z <= 0.55d0) then
tmp = x * (-3.0d0)
else if (z <= 6.2d+126) then
tmp = t_0
else
tmp = x * (z * 6.0d0)
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 <= -2.9e+72) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = 6.0 * (x * z);
} else if (z <= -6.4e-16) {
tmp = y * 4.0;
} else if (z <= -1.4e-229) {
tmp = x * -3.0;
} else if (z <= 5.2e-273) {
tmp = y * 4.0;
} else if (z <= 7.8e-82) {
tmp = x * -3.0;
} else if (z <= 5e-21) {
tmp = y * 4.0;
} else if (z <= 0.55) {
tmp = x * -3.0;
} else if (z <= 6.2e+126) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -2.9e+72: tmp = t_0 elif z <= -1.5e+28: tmp = 6.0 * (x * z) elif z <= -6.4e-16: tmp = y * 4.0 elif z <= -1.4e-229: tmp = x * -3.0 elif z <= 5.2e-273: tmp = y * 4.0 elif z <= 7.8e-82: tmp = x * -3.0 elif z <= 5e-21: tmp = y * 4.0 elif z <= 0.55: tmp = x * -3.0 elif z <= 6.2e+126: tmp = t_0 else: tmp = x * (z * 6.0) return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -2.9e+72) tmp = t_0; elseif (z <= -1.5e+28) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -6.4e-16) tmp = Float64(y * 4.0); elseif (z <= -1.4e-229) tmp = Float64(x * -3.0); elseif (z <= 5.2e-273) tmp = Float64(y * 4.0); elseif (z <= 7.8e-82) tmp = Float64(x * -3.0); elseif (z <= 5e-21) tmp = Float64(y * 4.0); elseif (z <= 0.55) tmp = Float64(x * -3.0); elseif (z <= 6.2e+126) tmp = t_0; else tmp = Float64(x * Float64(z * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -2.9e+72) tmp = t_0; elseif (z <= -1.5e+28) tmp = 6.0 * (x * z); elseif (z <= -6.4e-16) tmp = y * 4.0; elseif (z <= -1.4e-229) tmp = x * -3.0; elseif (z <= 5.2e-273) tmp = y * 4.0; elseif (z <= 7.8e-82) tmp = x * -3.0; elseif (z <= 5e-21) tmp = y * 4.0; elseif (z <= 0.55) tmp = x * -3.0; elseif (z <= 6.2e+126) tmp = t_0; else tmp = x * (z * 6.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, -2.9e+72], t$95$0, If[LessEqual[z, -1.5e+28], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.4e-16], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.4e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.2e-273], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.8e-82], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5e-21], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.55], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.2e+126], t$95$0, N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+28}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-16}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-273}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-82}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-21}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+126}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\end{array}
\end{array}
if z < -2.90000000000000017e72 or 0.55000000000000004 < z < 6.2e126Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.6%
Taylor expanded in y around inf 63.6%
*-commutative63.6%
Simplified63.6%
if -2.90000000000000017e72 < z < -1.5e28Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 73.2%
sub-neg73.2%
distribute-rgt-in73.2%
metadata-eval73.2%
metadata-eval73.2%
neg-mul-173.2%
associate-*r*73.2%
*-commutative73.2%
distribute-lft-in73.2%
distribute-lft-in73.2%
metadata-eval73.2%
metadata-eval73.2%
associate-+r+73.2%
metadata-eval73.2%
metadata-eval73.2%
associate-*r*73.2%
metadata-eval73.2%
*-commutative73.2%
Simplified73.2%
flip-+73.2%
associate-*r/56.8%
metadata-eval56.8%
swap-sqr56.9%
pow256.9%
metadata-eval56.9%
*-commutative56.9%
cancel-sign-sub-inv56.9%
metadata-eval56.9%
Applied egg-rr56.9%
associate-/l*73.2%
+-commutative73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in z around inf 73.4%
if -1.5e28 < z < -6.40000000000000046e-16 or -1.39999999999999995e-229 < z < 5.19999999999999967e-273 or 7.79999999999999947e-82 < z < 4.99999999999999973e-21Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
add099.4%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 62.6%
Taylor expanded in z around 0 57.2%
*-commutative57.2%
Simplified57.2%
if -6.40000000000000046e-16 < z < -1.39999999999999995e-229 or 5.19999999999999967e-273 < z < 7.79999999999999947e-82 or 4.99999999999999973e-21 < z < 0.55000000000000004Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 63.4%
sub-neg63.4%
distribute-rgt-in63.5%
metadata-eval63.5%
metadata-eval63.5%
neg-mul-163.5%
associate-*r*63.5%
*-commutative63.5%
distribute-lft-in63.5%
distribute-lft-in63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-+r+63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-*r*63.5%
metadata-eval63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in z around 0 62.7%
*-commutative62.7%
Simplified62.7%
if 6.2e126 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 63.9%
sub-neg63.9%
distribute-rgt-in63.9%
metadata-eval63.9%
metadata-eval63.9%
neg-mul-163.9%
associate-*r*63.9%
*-commutative63.9%
distribute-lft-in63.9%
distribute-lft-in63.9%
metadata-eval63.9%
metadata-eval63.9%
associate-+r+63.9%
metadata-eval63.9%
metadata-eval63.9%
associate-*r*63.9%
metadata-eval63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in z around inf 63.9%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (* z -6.0))))
(if (<= z -2.8e+74)
t_0
(if (<= z -1.5e+28)
(* 6.0 (* x z))
(if (<= z -2.9e-15)
(* y 4.0)
(if (<= z -6.5e-229)
(* x -3.0)
(if (<= z 1.6e-271)
(* y 4.0)
(if (<= z 3.4e-81)
(* x -3.0)
(if (<= z 6.2e-18)
(* y 4.0)
(if (<= z 0.56)
(* x -3.0)
(if (<= z 1.95e+126) t_0 (* x (* z 6.0)))))))))))))
double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double tmp;
if (z <= -2.8e+74) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = 6.0 * (x * z);
} else if (z <= -2.9e-15) {
tmp = y * 4.0;
} else if (z <= -6.5e-229) {
tmp = x * -3.0;
} else if (z <= 1.6e-271) {
tmp = y * 4.0;
} else if (z <= 3.4e-81) {
tmp = x * -3.0;
} else if (z <= 6.2e-18) {
tmp = y * 4.0;
} else if (z <= 0.56) {
tmp = x * -3.0;
} else if (z <= 1.95e+126) {
tmp = t_0;
} else {
tmp = x * (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) :: t_0
real(8) :: tmp
t_0 = y * (z * (-6.0d0))
if (z <= (-2.8d+74)) then
tmp = t_0
else if (z <= (-1.5d+28)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-2.9d-15)) then
tmp = y * 4.0d0
else if (z <= (-6.5d-229)) then
tmp = x * (-3.0d0)
else if (z <= 1.6d-271) then
tmp = y * 4.0d0
else if (z <= 3.4d-81) then
tmp = x * (-3.0d0)
else if (z <= 6.2d-18) then
tmp = y * 4.0d0
else if (z <= 0.56d0) then
tmp = x * (-3.0d0)
else if (z <= 1.95d+126) then
tmp = t_0
else
tmp = x * (z * 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double tmp;
if (z <= -2.8e+74) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = 6.0 * (x * z);
} else if (z <= -2.9e-15) {
tmp = y * 4.0;
} else if (z <= -6.5e-229) {
tmp = x * -3.0;
} else if (z <= 1.6e-271) {
tmp = y * 4.0;
} else if (z <= 3.4e-81) {
tmp = x * -3.0;
} else if (z <= 6.2e-18) {
tmp = y * 4.0;
} else if (z <= 0.56) {
tmp = x * -3.0;
} else if (z <= 1.95e+126) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
def code(x, y, z): t_0 = y * (z * -6.0) tmp = 0 if z <= -2.8e+74: tmp = t_0 elif z <= -1.5e+28: tmp = 6.0 * (x * z) elif z <= -2.9e-15: tmp = y * 4.0 elif z <= -6.5e-229: tmp = x * -3.0 elif z <= 1.6e-271: tmp = y * 4.0 elif z <= 3.4e-81: tmp = x * -3.0 elif z <= 6.2e-18: tmp = y * 4.0 elif z <= 0.56: tmp = x * -3.0 elif z <= 1.95e+126: tmp = t_0 else: tmp = x * (z * 6.0) return tmp
function code(x, y, z) t_0 = Float64(y * Float64(z * -6.0)) tmp = 0.0 if (z <= -2.8e+74) tmp = t_0; elseif (z <= -1.5e+28) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -2.9e-15) tmp = Float64(y * 4.0); elseif (z <= -6.5e-229) tmp = Float64(x * -3.0); elseif (z <= 1.6e-271) tmp = Float64(y * 4.0); elseif (z <= 3.4e-81) tmp = Float64(x * -3.0); elseif (z <= 6.2e-18) tmp = Float64(y * 4.0); elseif (z <= 0.56) tmp = Float64(x * -3.0); elseif (z <= 1.95e+126) tmp = t_0; else tmp = Float64(x * Float64(z * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (z * -6.0); tmp = 0.0; if (z <= -2.8e+74) tmp = t_0; elseif (z <= -1.5e+28) tmp = 6.0 * (x * z); elseif (z <= -2.9e-15) tmp = y * 4.0; elseif (z <= -6.5e-229) tmp = x * -3.0; elseif (z <= 1.6e-271) tmp = y * 4.0; elseif (z <= 3.4e-81) tmp = x * -3.0; elseif (z <= 6.2e-18) tmp = y * 4.0; elseif (z <= 0.56) tmp = x * -3.0; elseif (z <= 1.95e+126) tmp = t_0; else tmp = x * (z * 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+74], t$95$0, If[LessEqual[z, -1.5e+28], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.9e-15], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -6.5e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.6e-271], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.4e-81], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.2e-18], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.56], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.95e+126], t$95$0, N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+74}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+28}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-15}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-271}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-81}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-18}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.56:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+126}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\end{array}
\end{array}
if z < -2.80000000000000002e74 or 0.56000000000000005 < z < 1.94999999999999997e126Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.6%
Taylor expanded in y around inf 63.6%
*-commutative63.6%
associate-*l*63.7%
*-commutative63.7%
*-commutative63.7%
Simplified63.7%
if -2.80000000000000002e74 < z < -1.5e28Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 73.2%
sub-neg73.2%
distribute-rgt-in73.2%
metadata-eval73.2%
metadata-eval73.2%
neg-mul-173.2%
associate-*r*73.2%
*-commutative73.2%
distribute-lft-in73.2%
distribute-lft-in73.2%
metadata-eval73.2%
metadata-eval73.2%
associate-+r+73.2%
metadata-eval73.2%
metadata-eval73.2%
associate-*r*73.2%
metadata-eval73.2%
*-commutative73.2%
Simplified73.2%
flip-+73.2%
associate-*r/56.8%
metadata-eval56.8%
swap-sqr56.9%
pow256.9%
metadata-eval56.9%
*-commutative56.9%
cancel-sign-sub-inv56.9%
metadata-eval56.9%
Applied egg-rr56.9%
associate-/l*73.2%
+-commutative73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in z around inf 73.4%
if -1.5e28 < z < -2.90000000000000019e-15 or -6.5e-229 < z < 1.59999999999999989e-271 or 3.3999999999999999e-81 < z < 6.20000000000000014e-18Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
add099.4%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 62.6%
Taylor expanded in z around 0 57.2%
*-commutative57.2%
Simplified57.2%
if -2.90000000000000019e-15 < z < -6.5e-229 or 1.59999999999999989e-271 < z < 3.3999999999999999e-81 or 6.20000000000000014e-18 < z < 0.56000000000000005Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 63.4%
sub-neg63.4%
distribute-rgt-in63.5%
metadata-eval63.5%
metadata-eval63.5%
neg-mul-163.5%
associate-*r*63.5%
*-commutative63.5%
distribute-lft-in63.5%
distribute-lft-in63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-+r+63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-*r*63.5%
metadata-eval63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in z around 0 62.7%
*-commutative62.7%
Simplified62.7%
if 1.94999999999999997e126 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 63.9%
sub-neg63.9%
distribute-rgt-in63.9%
metadata-eval63.9%
metadata-eval63.9%
neg-mul-163.9%
associate-*r*63.9%
*-commutative63.9%
distribute-lft-in63.9%
distribute-lft-in63.9%
metadata-eval63.9%
metadata-eval63.9%
associate-+r+63.9%
metadata-eval63.9%
metadata-eval63.9%
associate-*r*63.9%
metadata-eval63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in z around inf 63.9%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (* z -6.0))) (t_1 (* z (* x 6.0))))
(if (<= z -2.1e+74)
t_0
(if (<= z -1.5e+28)
t_1
(if (<= z -6.8e-15)
(* y 4.0)
(if (<= z -6.2e-229)
(* x -3.0)
(if (<= z 2.5e-272)
(* y 4.0)
(if (<= z 2.6e-81)
(* x -3.0)
(if (<= z 4.4e-17)
(* y 4.0)
(if (<= z 0.55)
(* x -3.0)
(if (<= z 1.8e+125) t_0 t_1)))))))))))
double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double t_1 = z * (x * 6.0);
double tmp;
if (z <= -2.1e+74) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = t_1;
} else if (z <= -6.8e-15) {
tmp = y * 4.0;
} else if (z <= -6.2e-229) {
tmp = x * -3.0;
} else if (z <= 2.5e-272) {
tmp = y * 4.0;
} else if (z <= 2.6e-81) {
tmp = x * -3.0;
} else if (z <= 4.4e-17) {
tmp = y * 4.0;
} else if (z <= 0.55) {
tmp = x * -3.0;
} else if (z <= 1.8e+125) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * (z * (-6.0d0))
t_1 = z * (x * 6.0d0)
if (z <= (-2.1d+74)) then
tmp = t_0
else if (z <= (-1.5d+28)) then
tmp = t_1
else if (z <= (-6.8d-15)) then
tmp = y * 4.0d0
else if (z <= (-6.2d-229)) then
tmp = x * (-3.0d0)
else if (z <= 2.5d-272) then
tmp = y * 4.0d0
else if (z <= 2.6d-81) then
tmp = x * (-3.0d0)
else if (z <= 4.4d-17) then
tmp = y * 4.0d0
else if (z <= 0.55d0) then
tmp = x * (-3.0d0)
else if (z <= 1.8d+125) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double t_1 = z * (x * 6.0);
double tmp;
if (z <= -2.1e+74) {
tmp = t_0;
} else if (z <= -1.5e+28) {
tmp = t_1;
} else if (z <= -6.8e-15) {
tmp = y * 4.0;
} else if (z <= -6.2e-229) {
tmp = x * -3.0;
} else if (z <= 2.5e-272) {
tmp = y * 4.0;
} else if (z <= 2.6e-81) {
tmp = x * -3.0;
} else if (z <= 4.4e-17) {
tmp = y * 4.0;
} else if (z <= 0.55) {
tmp = x * -3.0;
} else if (z <= 1.8e+125) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y * (z * -6.0) t_1 = z * (x * 6.0) tmp = 0 if z <= -2.1e+74: tmp = t_0 elif z <= -1.5e+28: tmp = t_1 elif z <= -6.8e-15: tmp = y * 4.0 elif z <= -6.2e-229: tmp = x * -3.0 elif z <= 2.5e-272: tmp = y * 4.0 elif z <= 2.6e-81: tmp = x * -3.0 elif z <= 4.4e-17: tmp = y * 4.0 elif z <= 0.55: tmp = x * -3.0 elif z <= 1.8e+125: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(z * -6.0)) t_1 = Float64(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -2.1e+74) tmp = t_0; elseif (z <= -1.5e+28) tmp = t_1; elseif (z <= -6.8e-15) tmp = Float64(y * 4.0); elseif (z <= -6.2e-229) tmp = Float64(x * -3.0); elseif (z <= 2.5e-272) tmp = Float64(y * 4.0); elseif (z <= 2.6e-81) tmp = Float64(x * -3.0); elseif (z <= 4.4e-17) tmp = Float64(y * 4.0); elseif (z <= 0.55) tmp = Float64(x * -3.0); elseif (z <= 1.8e+125) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (z * -6.0); t_1 = z * (x * 6.0); tmp = 0.0; if (z <= -2.1e+74) tmp = t_0; elseif (z <= -1.5e+28) tmp = t_1; elseif (z <= -6.8e-15) tmp = y * 4.0; elseif (z <= -6.2e-229) tmp = x * -3.0; elseif (z <= 2.5e-272) tmp = y * 4.0; elseif (z <= 2.6e-81) tmp = x * -3.0; elseif (z <= 4.4e-17) tmp = y * 4.0; elseif (z <= 0.55) tmp = x * -3.0; elseif (z <= 1.8e+125) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+74], t$95$0, If[LessEqual[z, -1.5e+28], t$95$1, If[LessEqual[z, -6.8e-15], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -6.2e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.5e-272], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.6e-81], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.4e-17], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.55], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.8e+125], t$95$0, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(z \cdot -6\right)\\
t_1 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+74}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-15}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-272}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-81}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-17}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+125}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.0999999999999999e74 or 0.55000000000000004 < z < 1.8000000000000002e125Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.6%
Taylor expanded in y around inf 63.6%
*-commutative63.6%
associate-*l*63.7%
*-commutative63.7%
*-commutative63.7%
Simplified63.7%
if -2.0999999999999999e74 < z < -1.5e28 or 1.8000000000000002e125 < z Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 66.4%
sub-neg66.4%
distribute-rgt-in66.4%
metadata-eval66.4%
metadata-eval66.4%
neg-mul-166.4%
associate-*r*66.4%
*-commutative66.4%
distribute-lft-in66.4%
distribute-lft-in66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
flip-+64.3%
associate-*r/55.5%
metadata-eval55.5%
swap-sqr55.6%
pow255.6%
metadata-eval55.6%
*-commutative55.6%
cancel-sign-sub-inv55.6%
metadata-eval55.6%
Applied egg-rr55.6%
associate-/l*64.3%
+-commutative64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in z around inf 66.4%
associate-*r*66.6%
Simplified66.6%
if -1.5e28 < z < -6.8000000000000001e-15 or -6.2000000000000002e-229 < z < 2.49999999999999991e-272 or 2.5999999999999999e-81 < z < 4.4e-17Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
add099.4%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 62.6%
Taylor expanded in z around 0 57.2%
*-commutative57.2%
Simplified57.2%
if -6.8000000000000001e-15 < z < -6.2000000000000002e-229 or 2.49999999999999991e-272 < z < 2.5999999999999999e-81 or 4.4e-17 < z < 0.55000000000000004Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 63.4%
sub-neg63.4%
distribute-rgt-in63.5%
metadata-eval63.5%
metadata-eval63.5%
neg-mul-163.5%
associate-*r*63.5%
*-commutative63.5%
distribute-lft-in63.5%
distribute-lft-in63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-+r+63.5%
metadata-eval63.5%
metadata-eval63.5%
associate-*r*63.5%
metadata-eval63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in z around 0 62.7%
*-commutative62.7%
Simplified62.7%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -3.5)
t_0
(if (<= z -8e-17)
(* 6.0 (* y (- 0.6666666666666666 z)))
(if (<= z -6.8e-229)
(* x -3.0)
(if (<= z 2.3e-273)
(* y 4.0)
(if (<= z 7e-82)
(* x -3.0)
(if (<= z 1.65e-18)
(* 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 <= -3.5) {
tmp = t_0;
} else if (z <= -8e-17) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else if (z <= -6.8e-229) {
tmp = x * -3.0;
} else if (z <= 2.3e-273) {
tmp = y * 4.0;
} else if (z <= 7e-82) {
tmp = x * -3.0;
} else if (z <= 1.65e-18) {
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 <= (-3.5d0)) then
tmp = t_0
else if (z <= (-8d-17)) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else if (z <= (-6.8d-229)) then
tmp = x * (-3.0d0)
else if (z <= 2.3d-273) then
tmp = y * 4.0d0
else if (z <= 7d-82) then
tmp = x * (-3.0d0)
else if (z <= 1.65d-18) 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 <= -3.5) {
tmp = t_0;
} else if (z <= -8e-17) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else if (z <= -6.8e-229) {
tmp = x * -3.0;
} else if (z <= 2.3e-273) {
tmp = y * 4.0;
} else if (z <= 7e-82) {
tmp = x * -3.0;
} else if (z <= 1.65e-18) {
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 <= -3.5: tmp = t_0 elif z <= -8e-17: tmp = 6.0 * (y * (0.6666666666666666 - z)) elif z <= -6.8e-229: tmp = x * -3.0 elif z <= 2.3e-273: tmp = y * 4.0 elif z <= 7e-82: tmp = x * -3.0 elif z <= 1.65e-18: 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 <= -3.5) tmp = t_0; elseif (z <= -8e-17) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); elseif (z <= -6.8e-229) tmp = Float64(x * -3.0); elseif (z <= 2.3e-273) tmp = Float64(y * 4.0); elseif (z <= 7e-82) tmp = Float64(x * -3.0); elseif (z <= 1.65e-18) 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 <= -3.5) tmp = t_0; elseif (z <= -8e-17) tmp = 6.0 * (y * (0.6666666666666666 - z)); elseif (z <= -6.8e-229) tmp = x * -3.0; elseif (z <= 2.3e-273) tmp = y * 4.0; elseif (z <= 7e-82) tmp = x * -3.0; elseif (z <= 1.65e-18) 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, -3.5], t$95$0, If[LessEqual[z, -8e-17], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.3e-273], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7e-82], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.65e-18], 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 -3.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-17}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-273}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-82}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-18}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.5 or 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.8%
if -3.5 < z < -8.00000000000000057e-17Initial program 98.8%
metadata-eval98.8%
Simplified98.8%
add098.8%
associate-*l*99.0%
Applied egg-rr99.0%
Taylor expanded in x around 0 85.5%
if -8.00000000000000057e-17 < z < -6.7999999999999998e-229 or 2.29999999999999981e-273 < z < 6.9999999999999997e-82 or 1.6500000000000001e-18 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 64.1%
sub-neg64.1%
distribute-rgt-in64.1%
metadata-eval64.1%
metadata-eval64.1%
neg-mul-164.1%
associate-*r*64.1%
*-commutative64.1%
distribute-lft-in64.1%
distribute-lft-in64.1%
metadata-eval64.1%
metadata-eval64.1%
associate-+r+64.1%
metadata-eval64.1%
metadata-eval64.1%
associate-*r*64.1%
metadata-eval64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in z around 0 63.4%
*-commutative63.4%
Simplified63.4%
if -6.7999999999999998e-229 < z < 2.29999999999999981e-273 or 6.9999999999999997e-82 < z < 1.6500000000000001e-18Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add099.5%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 59.6%
Taylor expanded in z around 0 59.8%
*-commutative59.8%
Simplified59.8%
Final simplification78.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -4.8e-9)
t_0
(if (<= z -8e-229)
(* x -3.0)
(if (<= z 1.42e-272)
(* y 4.0)
(if (<= z 1.6e-81)
(* x -3.0)
(if (<= z 7e-15) (* 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 <= -4.8e-9) {
tmp = t_0;
} else if (z <= -8e-229) {
tmp = x * -3.0;
} else if (z <= 1.42e-272) {
tmp = y * 4.0;
} else if (z <= 1.6e-81) {
tmp = x * -3.0;
} else if (z <= 7e-15) {
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 <= (-4.8d-9)) then
tmp = t_0
else if (z <= (-8d-229)) then
tmp = x * (-3.0d0)
else if (z <= 1.42d-272) then
tmp = y * 4.0d0
else if (z <= 1.6d-81) then
tmp = x * (-3.0d0)
else if (z <= 7d-15) 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 <= -4.8e-9) {
tmp = t_0;
} else if (z <= -8e-229) {
tmp = x * -3.0;
} else if (z <= 1.42e-272) {
tmp = y * 4.0;
} else if (z <= 1.6e-81) {
tmp = x * -3.0;
} else if (z <= 7e-15) {
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 <= -4.8e-9: tmp = t_0 elif z <= -8e-229: tmp = x * -3.0 elif z <= 1.42e-272: tmp = y * 4.0 elif z <= 1.6e-81: tmp = x * -3.0 elif z <= 7e-15: 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 <= -4.8e-9) tmp = t_0; elseif (z <= -8e-229) tmp = Float64(x * -3.0); elseif (z <= 1.42e-272) tmp = Float64(y * 4.0); elseif (z <= 1.6e-81) tmp = Float64(x * -3.0); elseif (z <= 7e-15) 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 <= -4.8e-9) tmp = t_0; elseif (z <= -8e-229) tmp = x * -3.0; elseif (z <= 1.42e-272) tmp = y * 4.0; elseif (z <= 1.6e-81) tmp = x * -3.0; elseif (z <= 7e-15) 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, -4.8e-9], t$95$0, If[LessEqual[z, -8e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.42e-272], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.6e-81], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7e-15], 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 -4.8 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{-272}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-81}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-15}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -4.8e-9 or 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.0%
if -4.8e-9 < z < -8.00000000000000055e-229 or 1.41999999999999997e-272 < z < 1.6e-81 or 7.0000000000000001e-15 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 61.3%
sub-neg61.3%
distribute-rgt-in61.3%
metadata-eval61.3%
metadata-eval61.3%
neg-mul-161.3%
associate-*r*61.3%
*-commutative61.3%
distribute-lft-in61.3%
distribute-lft-in61.3%
metadata-eval61.3%
metadata-eval61.3%
associate-+r+61.3%
metadata-eval61.3%
metadata-eval61.3%
associate-*r*61.3%
metadata-eval61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in z around 0 60.2%
*-commutative60.2%
Simplified60.2%
if -8.00000000000000055e-229 < z < 1.41999999999999997e-272 or 1.6e-81 < z < 7.0000000000000001e-15Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add099.5%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 59.6%
Taylor expanded in z around 0 59.8%
*-commutative59.8%
Simplified59.8%
Final simplification76.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -26.0)
t_0
(if (<= z -6.8e-229)
(* x -3.0)
(if (<= z 2.6e-271)
(* y 4.0)
(if (<= z 2.7e-81)
(* x -3.0)
(if (<= z 7.6e-19) (* y 4.0) (if (<= z 0.55) (* x -3.0) t_0))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -26.0) {
tmp = t_0;
} else if (z <= -6.8e-229) {
tmp = x * -3.0;
} else if (z <= 2.6e-271) {
tmp = y * 4.0;
} else if (z <= 2.7e-81) {
tmp = x * -3.0;
} else if (z <= 7.6e-19) {
tmp = y * 4.0;
} else if (z <= 0.55) {
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 <= (-26.0d0)) then
tmp = t_0
else if (z <= (-6.8d-229)) then
tmp = x * (-3.0d0)
else if (z <= 2.6d-271) then
tmp = y * 4.0d0
else if (z <= 2.7d-81) then
tmp = x * (-3.0d0)
else if (z <= 7.6d-19) then
tmp = y * 4.0d0
else if (z <= 0.55d0) 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 <= -26.0) {
tmp = t_0;
} else if (z <= -6.8e-229) {
tmp = x * -3.0;
} else if (z <= 2.6e-271) {
tmp = y * 4.0;
} else if (z <= 2.7e-81) {
tmp = x * -3.0;
} else if (z <= 7.6e-19) {
tmp = y * 4.0;
} else if (z <= 0.55) {
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 <= -26.0: tmp = t_0 elif z <= -6.8e-229: tmp = x * -3.0 elif z <= 2.6e-271: tmp = y * 4.0 elif z <= 2.7e-81: tmp = x * -3.0 elif z <= 7.6e-19: tmp = y * 4.0 elif z <= 0.55: 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 <= -26.0) tmp = t_0; elseif (z <= -6.8e-229) tmp = Float64(x * -3.0); elseif (z <= 2.6e-271) tmp = Float64(y * 4.0); elseif (z <= 2.7e-81) tmp = Float64(x * -3.0); elseif (z <= 7.6e-19) tmp = Float64(y * 4.0); elseif (z <= 0.55) 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 <= -26.0) tmp = t_0; elseif (z <= -6.8e-229) tmp = x * -3.0; elseif (z <= 2.6e-271) tmp = y * 4.0; elseif (z <= 2.7e-81) tmp = x * -3.0; elseif (z <= 7.6e-19) tmp = y * 4.0; elseif (z <= 0.55) 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, -26.0], t$95$0, If[LessEqual[z, -6.8e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.6e-271], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.7e-81], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.6e-19], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.55], 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 -26:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-271}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-81}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-19}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -26 or 0.55000000000000004 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 98.4%
Taylor expanded in y around inf 56.7%
*-commutative56.7%
Simplified56.7%
if -26 < z < -6.7999999999999998e-229 or 2.6e-271 < z < 2.6999999999999999e-81 or 7.6e-19 < z < 0.55000000000000004Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 61.1%
sub-neg61.1%
distribute-rgt-in61.1%
metadata-eval61.1%
metadata-eval61.1%
neg-mul-161.1%
associate-*r*61.1%
*-commutative61.1%
distribute-lft-in61.1%
distribute-lft-in61.1%
metadata-eval61.1%
metadata-eval61.1%
associate-+r+61.1%
metadata-eval61.1%
metadata-eval61.1%
associate-*r*61.1%
metadata-eval61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in z around 0 59.1%
*-commutative59.1%
Simplified59.1%
if -6.7999999999999998e-229 < z < 2.6e-271 or 2.6999999999999999e-81 < z < 7.6e-19Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add099.5%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 59.6%
Taylor expanded in z around 0 59.8%
*-commutative59.8%
Simplified59.8%
Final simplification58.2%
(FPCore (x y z)
:precision binary64
(if (or (<= x -2.2e-39)
(and (not (<= x 3.3e+24)) (or (<= x 1.7e+45) (not (<= x 1.15e+103)))))
(* x (+ -3.0 (* z 6.0)))
(* 6.0 (* y (- 0.6666666666666666 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.2e-39) || (!(x <= 3.3e+24) && ((x <= 1.7e+45) || !(x <= 1.15e+103)))) {
tmp = x * (-3.0 + (z * 6.0));
} 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 <= (-2.2d-39)) .or. (.not. (x <= 3.3d+24)) .and. (x <= 1.7d+45) .or. (.not. (x <= 1.15d+103))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
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 <= -2.2e-39) || (!(x <= 3.3e+24) && ((x <= 1.7e+45) || !(x <= 1.15e+103)))) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.2e-39) or (not (x <= 3.3e+24) and ((x <= 1.7e+45) or not (x <= 1.15e+103))): tmp = x * (-3.0 + (z * 6.0)) else: tmp = 6.0 * (y * (0.6666666666666666 - z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.2e-39) || (!(x <= 3.3e+24) && ((x <= 1.7e+45) || !(x <= 1.15e+103)))) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); 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 <= -2.2e-39) || (~((x <= 3.3e+24)) && ((x <= 1.7e+45) || ~((x <= 1.15e+103))))) tmp = x * (-3.0 + (z * 6.0)); else tmp = 6.0 * (y * (0.6666666666666666 - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.2e-39], And[N[Not[LessEqual[x, 3.3e+24]], $MachinePrecision], Or[LessEqual[x, 1.7e+45], N[Not[LessEqual[x, 1.15e+103]], $MachinePrecision]]]], N[(x * N[(-3.0 + N[(z * 6.0), $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 -2.2 \cdot 10^{-39} \lor \neg \left(x \leq 3.3 \cdot 10^{+24}\right) \land \left(x \leq 1.7 \cdot 10^{+45} \lor \neg \left(x \leq 1.15 \cdot 10^{+103}\right)\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\end{array}
\end{array}
if x < -2.20000000000000001e-39 or 3.2999999999999999e24 < x < 1.7e45 or 1.15000000000000004e103 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 86.4%
sub-neg86.4%
distribute-rgt-in86.4%
metadata-eval86.4%
metadata-eval86.4%
neg-mul-186.4%
associate-*r*86.4%
*-commutative86.4%
distribute-lft-in86.4%
distribute-lft-in86.4%
metadata-eval86.4%
metadata-eval86.4%
associate-+r+86.4%
metadata-eval86.4%
metadata-eval86.4%
associate-*r*86.4%
metadata-eval86.4%
*-commutative86.4%
Simplified86.4%
if -2.20000000000000001e-39 < x < 3.2999999999999999e24 or 1.7e45 < x < 1.15000000000000004e103Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add099.6%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 79.0%
Final simplification82.4%
(FPCore (x y z)
:precision binary64
(if (or (<= x -4.2e-45)
(not (or (<= x 1e+24) (and (not (<= x 1.6e+45)) (<= x 3.8e+103)))))
(* x (+ -3.0 (* z 6.0)))
(* y (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -4.2e-45) || !((x <= 1e+24) || (!(x <= 1.6e+45) && (x <= 3.8e+103)))) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-4.2d-45)) .or. (.not. (x <= 1d+24) .or. (.not. (x <= 1.6d+45)) .and. (x <= 3.8d+103))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = y * (4.0d0 + (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -4.2e-45) || !((x <= 1e+24) || (!(x <= 1.6e+45) && (x <= 3.8e+103)))) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -4.2e-45) or not ((x <= 1e+24) or (not (x <= 1.6e+45) and (x <= 3.8e+103))): tmp = x * (-3.0 + (z * 6.0)) else: tmp = y * (4.0 + (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -4.2e-45) || !((x <= 1e+24) || (!(x <= 1.6e+45) && (x <= 3.8e+103)))) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -4.2e-45) || ~(((x <= 1e+24) || (~((x <= 1.6e+45)) && (x <= 3.8e+103))))) tmp = x * (-3.0 + (z * 6.0)); else tmp = y * (4.0 + (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -4.2e-45], N[Not[Or[LessEqual[x, 1e+24], And[N[Not[LessEqual[x, 1.6e+45]], $MachinePrecision], LessEqual[x, 3.8e+103]]]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-45} \lor \neg \left(x \leq 10^{+24} \lor \neg \left(x \leq 1.6 \cdot 10^{+45}\right) \land x \leq 3.8 \cdot 10^{+103}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\end{array}
\end{array}
if x < -4.1999999999999999e-45 or 9.9999999999999998e23 < x < 1.6000000000000001e45 or 3.7999999999999997e103 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 86.4%
sub-neg86.4%
distribute-rgt-in86.4%
metadata-eval86.4%
metadata-eval86.4%
neg-mul-186.4%
associate-*r*86.4%
*-commutative86.4%
distribute-lft-in86.4%
distribute-lft-in86.4%
metadata-eval86.4%
metadata-eval86.4%
associate-+r+86.4%
metadata-eval86.4%
metadata-eval86.4%
associate-*r*86.4%
metadata-eval86.4%
*-commutative86.4%
Simplified86.4%
if -4.1999999999999999e-45 < x < 9.9999999999999998e23 or 1.6000000000000001e45 < x < 3.7999999999999997e103Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-define99.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 79.1%
Final simplification82.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.6))) (* (- y x) (* z -6.0)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.6)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.58d0)) .or. (.not. (z <= 0.6d0))) then
tmp = (y - x) * (z * (-6.0d0))
else
tmp = x + ((y - x) * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.6)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.6): tmp = (y - x) * (z * -6.0) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.6)) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); else tmp = Float64(x + Float64(Float64(y - x) * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.6))) tmp = (y - x) * (z * -6.0); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.6]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.6\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.599999999999999978 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
add-sqr-sqrt52.8%
fma-define52.8%
associate-*l*52.9%
associate-*l*52.8%
Applied egg-rr52.8%
fma-undefine52.8%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.8%
associate-*r*97.8%
*-commutative97.8%
Simplified97.8%
if -0.57999999999999996 < z < 0.599999999999999978Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 98.2%
Final simplification98.0%
(FPCore (x y z) :precision binary64 (+ x (+ (* -6.0 (* (- y x) z)) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((-6.0d0) * ((y - x) * z)) + ((y - x) * 4.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0));
}
def code(x, y, z): return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0))
function code(x, y, z) return Float64(x + Float64(Float64(-6.0 * Float64(Float64(y - x) * z)) + Float64(Float64(y - x) * 4.0))) end
function tmp = code(x, y, z) tmp = x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0)); end
code[x_, y_, z_] := N[(x + N[(N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-6 \cdot \left(\left(y - x\right) \cdot z\right) + \left(y - x\right) \cdot 4\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -6e+28) (not (<= x 1.5e+28))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6e+28) || !(x <= 1.5e+28)) {
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 <= (-6d+28)) .or. (.not. (x <= 1.5d+28))) 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 <= -6e+28) || !(x <= 1.5e+28)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6e+28) or not (x <= 1.5e+28): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6e+28) || !(x <= 1.5e+28)) 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 <= -6e+28) || ~((x <= 1.5e+28))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6e+28], N[Not[LessEqual[x, 1.5e+28]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{+28} \lor \neg \left(x \leq 1.5 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -6.0000000000000002e28 or 1.5e28 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 80.2%
sub-neg80.2%
distribute-rgt-in80.2%
metadata-eval80.2%
metadata-eval80.2%
neg-mul-180.2%
associate-*r*80.2%
*-commutative80.2%
distribute-lft-in80.2%
distribute-lft-in80.2%
metadata-eval80.2%
metadata-eval80.2%
associate-+r+80.2%
metadata-eval80.2%
metadata-eval80.2%
associate-*r*80.2%
metadata-eval80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around 0 48.1%
*-commutative48.1%
Simplified48.1%
if -6.0000000000000002e28 < x < 1.5e28Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add099.6%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 76.6%
Taylor expanded in z around 0 40.7%
*-commutative40.7%
Simplified40.7%
Final simplification44.3%
(FPCore (x y z) :precision binary64 (if (<= x -3e+28) (/ x -0.3333333333333333) (if (<= x 1.1e+24) (* y 4.0) (* x -3.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3e+28) {
tmp = x / -0.3333333333333333;
} else if (x <= 1.1e+24) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-3d+28)) then
tmp = x / (-0.3333333333333333d0)
else if (x <= 1.1d+24) then
tmp = y * 4.0d0
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3e+28) {
tmp = x / -0.3333333333333333;
} else if (x <= 1.1e+24) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3e+28: tmp = x / -0.3333333333333333 elif x <= 1.1e+24: tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3e+28) tmp = Float64(x / -0.3333333333333333); elseif (x <= 1.1e+24) tmp = Float64(y * 4.0); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3e+28) tmp = x / -0.3333333333333333; elseif (x <= 1.1e+24) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3e+28], N[(x / -0.3333333333333333), $MachinePrecision], If[LessEqual[x, 1.1e+24], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+28}:\\
\;\;\;\;\frac{x}{-0.3333333333333333}\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+24}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if x < -3.0000000000000001e28Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 82.5%
sub-neg82.5%
distribute-rgt-in82.5%
metadata-eval82.5%
metadata-eval82.5%
neg-mul-182.5%
associate-*r*82.5%
*-commutative82.5%
distribute-lft-in82.5%
distribute-lft-in82.5%
metadata-eval82.5%
metadata-eval82.5%
associate-+r+82.5%
metadata-eval82.5%
metadata-eval82.5%
associate-*r*82.5%
metadata-eval82.5%
*-commutative82.5%
Simplified82.5%
flip-+78.1%
associate-*r/73.7%
metadata-eval73.7%
swap-sqr73.6%
pow273.6%
metadata-eval73.6%
*-commutative73.6%
cancel-sign-sub-inv73.6%
metadata-eval73.6%
Applied egg-rr73.6%
associate-/l*78.1%
+-commutative78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in z around 0 45.4%
if -3.0000000000000001e28 < x < 1.10000000000000001e24Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add099.6%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 76.6%
Taylor expanded in z around 0 40.7%
*-commutative40.7%
Simplified40.7%
if 1.10000000000000001e24 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 77.9%
sub-neg77.9%
distribute-rgt-in77.9%
metadata-eval77.9%
metadata-eval77.9%
neg-mul-177.9%
associate-*r*77.9%
*-commutative77.9%
distribute-lft-in77.9%
distribute-lft-in77.9%
metadata-eval77.9%
metadata-eval77.9%
associate-+r+77.9%
metadata-eval77.9%
metadata-eval77.9%
associate-*r*77.9%
metadata-eval77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in z around 0 51.0%
*-commutative51.0%
Simplified51.0%
Final simplification44.3%
(FPCore (x y z) :precision binary64 (+ x (* (* 6.0 (- x y)) (- z 0.6666666666666666))))
double code(double x, double y, double z) {
return x + ((6.0 * (x - y)) * (z - 0.6666666666666666));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((6.0d0 * (x - y)) * (z - 0.6666666666666666d0))
end function
public static double code(double x, double y, double z) {
return x + ((6.0 * (x - y)) * (z - 0.6666666666666666));
}
def code(x, y, z): return x + ((6.0 * (x - y)) * (z - 0.6666666666666666))
function code(x, y, z) return Float64(x + Float64(Float64(6.0 * Float64(x - y)) * Float64(z - 0.6666666666666666))) end
function tmp = code(x, y, z) tmp = x + ((6.0 * (x - y)) * (z - 0.6666666666666666)); end
code[x_, y_, z_] := N[(x + N[(N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] * N[(z - 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(6 \cdot \left(x - y\right)\right) \cdot \left(z - 0.6666666666666666\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (+ x (* (- x y) (* 6.0 (- z 0.6666666666666666)))))
double code(double x, double y, double z) {
return x + ((x - y) * (6.0 * (z - 0.6666666666666666)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((x - y) * (6.0d0 * (z - 0.6666666666666666d0)))
end function
public static double code(double x, double y, double z) {
return x + ((x - y) * (6.0 * (z - 0.6666666666666666)));
}
def code(x, y, z): return x + ((x - y) * (6.0 * (z - 0.6666666666666666)))
function code(x, y, z) return Float64(x + Float64(Float64(x - y) * Float64(6.0 * Float64(z - 0.6666666666666666)))) end
function tmp = code(x, y, z) tmp = x + ((x - y) * (6.0 * (z - 0.6666666666666666))); end
code[x_, y_, z_] := N[(x + N[(N[(x - y), $MachinePrecision] * N[(6.0 * N[(z - 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(x - y\right) \cdot \left(6 \cdot \left(z - 0.6666666666666666\right)\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
add-sqr-sqrt46.5%
fma-define46.5%
associate-*l*46.6%
associate-*l*46.6%
Applied egg-rr46.6%
fma-undefine46.5%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Final simplification99.8%
(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 52.1%
sub-neg52.1%
distribute-rgt-in52.1%
metadata-eval52.1%
metadata-eval52.1%
neg-mul-152.1%
associate-*r*52.1%
*-commutative52.1%
distribute-lft-in52.1%
distribute-lft-in52.1%
metadata-eval52.1%
metadata-eval52.1%
associate-+r+52.1%
metadata-eval52.1%
metadata-eval52.1%
associate-*r*52.1%
metadata-eval52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in z around 0 31.3%
*-commutative31.3%
Simplified31.3%
Final simplification31.3%
herbie shell --seed 2024034
(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))))