
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))))
(if (<= z -2.7e+187)
(* -6.0 (* y z))
(if (<= z -0.55)
t_0
(if (<= z -7.4e-174)
(* y 4.0)
(if (<= z -2.6e-246)
(* x -3.0)
(if (<= z -1.5e-299)
(* y 4.0)
(if (<= z 8.5e-218)
(* x -3.0)
(if (<= z 4e-70)
(* y 4.0)
(if (<= z 1.3e-8)
(* x -3.0)
(if (<= z 0.55) (* y 4.0) t_0)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -2.7e+187) {
tmp = -6.0 * (y * z);
} else if (z <= -0.55) {
tmp = t_0;
} else if (z <= -7.4e-174) {
tmp = y * 4.0;
} else if (z <= -2.6e-246) {
tmp = x * -3.0;
} else if (z <= -1.5e-299) {
tmp = y * 4.0;
} else if (z <= 8.5e-218) {
tmp = x * -3.0;
} else if (z <= 4e-70) {
tmp = y * 4.0;
} else if (z <= 1.3e-8) {
tmp = x * -3.0;
} else if (z <= 0.55) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (x * z)
if (z <= (-2.7d+187)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-0.55d0)) then
tmp = t_0
else if (z <= (-7.4d-174)) then
tmp = y * 4.0d0
else if (z <= (-2.6d-246)) then
tmp = x * (-3.0d0)
else if (z <= (-1.5d-299)) then
tmp = y * 4.0d0
else if (z <= 8.5d-218) then
tmp = x * (-3.0d0)
else if (z <= 4d-70) then
tmp = y * 4.0d0
else if (z <= 1.3d-8) then
tmp = x * (-3.0d0)
else if (z <= 0.55d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -2.7e+187) {
tmp = -6.0 * (y * z);
} else if (z <= -0.55) {
tmp = t_0;
} else if (z <= -7.4e-174) {
tmp = y * 4.0;
} else if (z <= -2.6e-246) {
tmp = x * -3.0;
} else if (z <= -1.5e-299) {
tmp = y * 4.0;
} else if (z <= 8.5e-218) {
tmp = x * -3.0;
} else if (z <= 4e-70) {
tmp = y * 4.0;
} else if (z <= 1.3e-8) {
tmp = x * -3.0;
} else if (z <= 0.55) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) tmp = 0 if z <= -2.7e+187: tmp = -6.0 * (y * z) elif z <= -0.55: tmp = t_0 elif z <= -7.4e-174: tmp = y * 4.0 elif z <= -2.6e-246: tmp = x * -3.0 elif z <= -1.5e-299: tmp = y * 4.0 elif z <= 8.5e-218: tmp = x * -3.0 elif z <= 4e-70: tmp = y * 4.0 elif z <= 1.3e-8: tmp = x * -3.0 elif z <= 0.55: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -2.7e+187) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -0.55) tmp = t_0; elseif (z <= -7.4e-174) tmp = Float64(y * 4.0); elseif (z <= -2.6e-246) tmp = Float64(x * -3.0); elseif (z <= -1.5e-299) tmp = Float64(y * 4.0); elseif (z <= 8.5e-218) tmp = Float64(x * -3.0); elseif (z <= 4e-70) tmp = Float64(y * 4.0); elseif (z <= 1.3e-8) tmp = Float64(x * -3.0); elseif (z <= 0.55) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); tmp = 0.0; if (z <= -2.7e+187) tmp = -6.0 * (y * z); elseif (z <= -0.55) tmp = t_0; elseif (z <= -7.4e-174) tmp = y * 4.0; elseif (z <= -2.6e-246) tmp = x * -3.0; elseif (z <= -1.5e-299) tmp = y * 4.0; elseif (z <= 8.5e-218) tmp = x * -3.0; elseif (z <= 4e-70) tmp = y * 4.0; elseif (z <= 1.3e-8) tmp = x * -3.0; elseif (z <= 0.55) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+187], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.55], t$95$0, If[LessEqual[z, -7.4e-174], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.6e-246], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.5e-299], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.5e-218], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4e-70], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.3e-8], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.55], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+187}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -0.55:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-174}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-246}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-299}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-218}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-70}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.70000000000000008e187Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
add-cube-cbrt99.3%
associate-*r*99.3%
fma-def99.3%
pow299.3%
Applied egg-rr99.3%
Taylor expanded in z around inf 99.9%
pow-base-199.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 66.9%
*-commutative66.9%
Simplified66.9%
if -2.70000000000000008e187 < z < -0.55000000000000004 or 0.55000000000000004 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 98.7%
Taylor expanded in z around inf 95.8%
*-commutative95.8%
associate-*r*95.9%
*-commutative95.9%
associate-*l*95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in y around 0 67.7%
if -0.55000000000000004 < z < -7.40000000000000019e-174 or -2.5999999999999999e-246 < z < -1.49999999999999992e-299 or 8.5000000000000004e-218 < z < 3.99999999999999998e-70 or 1.3000000000000001e-8 < z < 0.55000000000000004Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.2%
Taylor expanded in x around 0 63.5%
if -7.40000000000000019e-174 < z < -2.5999999999999999e-246 or -1.49999999999999992e-299 < z < 8.5000000000000004e-218 or 3.99999999999999998e-70 < z < 1.3000000000000001e-8Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
neg-mul-177.7%
associate-*r*77.7%
*-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*77.7%
metadata-eval77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in z around 0 77.5%
Final simplification67.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))))
(if (<= z -2.75e+187)
(* z (* y -6.0))
(if (<= z -0.24)
t_0
(if (<= z -3.9e-177)
(* y 4.0)
(if (<= z -2.6e-246)
(* x -3.0)
(if (<= z -7.5e-301)
(* y 4.0)
(if (<= z 1.36e-220)
(* x -3.0)
(if (<= z 2.55e-70)
(* y 4.0)
(if (<= z 1.5e-12)
(* x -3.0)
(if (<= z 0.5) (* y 4.0) t_0)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -2.75e+187) {
tmp = z * (y * -6.0);
} else if (z <= -0.24) {
tmp = t_0;
} else if (z <= -3.9e-177) {
tmp = y * 4.0;
} else if (z <= -2.6e-246) {
tmp = x * -3.0;
} else if (z <= -7.5e-301) {
tmp = y * 4.0;
} else if (z <= 1.36e-220) {
tmp = x * -3.0;
} else if (z <= 2.55e-70) {
tmp = y * 4.0;
} else if (z <= 1.5e-12) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (x * z)
if (z <= (-2.75d+187)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-0.24d0)) then
tmp = t_0
else if (z <= (-3.9d-177)) then
tmp = y * 4.0d0
else if (z <= (-2.6d-246)) then
tmp = x * (-3.0d0)
else if (z <= (-7.5d-301)) then
tmp = y * 4.0d0
else if (z <= 1.36d-220) then
tmp = x * (-3.0d0)
else if (z <= 2.55d-70) then
tmp = y * 4.0d0
else if (z <= 1.5d-12) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -2.75e+187) {
tmp = z * (y * -6.0);
} else if (z <= -0.24) {
tmp = t_0;
} else if (z <= -3.9e-177) {
tmp = y * 4.0;
} else if (z <= -2.6e-246) {
tmp = x * -3.0;
} else if (z <= -7.5e-301) {
tmp = y * 4.0;
} else if (z <= 1.36e-220) {
tmp = x * -3.0;
} else if (z <= 2.55e-70) {
tmp = y * 4.0;
} else if (z <= 1.5e-12) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) tmp = 0 if z <= -2.75e+187: tmp = z * (y * -6.0) elif z <= -0.24: tmp = t_0 elif z <= -3.9e-177: tmp = y * 4.0 elif z <= -2.6e-246: tmp = x * -3.0 elif z <= -7.5e-301: tmp = y * 4.0 elif z <= 1.36e-220: tmp = x * -3.0 elif z <= 2.55e-70: tmp = y * 4.0 elif z <= 1.5e-12: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -2.75e+187) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -0.24) tmp = t_0; elseif (z <= -3.9e-177) tmp = Float64(y * 4.0); elseif (z <= -2.6e-246) tmp = Float64(x * -3.0); elseif (z <= -7.5e-301) tmp = Float64(y * 4.0); elseif (z <= 1.36e-220) tmp = Float64(x * -3.0); elseif (z <= 2.55e-70) tmp = Float64(y * 4.0); elseif (z <= 1.5e-12) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); tmp = 0.0; if (z <= -2.75e+187) tmp = z * (y * -6.0); elseif (z <= -0.24) tmp = t_0; elseif (z <= -3.9e-177) tmp = y * 4.0; elseif (z <= -2.6e-246) tmp = x * -3.0; elseif (z <= -7.5e-301) tmp = y * 4.0; elseif (z <= 1.36e-220) tmp = x * -3.0; elseif (z <= 2.55e-70) tmp = y * 4.0; elseif (z <= 1.5e-12) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.75e+187], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.24], t$95$0, If[LessEqual[z, -3.9e-177], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.6e-246], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7.5e-301], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.36e-220], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.55e-70], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.5e-12], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+187}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -0.24:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-177}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-246}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-301}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{-220}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-70}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-12}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.74999999999999999e187Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
add-cube-cbrt99.3%
associate-*r*99.3%
fma-def99.3%
pow299.3%
Applied egg-rr99.3%
Taylor expanded in z around inf 99.9%
pow-base-199.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 66.9%
associate-*r*66.9%
*-commutative66.9%
Simplified66.9%
if -2.74999999999999999e187 < z < -0.23999999999999999 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 98.7%
Taylor expanded in z around inf 95.8%
*-commutative95.8%
associate-*r*95.9%
*-commutative95.9%
associate-*l*95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in y around 0 67.7%
if -0.23999999999999999 < z < -3.90000000000000014e-177 or -2.5999999999999999e-246 < z < -7.5000000000000006e-301 or 1.3600000000000001e-220 < z < 2.55000000000000013e-70 or 1.5000000000000001e-12 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.2%
Taylor expanded in x around 0 63.5%
if -3.90000000000000014e-177 < z < -2.5999999999999999e-246 or -7.5000000000000006e-301 < z < 1.3600000000000001e-220 or 2.55000000000000013e-70 < z < 1.5000000000000001e-12Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
neg-mul-177.7%
associate-*r*77.7%
*-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*77.7%
metadata-eval77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in z around 0 77.5%
Final simplification67.9%
(FPCore (x y z)
:precision binary64
(if (<= z -4.1e+186)
(* z (* y -6.0))
(if (<= z -0.017)
(* 6.0 (* x z))
(if (<= z -6.2e-177)
(* y 4.0)
(if (<= z -2.45e-247)
(* x -3.0)
(if (<= z -9.5e-303)
(* y 4.0)
(if (<= z 4.5e-213)
(* x -3.0)
(if (<= z 2.46e-70)
(* y 4.0)
(if (<= z 8.5e-13)
(* x -3.0)
(if (<= z 0.56) (* y 4.0) (* z (* x 6.0))))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.1e+186) {
tmp = z * (y * -6.0);
} else if (z <= -0.017) {
tmp = 6.0 * (x * z);
} else if (z <= -6.2e-177) {
tmp = y * 4.0;
} else if (z <= -2.45e-247) {
tmp = x * -3.0;
} else if (z <= -9.5e-303) {
tmp = y * 4.0;
} else if (z <= 4.5e-213) {
tmp = x * -3.0;
} else if (z <= 2.46e-70) {
tmp = y * 4.0;
} else if (z <= 8.5e-13) {
tmp = x * -3.0;
} else if (z <= 0.56) {
tmp = y * 4.0;
} else {
tmp = z * (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 <= (-4.1d+186)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-0.017d0)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-6.2d-177)) then
tmp = y * 4.0d0
else if (z <= (-2.45d-247)) then
tmp = x * (-3.0d0)
else if (z <= (-9.5d-303)) then
tmp = y * 4.0d0
else if (z <= 4.5d-213) then
tmp = x * (-3.0d0)
else if (z <= 2.46d-70) then
tmp = y * 4.0d0
else if (z <= 8.5d-13) then
tmp = x * (-3.0d0)
else if (z <= 0.56d0) then
tmp = y * 4.0d0
else
tmp = z * (x * 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4.1e+186) {
tmp = z * (y * -6.0);
} else if (z <= -0.017) {
tmp = 6.0 * (x * z);
} else if (z <= -6.2e-177) {
tmp = y * 4.0;
} else if (z <= -2.45e-247) {
tmp = x * -3.0;
} else if (z <= -9.5e-303) {
tmp = y * 4.0;
} else if (z <= 4.5e-213) {
tmp = x * -3.0;
} else if (z <= 2.46e-70) {
tmp = y * 4.0;
} else if (z <= 8.5e-13) {
tmp = x * -3.0;
} else if (z <= 0.56) {
tmp = y * 4.0;
} else {
tmp = z * (x * 6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.1e+186: tmp = z * (y * -6.0) elif z <= -0.017: tmp = 6.0 * (x * z) elif z <= -6.2e-177: tmp = y * 4.0 elif z <= -2.45e-247: tmp = x * -3.0 elif z <= -9.5e-303: tmp = y * 4.0 elif z <= 4.5e-213: tmp = x * -3.0 elif z <= 2.46e-70: tmp = y * 4.0 elif z <= 8.5e-13: tmp = x * -3.0 elif z <= 0.56: tmp = y * 4.0 else: tmp = z * (x * 6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.1e+186) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -0.017) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -6.2e-177) tmp = Float64(y * 4.0); elseif (z <= -2.45e-247) tmp = Float64(x * -3.0); elseif (z <= -9.5e-303) tmp = Float64(y * 4.0); elseif (z <= 4.5e-213) tmp = Float64(x * -3.0); elseif (z <= 2.46e-70) tmp = Float64(y * 4.0); elseif (z <= 8.5e-13) tmp = Float64(x * -3.0); elseif (z <= 0.56) tmp = Float64(y * 4.0); else tmp = Float64(z * Float64(x * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.1e+186) tmp = z * (y * -6.0); elseif (z <= -0.017) tmp = 6.0 * (x * z); elseif (z <= -6.2e-177) tmp = y * 4.0; elseif (z <= -2.45e-247) tmp = x * -3.0; elseif (z <= -9.5e-303) tmp = y * 4.0; elseif (z <= 4.5e-213) tmp = x * -3.0; elseif (z <= 2.46e-70) tmp = y * 4.0; elseif (z <= 8.5e-13) tmp = x * -3.0; elseif (z <= 0.56) tmp = y * 4.0; else tmp = z * (x * 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.1e+186], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.017], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-177], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.45e-247], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -9.5e-303], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.5e-213], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.46e-70], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.5e-13], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.56], N[(y * 4.0), $MachinePrecision], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+186}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -0.017:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-177}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-247}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-303}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-213}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.46 \cdot 10^{-70}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-13}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.56:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\end{array}
\end{array}
if z < -4.1e186Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
add-cube-cbrt99.3%
associate-*r*99.3%
fma-def99.3%
pow299.3%
Applied egg-rr99.3%
Taylor expanded in z around inf 99.9%
pow-base-199.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 66.9%
associate-*r*66.9%
*-commutative66.9%
Simplified66.9%
if -4.1e186 < z < -0.017000000000000001Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.6%
Taylor expanded in z around inf 94.3%
*-commutative94.3%
associate-*r*94.3%
*-commutative94.3%
associate-*l*94.3%
*-commutative94.3%
Simplified94.3%
Taylor expanded in y around 0 66.2%
if -0.017000000000000001 < z < -6.20000000000000036e-177 or -2.45e-247 < z < -9.4999999999999999e-303 or 4.5000000000000001e-213 < z < 2.4600000000000001e-70 or 8.5000000000000001e-13 < z < 0.56000000000000005Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.2%
Taylor expanded in x around 0 63.5%
if -6.20000000000000036e-177 < z < -2.45e-247 or -9.4999999999999999e-303 < z < 4.5000000000000001e-213 or 2.4600000000000001e-70 < z < 8.5000000000000001e-13Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
neg-mul-177.7%
associate-*r*77.7%
*-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*77.7%
metadata-eval77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in z around 0 77.5%
if 0.56000000000000005 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
add-cube-cbrt98.9%
associate-*r*98.9%
fma-def98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in z around inf 99.1%
pow-base-199.1%
*-lft-identity99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in y around 0 69.0%
associate-*r*69.1%
*-commutative69.1%
*-commutative69.1%
Simplified69.1%
Final simplification67.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.0225)
t_0
(if (<= z -8e-177)
(* y 4.0)
(if (<= z -5.5e-248)
(* x -3.0)
(if (<= z 1.8e-303)
(* y 4.0)
(if (<= z 7e-215)
(* x -3.0)
(if (<= z 5.4e-68)
(* y 4.0)
(if (<= z 1.3e-8)
(* x -3.0)
(if (<= z 0.62) (* y 4.0) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.0225) {
tmp = t_0;
} else if (z <= -8e-177) {
tmp = y * 4.0;
} else if (z <= -5.5e-248) {
tmp = x * -3.0;
} else if (z <= 1.8e-303) {
tmp = y * 4.0;
} else if (z <= 7e-215) {
tmp = x * -3.0;
} else if (z <= 5.4e-68) {
tmp = y * 4.0;
} else if (z <= 1.3e-8) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.0225d0)) then
tmp = t_0
else if (z <= (-8d-177)) then
tmp = y * 4.0d0
else if (z <= (-5.5d-248)) then
tmp = x * (-3.0d0)
else if (z <= 1.8d-303) then
tmp = y * 4.0d0
else if (z <= 7d-215) then
tmp = x * (-3.0d0)
else if (z <= 5.4d-68) then
tmp = y * 4.0d0
else if (z <= 1.3d-8) then
tmp = x * (-3.0d0)
else if (z <= 0.62d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.0225) {
tmp = t_0;
} else if (z <= -8e-177) {
tmp = y * 4.0;
} else if (z <= -5.5e-248) {
tmp = x * -3.0;
} else if (z <= 1.8e-303) {
tmp = y * 4.0;
} else if (z <= 7e-215) {
tmp = x * -3.0;
} else if (z <= 5.4e-68) {
tmp = y * 4.0;
} else if (z <= 1.3e-8) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.0225: tmp = t_0 elif z <= -8e-177: tmp = y * 4.0 elif z <= -5.5e-248: tmp = x * -3.0 elif z <= 1.8e-303: tmp = y * 4.0 elif z <= 7e-215: tmp = x * -3.0 elif z <= 5.4e-68: tmp = y * 4.0 elif z <= 1.3e-8: tmp = x * -3.0 elif z <= 0.62: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.0225) tmp = t_0; elseif (z <= -8e-177) tmp = Float64(y * 4.0); elseif (z <= -5.5e-248) tmp = Float64(x * -3.0); elseif (z <= 1.8e-303) tmp = Float64(y * 4.0); elseif (z <= 7e-215) tmp = Float64(x * -3.0); elseif (z <= 5.4e-68) tmp = Float64(y * 4.0); elseif (z <= 1.3e-8) tmp = Float64(x * -3.0); elseif (z <= 0.62) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.0225) tmp = t_0; elseif (z <= -8e-177) tmp = y * 4.0; elseif (z <= -5.5e-248) tmp = x * -3.0; elseif (z <= 1.8e-303) tmp = y * 4.0; elseif (z <= 7e-215) tmp = x * -3.0; elseif (z <= 5.4e-68) tmp = y * 4.0; elseif (z <= 1.3e-8) tmp = x * -3.0; elseif (z <= 0.62) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0225], t$95$0, If[LessEqual[z, -8e-177], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -5.5e-248], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.8e-303], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7e-215], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.4e-68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.3e-8], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.62], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.0225:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-177}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-248}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-303}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-215}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-68}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.022499999999999999 or 0.619999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
add-cube-cbrt98.9%
associate-*r*98.9%
fma-def98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in z around inf 97.0%
pow-base-197.0%
*-lft-identity97.0%
*-commutative97.0%
Simplified97.0%
if -0.022499999999999999 < z < -7.99999999999999962e-177 or -5.49999999999999979e-248 < z < 1.7999999999999999e-303 or 7.0000000000000004e-215 < z < 5.4000000000000003e-68 or 1.3000000000000001e-8 < z < 0.619999999999999996Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.2%
Taylor expanded in x around 0 63.5%
if -7.99999999999999962e-177 < z < -5.49999999999999979e-248 or 1.7999999999999999e-303 < z < 7.0000000000000004e-215 or 5.4000000000000003e-68 < z < 1.3000000000000001e-8Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
neg-mul-177.7%
associate-*r*77.7%
*-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*77.7%
metadata-eval77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in z around 0 77.5%
Final simplification82.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z))))
(t_1 (* -6.0 (* (- y x) z))))
(if (<= z -500.0)
t_1
(if (<= z -1.45e-173)
t_0
(if (<= z -1.55e-247)
(* x -3.0)
(if (<= z 2.6e-308)
(* y 4.0)
(if (<= z 2.8e-218)
(* x -3.0)
(if (<= z 7.2e-69)
(* y 4.0)
(if (<= z 1.75e-13)
(* x -3.0)
(if (<= z 6800.0) t_0 t_1))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -500.0) {
tmp = t_1;
} else if (z <= -1.45e-173) {
tmp = t_0;
} else if (z <= -1.55e-247) {
tmp = x * -3.0;
} else if (z <= 2.6e-308) {
tmp = y * 4.0;
} else if (z <= 2.8e-218) {
tmp = x * -3.0;
} else if (z <= 7.2e-69) {
tmp = y * 4.0;
} else if (z <= 1.75e-13) {
tmp = x * -3.0;
} else if (z <= 6800.0) {
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 * (0.6666666666666666d0 - z))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-500.0d0)) then
tmp = t_1
else if (z <= (-1.45d-173)) then
tmp = t_0
else if (z <= (-1.55d-247)) then
tmp = x * (-3.0d0)
else if (z <= 2.6d-308) then
tmp = y * 4.0d0
else if (z <= 2.8d-218) then
tmp = x * (-3.0d0)
else if (z <= 7.2d-69) then
tmp = y * 4.0d0
else if (z <= 1.75d-13) then
tmp = x * (-3.0d0)
else if (z <= 6800.0d0) 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 * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -500.0) {
tmp = t_1;
} else if (z <= -1.45e-173) {
tmp = t_0;
} else if (z <= -1.55e-247) {
tmp = x * -3.0;
} else if (z <= 2.6e-308) {
tmp = y * 4.0;
} else if (z <= 2.8e-218) {
tmp = x * -3.0;
} else if (z <= 7.2e-69) {
tmp = y * 4.0;
} else if (z <= 1.75e-13) {
tmp = x * -3.0;
} else if (z <= 6800.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -500.0: tmp = t_1 elif z <= -1.45e-173: tmp = t_0 elif z <= -1.55e-247: tmp = x * -3.0 elif z <= 2.6e-308: tmp = y * 4.0 elif z <= 2.8e-218: tmp = x * -3.0 elif z <= 7.2e-69: tmp = y * 4.0 elif z <= 1.75e-13: tmp = x * -3.0 elif z <= 6800.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -500.0) tmp = t_1; elseif (z <= -1.45e-173) tmp = t_0; elseif (z <= -1.55e-247) tmp = Float64(x * -3.0); elseif (z <= 2.6e-308) tmp = Float64(y * 4.0); elseif (z <= 2.8e-218) tmp = Float64(x * -3.0); elseif (z <= 7.2e-69) tmp = Float64(y * 4.0); elseif (z <= 1.75e-13) tmp = Float64(x * -3.0); elseif (z <= 6800.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -500.0) tmp = t_1; elseif (z <= -1.45e-173) tmp = t_0; elseif (z <= -1.55e-247) tmp = x * -3.0; elseif (z <= 2.6e-308) tmp = y * 4.0; elseif (z <= 2.8e-218) tmp = x * -3.0; elseif (z <= 7.2e-69) tmp = y * 4.0; elseif (z <= 1.75e-13) tmp = x * -3.0; elseif (z <= 6800.0) 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 * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -500.0], t$95$1, If[LessEqual[z, -1.45e-173], t$95$0, If[LessEqual[z, -1.55e-247], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.6e-308], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.8e-218], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.2e-69], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.75e-13], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6800.0], t$95$0, t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -500:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-173}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-247}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-308}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-218}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-69}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-13}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6800:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -500 or 6800 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
add-cube-cbrt98.9%
associate-*r*98.9%
fma-def98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in z around inf 98.1%
pow-base-198.1%
*-lft-identity98.1%
*-commutative98.1%
Simplified98.1%
if -500 < z < -1.4499999999999999e-173 or 1.7500000000000001e-13 < z < 6800Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
flip-+53.2%
div-inv53.0%
pow253.0%
associate-*l*53.1%
associate-*l*53.2%
Applied egg-rr53.2%
Taylor expanded in x around 0 62.5%
if -1.4499999999999999e-173 < z < -1.55000000000000008e-247 or 2.6e-308 < z < 2.80000000000000009e-218 or 7.20000000000000035e-69 < z < 1.7500000000000001e-13Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
neg-mul-177.7%
associate-*r*77.7%
*-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*77.7%
metadata-eval77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in z around 0 77.5%
if -1.55000000000000008e-247 < z < 2.6e-308 or 2.80000000000000009e-218 < z < 7.20000000000000035e-69Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 68.0%
Final simplification83.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.66)
t_0
(if (<= z -1.45e-174)
(* y 4.0)
(if (<= z -3e-247)
(* x -3.0)
(if (<= z -1.95e-307)
(* y 4.0)
(if (<= z 3.9e-218)
(* x -3.0)
(if (<= z 1.85e-70)
(* y 4.0)
(if (<= z 1.5e-10)
(* x -3.0)
(if (<= z 0.66) (* y 4.0) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -0.66) {
tmp = t_0;
} else if (z <= -1.45e-174) {
tmp = y * 4.0;
} else if (z <= -3e-247) {
tmp = x * -3.0;
} else if (z <= -1.95e-307) {
tmp = y * 4.0;
} else if (z <= 3.9e-218) {
tmp = x * -3.0;
} else if (z <= 1.85e-70) {
tmp = y * 4.0;
} else if (z <= 1.5e-10) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-0.66d0)) then
tmp = t_0
else if (z <= (-1.45d-174)) then
tmp = y * 4.0d0
else if (z <= (-3d-247)) then
tmp = x * (-3.0d0)
else if (z <= (-1.95d-307)) then
tmp = y * 4.0d0
else if (z <= 3.9d-218) then
tmp = x * (-3.0d0)
else if (z <= 1.85d-70) then
tmp = y * 4.0d0
else if (z <= 1.5d-10) then
tmp = x * (-3.0d0)
else if (z <= 0.66d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -0.66) {
tmp = t_0;
} else if (z <= -1.45e-174) {
tmp = y * 4.0;
} else if (z <= -3e-247) {
tmp = x * -3.0;
} else if (z <= -1.95e-307) {
tmp = y * 4.0;
} else if (z <= 3.9e-218) {
tmp = x * -3.0;
} else if (z <= 1.85e-70) {
tmp = y * 4.0;
} else if (z <= 1.5e-10) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -0.66: tmp = t_0 elif z <= -1.45e-174: tmp = y * 4.0 elif z <= -3e-247: tmp = x * -3.0 elif z <= -1.95e-307: tmp = y * 4.0 elif z <= 3.9e-218: tmp = x * -3.0 elif z <= 1.85e-70: tmp = y * 4.0 elif z <= 1.5e-10: tmp = x * -3.0 elif z <= 0.66: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -0.66) tmp = t_0; elseif (z <= -1.45e-174) tmp = Float64(y * 4.0); elseif (z <= -3e-247) tmp = Float64(x * -3.0); elseif (z <= -1.95e-307) tmp = Float64(y * 4.0); elseif (z <= 3.9e-218) tmp = Float64(x * -3.0); elseif (z <= 1.85e-70) tmp = Float64(y * 4.0); elseif (z <= 1.5e-10) tmp = Float64(x * -3.0); elseif (z <= 0.66) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -0.66) tmp = t_0; elseif (z <= -1.45e-174) tmp = y * 4.0; elseif (z <= -3e-247) tmp = x * -3.0; elseif (z <= -1.95e-307) tmp = y * 4.0; elseif (z <= 3.9e-218) tmp = x * -3.0; elseif (z <= 1.85e-70) tmp = y * 4.0; elseif (z <= 1.5e-10) tmp = x * -3.0; elseif (z <= 0.66) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.66], t$95$0, If[LessEqual[z, -1.45e-174], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3e-247], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.95e-307], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.9e-218], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.85e-70], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.5e-10], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -0.66:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-174}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-247}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-307}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-218}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-70}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-10}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.660000000000000031 or 0.660000000000000031 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
add-cube-cbrt98.9%
associate-*r*98.9%
fma-def98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in z around inf 97.0%
pow-base-197.0%
*-lft-identity97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in y around inf 40.1%
*-commutative40.1%
Simplified40.1%
if -0.660000000000000031 < z < -1.45000000000000005e-174 or -2.9999999999999997e-247 < z < -1.95e-307 or 3.9e-218 < z < 1.85e-70 or 1.5e-10 < z < 0.660000000000000031Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.2%
Taylor expanded in x around 0 63.5%
if -1.45000000000000005e-174 < z < -2.9999999999999997e-247 or -1.95e-307 < z < 3.9e-218 or 1.85e-70 < z < 1.5e-10Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
neg-mul-177.7%
associate-*r*77.7%
*-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*77.7%
metadata-eval77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in z around 0 77.5%
Final simplification54.4%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* -6.0 (* (- y x) z)) (if (<= z 0.52) (+ x (* (- y x) 4.0)) (+ x (* z (* (- y x) -6.0))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.52) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + (z * ((y - x) * -6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.55d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.52d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = x + (z * ((y - x) * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.52) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + (z * ((y - x) * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = -6.0 * ((y - x) * z) elif z <= 0.52: tmp = x + ((y - x) * 4.0) else: tmp = x + (z * ((y - x) * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.52) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.52) tmp = x + ((y - x) * 4.0); else tmp = x + (z * ((y - x) * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.52], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
add-cube-cbrt98.9%
associate-*r*98.9%
fma-def98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in z around inf 95.6%
pow-base-195.6%
*-lft-identity95.6%
*-commutative95.6%
Simplified95.6%
if -0.55000000000000004 < z < 0.52000000000000002Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 98.0%
if 0.52000000000000002 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.1%
associate-*r*99.2%
*-commutative99.2%
associate-*l*99.2%
Simplified99.2%
Final simplification97.5%
(FPCore (x y z) :precision binary64 (if (<= z -0.58) (* -6.0 (* (- y x) z)) (if (<= z 0.62) (+ x (* (- y x) 4.0)) (+ x (* (- y x) (* z -6.0))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.58) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.62) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + ((y - 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) :: tmp
if (z <= (-0.58d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.62d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = x + ((y - x) * (z * (-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 = -6.0 * ((y - x) * z);
} else if (z <= 0.62) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + ((y - x) * (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.58: tmp = -6.0 * ((y - x) * z) elif z <= 0.62: tmp = x + ((y - x) * 4.0) else: tmp = x + ((y - x) * (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.58) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.62) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(x + Float64(Float64(y - x) * Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.58) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.62) tmp = x + ((y - x) * 4.0); else tmp = x + ((y - x) * (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.58], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.62], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.57999999999999996Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
add-cube-cbrt98.9%
associate-*r*98.9%
fma-def98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in z around inf 95.6%
pow-base-195.6%
*-lft-identity95.6%
*-commutative95.6%
Simplified95.6%
if -0.57999999999999996 < z < 0.619999999999999996Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 98.0%
if 0.619999999999999996 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.1%
associate-*r*99.2%
*-commutative99.2%
*-commutative99.2%
*-commutative99.2%
Simplified99.2%
Final simplification97.5%
(FPCore (x y z) :precision binary64 (if (or (<= y -5.2e+94) (not (<= y 1.7e+32))) (* 6.0 (* y (- 0.6666666666666666 z))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -5.2e+94) || !(y <= 1.7e+32)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-5.2d+94)) .or. (.not. (y <= 1.7d+32))) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -5.2e+94) || !(y <= 1.7e+32)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -5.2e+94) or not (y <= 1.7e+32): tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -5.2e+94) || !(y <= 1.7e+32)) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -5.2e+94) || ~((y <= 1.7e+32))) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -5.2e+94], N[Not[LessEqual[y, 1.7e+32]], $MachinePrecision]], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+94} \lor \neg \left(y \leq 1.7 \cdot 10^{+32}\right):\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -5.1999999999999998e94 or 1.69999999999999989e32 < y Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+19.6%
div-inv19.5%
pow219.5%
associate-*l*19.5%
associate-*l*19.6%
Applied egg-rr19.6%
Taylor expanded in x around 0 84.6%
if -5.1999999999999998e94 < y < 1.69999999999999989e32Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 79.4%
sub-neg79.4%
distribute-rgt-in79.4%
metadata-eval79.4%
neg-mul-179.4%
associate-*r*79.4%
*-commutative79.4%
associate-+r+79.5%
metadata-eval79.5%
associate-*r*79.5%
metadata-eval79.5%
*-commutative79.5%
Simplified79.5%
Final simplification81.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -5.3e+94) (not (<= y 6e+31))) (* y (+ 4.0 (* z -6.0))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -5.3e+94) || !(y <= 6e+31)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-5.3d+94)) .or. (.not. (y <= 6d+31))) then
tmp = y * (4.0d0 + (z * (-6.0d0)))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -5.3e+94) || !(y <= 6e+31)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -5.3e+94) or not (y <= 6e+31): tmp = y * (4.0 + (z * -6.0)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -5.3e+94) || !(y <= 6e+31)) tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -5.3e+94) || ~((y <= 6e+31))) tmp = y * (4.0 + (z * -6.0)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -5.3e+94], N[Not[LessEqual[y, 6e+31]], $MachinePrecision]], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{+94} \lor \neg \left(y \leq 6 \cdot 10^{+31}\right):\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -5.30000000000000003e94 or 5.99999999999999978e31 < y Initial program 99.7%
+-commutative99.7%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 84.8%
if -5.30000000000000003e94 < y < 5.99999999999999978e31Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 79.4%
sub-neg79.4%
distribute-rgt-in79.4%
metadata-eval79.4%
neg-mul-179.4%
associate-*r*79.4%
*-commutative79.4%
associate-+r+79.5%
metadata-eval79.5%
associate-*r*79.5%
metadata-eval79.5%
*-commutative79.5%
Simplified79.5%
Final simplification81.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.5))) (* -6.0 (* (- y x) z)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.5)) {
tmp = -6.0 * ((y - x) * z);
} 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.5d0))) then
tmp = (-6.0d0) * ((y - x) * z)
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.5)) {
tmp = -6.0 * ((y - x) * z);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.5): tmp = -6.0 * ((y - x) * z) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.5)) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); 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.5))) tmp = -6.0 * ((y - x) * z); 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.5]], $MachinePrecision]], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $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.5\right):\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
add-cube-cbrt98.9%
associate-*r*98.9%
fma-def98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in z around inf 97.0%
pow-base-197.0%
*-lft-identity97.0%
*-commutative97.0%
Simplified97.0%
if -0.57999999999999996 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 98.0%
Final simplification97.5%
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (<= y -5.2e-46) (* y 4.0) (if (<= y 1.26e-25) (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -5.2e-46) {
tmp = y * 4.0;
} else if (y <= 1.26e-25) {
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 (y <= (-5.2d-46)) then
tmp = y * 4.0d0
else if (y <= 1.26d-25) 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 (y <= -5.2e-46) {
tmp = y * 4.0;
} else if (y <= 1.26e-25) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -5.2e-46: tmp = y * 4.0 elif y <= 1.26e-25: tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -5.2e-46) tmp = Float64(y * 4.0); elseif (y <= 1.26e-25) 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 (y <= -5.2e-46) tmp = y * 4.0; elseif (y <= 1.26e-25) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -5.2e-46], N[(y * 4.0), $MachinePrecision], If[LessEqual[y, 1.26e-25], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-46}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{-25}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if y < -5.2000000000000004e-46 or 1.26e-25 < y Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 53.6%
Taylor expanded in x around 0 43.7%
if -5.2000000000000004e-46 < y < 1.26e-25Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 86.7%
sub-neg86.7%
distribute-rgt-in86.7%
metadata-eval86.7%
neg-mul-186.7%
associate-*r*86.7%
*-commutative86.7%
associate-+r+86.7%
metadata-eval86.7%
associate-*r*86.7%
metadata-eval86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in z around 0 43.1%
Final simplification43.4%
(FPCore (x y z) :precision binary64 (* y 4.0))
double code(double x, double y, double z) {
return y * 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 = y * 4.0d0
end function
public static double code(double x, double y, double z) {
return y * 4.0;
}
def code(x, y, z): return y * 4.0
function code(x, y, z) return Float64(y * 4.0) end
function tmp = code(x, y, z) tmp = y * 4.0; end
code[x_, y_, z_] := N[(y * 4.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 4
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 51.9%
Taylor expanded in x around 0 27.0%
Final simplification27.0%
(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 z around inf 49.2%
associate-*r*49.2%
*-commutative49.2%
associate-*l*49.2%
Simplified49.2%
Taylor expanded in z around 0 2.8%
Final simplification2.8%
herbie shell --seed 2023293
(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))))