
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (+ x (+ (* -6.0 (* z (- y x))) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + ((-6.0 * (z * (y - x))) + ((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) * (z * (y - x))) + ((y - x) * 4.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0));
}
def code(x, y, z): return x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0))
function code(x, y, z) return Float64(x + Float64(Float64(-6.0 * Float64(z * Float64(y - x))) + Float64(Float64(y - x) * 4.0))) end
function tmp = code(x, y, z) tmp = x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0)); end
code[x_, y_, z_] := N[(x + N[(N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-6 \cdot \left(z \cdot \left(y - x\right)\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
(let* ((t_0 (* 6.0 (* x z))) (t_1 (* -6.0 (* z y))))
(if (<= z -5e+203)
t_0
(if (<= z -2.15e+170)
t_1
(if (<= z -2.3e+66)
t_0
(if (<= z -3.8e-14)
t_1
(if (<= z -9e-84)
(* x -3.0)
(if (<= z 4.4e-213)
(* y 4.0)
(if (<= z 0.5) (* x -3.0) (if (<= z 3.4e+52) t_1 t_0))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (z * y);
double tmp;
if (z <= -5e+203) {
tmp = t_0;
} else if (z <= -2.15e+170) {
tmp = t_1;
} else if (z <= -2.3e+66) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = t_1;
} else if (z <= -9e-84) {
tmp = x * -3.0;
} else if (z <= 4.4e-213) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 3.4e+52) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * (x * z)
t_1 = (-6.0d0) * (z * y)
if (z <= (-5d+203)) then
tmp = t_0
else if (z <= (-2.15d+170)) then
tmp = t_1
else if (z <= (-2.3d+66)) then
tmp = t_0
else if (z <= (-3.8d-14)) then
tmp = t_1
else if (z <= (-9d-84)) then
tmp = x * (-3.0d0)
else if (z <= 4.4d-213) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 3.4d+52) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (z * y);
double tmp;
if (z <= -5e+203) {
tmp = t_0;
} else if (z <= -2.15e+170) {
tmp = t_1;
} else if (z <= -2.3e+66) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = t_1;
} else if (z <= -9e-84) {
tmp = x * -3.0;
} else if (z <= 4.4e-213) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 3.4e+52) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) t_1 = -6.0 * (z * y) tmp = 0 if z <= -5e+203: tmp = t_0 elif z <= -2.15e+170: tmp = t_1 elif z <= -2.3e+66: tmp = t_0 elif z <= -3.8e-14: tmp = t_1 elif z <= -9e-84: tmp = x * -3.0 elif z <= 4.4e-213: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 elif z <= 3.4e+52: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) t_1 = Float64(-6.0 * Float64(z * y)) tmp = 0.0 if (z <= -5e+203) tmp = t_0; elseif (z <= -2.15e+170) tmp = t_1; elseif (z <= -2.3e+66) tmp = t_0; elseif (z <= -3.8e-14) tmp = t_1; elseif (z <= -9e-84) tmp = Float64(x * -3.0); elseif (z <= 4.4e-213) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 3.4e+52) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); t_1 = -6.0 * (z * y); tmp = 0.0; if (z <= -5e+203) tmp = t_0; elseif (z <= -2.15e+170) tmp = t_1; elseif (z <= -2.3e+66) tmp = t_0; elseif (z <= -3.8e-14) tmp = t_1; elseif (z <= -9e-84) tmp = x * -3.0; elseif (z <= 4.4e-213) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 3.4e+52) tmp = t_1; 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]}, Block[{t$95$1 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+203], t$95$0, If[LessEqual[z, -2.15e+170], t$95$1, If[LessEqual[z, -2.3e+66], t$95$0, If[LessEqual[z, -3.8e-14], t$95$1, If[LessEqual[z, -9e-84], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.4e-213], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.4e+52], t$95$1, t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
t_1 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{+203}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+66}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-84}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-213}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -4.99999999999999994e203 or -2.1499999999999999e170 < z < -2.3e66 or 3.4e52 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 63.8%
if -4.99999999999999994e203 < z < -2.1499999999999999e170 or -2.3e66 < z < -3.8000000000000002e-14 or 0.5 < z < 3.4e52Initial program 99.6%
+-commutative99.6%
associate-*l*99.4%
fma-define99.4%
sub-neg99.4%
distribute-rgt-in99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-out99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 82.6%
Taylor expanded in z around inf 65.8%
if -3.8000000000000002e-14 < z < -9.00000000000000031e-84 or 4.40000000000000019e-213 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.8%
sub-neg66.8%
distribute-rgt-in66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
associate-+r+66.8%
metadata-eval66.8%
distribute-rgt-neg-in66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -9.00000000000000031e-84 < z < 4.40000000000000019e-213Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-define99.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 56.4%
Taylor expanded in z around 0 56.4%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))) (t_1 (* -6.0 (* z y))))
(if (<= z -5.5e+203)
t_0
(if (<= z -1.66e+170)
t_1
(if (<= z -4.3e+64)
t_0
(if (<= z -3.8e-14)
t_1
(if (<= z -7.8e-79)
(* x -3.0)
(if (<= z 1.02e-212)
(* y 4.0)
(if (<= z 0.5)
(* x -3.0)
(if (<= z 5.8e+52) t_1 (* 6.0 (* x z))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double t_1 = -6.0 * (z * y);
double tmp;
if (z <= -5.5e+203) {
tmp = t_0;
} else if (z <= -1.66e+170) {
tmp = t_1;
} else if (z <= -4.3e+64) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = t_1;
} else if (z <= -7.8e-79) {
tmp = x * -3.0;
} else if (z <= 1.02e-212) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 5.8e+52) {
tmp = t_1;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * (z * 6.0d0)
t_1 = (-6.0d0) * (z * y)
if (z <= (-5.5d+203)) then
tmp = t_0
else if (z <= (-1.66d+170)) then
tmp = t_1
else if (z <= (-4.3d+64)) then
tmp = t_0
else if (z <= (-3.8d-14)) then
tmp = t_1
else if (z <= (-7.8d-79)) then
tmp = x * (-3.0d0)
else if (z <= 1.02d-212) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 5.8d+52) then
tmp = t_1
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double t_1 = -6.0 * (z * y);
double tmp;
if (z <= -5.5e+203) {
tmp = t_0;
} else if (z <= -1.66e+170) {
tmp = t_1;
} else if (z <= -4.3e+64) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = t_1;
} else if (z <= -7.8e-79) {
tmp = x * -3.0;
} else if (z <= 1.02e-212) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 5.8e+52) {
tmp = t_1;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) t_1 = -6.0 * (z * y) tmp = 0 if z <= -5.5e+203: tmp = t_0 elif z <= -1.66e+170: tmp = t_1 elif z <= -4.3e+64: tmp = t_0 elif z <= -3.8e-14: tmp = t_1 elif z <= -7.8e-79: tmp = x * -3.0 elif z <= 1.02e-212: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 elif z <= 5.8e+52: tmp = t_1 else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) t_1 = Float64(-6.0 * Float64(z * y)) tmp = 0.0 if (z <= -5.5e+203) tmp = t_0; elseif (z <= -1.66e+170) tmp = t_1; elseif (z <= -4.3e+64) tmp = t_0; elseif (z <= -3.8e-14) tmp = t_1; elseif (z <= -7.8e-79) tmp = Float64(x * -3.0); elseif (z <= 1.02e-212) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 5.8e+52) tmp = t_1; else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); t_1 = -6.0 * (z * y); tmp = 0.0; if (z <= -5.5e+203) tmp = t_0; elseif (z <= -1.66e+170) tmp = t_1; elseif (z <= -4.3e+64) tmp = t_0; elseif (z <= -3.8e-14) tmp = t_1; elseif (z <= -7.8e-79) tmp = x * -3.0; elseif (z <= 1.02e-212) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 5.8e+52) tmp = t_1; else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+203], t$95$0, If[LessEqual[z, -1.66e+170], t$95$1, If[LessEqual[z, -4.3e+64], t$95$0, If[LessEqual[z, -3.8e-14], t$95$1, If[LessEqual[z, -7.8e-79], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.02e-212], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.8e+52], t$95$1, N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
t_1 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+203}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.66 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{+64}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-79}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-212}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -5.50000000000000029e203 or -1.6600000000000001e170 < z < -4.2999999999999998e64Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 68.2%
sub-neg68.2%
distribute-rgt-in68.2%
metadata-eval68.2%
distribute-lft-neg-in68.2%
associate-+r+68.2%
metadata-eval68.2%
distribute-rgt-neg-in68.2%
metadata-eval68.2%
Simplified68.2%
Taylor expanded in z around inf 68.2%
if -5.50000000000000029e203 < z < -1.6600000000000001e170 or -4.2999999999999998e64 < z < -3.8000000000000002e-14 or 0.5 < z < 5.8e52Initial program 99.6%
+-commutative99.6%
associate-*l*99.4%
fma-define99.4%
sub-neg99.4%
distribute-rgt-in99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-out99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 82.6%
Taylor expanded in z around inf 65.8%
if -3.8000000000000002e-14 < z < -7.80000000000000011e-79 or 1.0199999999999999e-212 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.8%
sub-neg66.8%
distribute-rgt-in66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
associate-+r+66.8%
metadata-eval66.8%
distribute-rgt-neg-in66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -7.80000000000000011e-79 < z < 1.0199999999999999e-212Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-define99.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 56.4%
Taylor expanded in z around 0 56.4%
if 5.8e52 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 59.2%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))) (t_1 (* -6.0 (* z y))))
(if (<= z -1.75e+200)
t_0
(if (<= z -1.2e+170)
(* y (* -6.0 z))
(if (<= z -6.3e+63)
t_0
(if (<= z -3.8e-14)
t_1
(if (<= z -2.15e-83)
(* x -3.0)
(if (<= z 3.2e-212)
(* y 4.0)
(if (<= z 0.5)
(* x -3.0)
(if (<= z 5e+52) t_1 (* 6.0 (* x z))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double t_1 = -6.0 * (z * y);
double tmp;
if (z <= -1.75e+200) {
tmp = t_0;
} else if (z <= -1.2e+170) {
tmp = y * (-6.0 * z);
} else if (z <= -6.3e+63) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = t_1;
} else if (z <= -2.15e-83) {
tmp = x * -3.0;
} else if (z <= 3.2e-212) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 5e+52) {
tmp = t_1;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * (z * 6.0d0)
t_1 = (-6.0d0) * (z * y)
if (z <= (-1.75d+200)) then
tmp = t_0
else if (z <= (-1.2d+170)) then
tmp = y * ((-6.0d0) * z)
else if (z <= (-6.3d+63)) then
tmp = t_0
else if (z <= (-3.8d-14)) then
tmp = t_1
else if (z <= (-2.15d-83)) then
tmp = x * (-3.0d0)
else if (z <= 3.2d-212) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 5d+52) then
tmp = t_1
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double t_1 = -6.0 * (z * y);
double tmp;
if (z <= -1.75e+200) {
tmp = t_0;
} else if (z <= -1.2e+170) {
tmp = y * (-6.0 * z);
} else if (z <= -6.3e+63) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = t_1;
} else if (z <= -2.15e-83) {
tmp = x * -3.0;
} else if (z <= 3.2e-212) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 5e+52) {
tmp = t_1;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) t_1 = -6.0 * (z * y) tmp = 0 if z <= -1.75e+200: tmp = t_0 elif z <= -1.2e+170: tmp = y * (-6.0 * z) elif z <= -6.3e+63: tmp = t_0 elif z <= -3.8e-14: tmp = t_1 elif z <= -2.15e-83: tmp = x * -3.0 elif z <= 3.2e-212: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 elif z <= 5e+52: tmp = t_1 else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) t_1 = Float64(-6.0 * Float64(z * y)) tmp = 0.0 if (z <= -1.75e+200) tmp = t_0; elseif (z <= -1.2e+170) tmp = Float64(y * Float64(-6.0 * z)); elseif (z <= -6.3e+63) tmp = t_0; elseif (z <= -3.8e-14) tmp = t_1; elseif (z <= -2.15e-83) tmp = Float64(x * -3.0); elseif (z <= 3.2e-212) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 5e+52) tmp = t_1; else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); t_1 = -6.0 * (z * y); tmp = 0.0; if (z <= -1.75e+200) tmp = t_0; elseif (z <= -1.2e+170) tmp = y * (-6.0 * z); elseif (z <= -6.3e+63) tmp = t_0; elseif (z <= -3.8e-14) tmp = t_1; elseif (z <= -2.15e-83) tmp = x * -3.0; elseif (z <= 3.2e-212) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 5e+52) tmp = t_1; else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+200], t$95$0, If[LessEqual[z, -1.2e+170], N[(y * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.3e+63], t$95$0, If[LessEqual[z, -3.8e-14], t$95$1, If[LessEqual[z, -2.15e-83], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.2e-212], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5e+52], t$95$1, N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
t_1 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+200}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{+170}:\\
\;\;\;\;y \cdot \left(-6 \cdot z\right)\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{+63}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-83}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-212}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -1.75000000000000003e200 or -1.2e170 < z < -6.2999999999999998e63Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 68.2%
sub-neg68.2%
distribute-rgt-in68.2%
metadata-eval68.2%
distribute-lft-neg-in68.2%
associate-+r+68.2%
metadata-eval68.2%
distribute-rgt-neg-in68.2%
metadata-eval68.2%
Simplified68.2%
Taylor expanded in z around inf 68.2%
if -1.75000000000000003e200 < z < -1.2e170Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in z around inf 99.5%
associate-*r*99.7%
*-commutative99.7%
associate-*r*99.7%
Simplified99.7%
if -6.2999999999999998e63 < z < -3.8000000000000002e-14 or 0.5 < z < 5e52Initial program 99.5%
+-commutative99.5%
associate-*l*99.3%
fma-define99.3%
sub-neg99.3%
distribute-rgt-in99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-out99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 79.2%
Taylor expanded in z around inf 59.1%
if -3.8000000000000002e-14 < z < -2.15000000000000017e-83 or 3.1999999999999999e-212 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.8%
sub-neg66.8%
distribute-rgt-in66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
associate-+r+66.8%
metadata-eval66.8%
distribute-rgt-neg-in66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -2.15000000000000017e-83 < z < 3.1999999999999999e-212Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-define99.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 56.4%
Taylor expanded in z around 0 56.4%
if 5e52 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 59.2%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -4.6e+201)
t_0
(if (<= z -3e+169)
(* y (* -6.0 z))
(if (<= z -1.05e+62)
t_0
(if (<= z -3.8e-14)
(* z (* -6.0 y))
(if (<= z -6e-82)
(* x -3.0)
(if (<= z 1.05e-213)
(* y 4.0)
(if (<= z 0.68)
(* x -3.0)
(if (<= z 7.8e+51) (* -6.0 (* z y)) (* 6.0 (* x z))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -4.6e+201) {
tmp = t_0;
} else if (z <= -3e+169) {
tmp = y * (-6.0 * z);
} else if (z <= -1.05e+62) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = z * (-6.0 * y);
} else if (z <= -6e-82) {
tmp = x * -3.0;
} else if (z <= 1.05e-213) {
tmp = y * 4.0;
} else if (z <= 0.68) {
tmp = x * -3.0;
} else if (z <= 7.8e+51) {
tmp = -6.0 * (z * y);
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (z * 6.0d0)
if (z <= (-4.6d+201)) then
tmp = t_0
else if (z <= (-3d+169)) then
tmp = y * ((-6.0d0) * z)
else if (z <= (-1.05d+62)) then
tmp = t_0
else if (z <= (-3.8d-14)) then
tmp = z * ((-6.0d0) * y)
else if (z <= (-6d-82)) then
tmp = x * (-3.0d0)
else if (z <= 1.05d-213) then
tmp = y * 4.0d0
else if (z <= 0.68d0) then
tmp = x * (-3.0d0)
else if (z <= 7.8d+51) then
tmp = (-6.0d0) * (z * y)
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -4.6e+201) {
tmp = t_0;
} else if (z <= -3e+169) {
tmp = y * (-6.0 * z);
} else if (z <= -1.05e+62) {
tmp = t_0;
} else if (z <= -3.8e-14) {
tmp = z * (-6.0 * y);
} else if (z <= -6e-82) {
tmp = x * -3.0;
} else if (z <= 1.05e-213) {
tmp = y * 4.0;
} else if (z <= 0.68) {
tmp = x * -3.0;
} else if (z <= 7.8e+51) {
tmp = -6.0 * (z * y);
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -4.6e+201: tmp = t_0 elif z <= -3e+169: tmp = y * (-6.0 * z) elif z <= -1.05e+62: tmp = t_0 elif z <= -3.8e-14: tmp = z * (-6.0 * y) elif z <= -6e-82: tmp = x * -3.0 elif z <= 1.05e-213: tmp = y * 4.0 elif z <= 0.68: tmp = x * -3.0 elif z <= 7.8e+51: tmp = -6.0 * (z * y) else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -4.6e+201) tmp = t_0; elseif (z <= -3e+169) tmp = Float64(y * Float64(-6.0 * z)); elseif (z <= -1.05e+62) tmp = t_0; elseif (z <= -3.8e-14) tmp = Float64(z * Float64(-6.0 * y)); elseif (z <= -6e-82) tmp = Float64(x * -3.0); elseif (z <= 1.05e-213) tmp = Float64(y * 4.0); elseif (z <= 0.68) tmp = Float64(x * -3.0); elseif (z <= 7.8e+51) tmp = Float64(-6.0 * Float64(z * y)); else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -4.6e+201) tmp = t_0; elseif (z <= -3e+169) tmp = y * (-6.0 * z); elseif (z <= -1.05e+62) tmp = t_0; elseif (z <= -3.8e-14) tmp = z * (-6.0 * y); elseif (z <= -6e-82) tmp = x * -3.0; elseif (z <= 1.05e-213) tmp = y * 4.0; elseif (z <= 0.68) tmp = x * -3.0; elseif (z <= 7.8e+51) tmp = -6.0 * (z * y); else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+201], t$95$0, If[LessEqual[z, -3e+169], N[(y * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e+62], t$95$0, If[LessEqual[z, -3.8e-14], N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6e-82], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e-213], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.8e+51], N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+201}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+169}:\\
\;\;\;\;y \cdot \left(-6 \cdot z\right)\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+62}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-14}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-82}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-213}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+51}:\\
\;\;\;\;-6 \cdot \left(z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -4.6000000000000002e201 or -3e169 < z < -1.05e62Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 68.2%
sub-neg68.2%
distribute-rgt-in68.2%
metadata-eval68.2%
distribute-lft-neg-in68.2%
associate-+r+68.2%
metadata-eval68.2%
distribute-rgt-neg-in68.2%
metadata-eval68.2%
Simplified68.2%
Taylor expanded in z around inf 68.2%
if -4.6000000000000002e201 < z < -3e169Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in z around inf 99.5%
associate-*r*99.7%
*-commutative99.7%
associate-*r*99.7%
Simplified99.7%
if -1.05e62 < z < -3.8000000000000002e-14Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in y around inf 56.8%
associate-*r*56.8%
Simplified56.8%
if -3.8000000000000002e-14 < z < -5.9999999999999998e-82 or 1.0499999999999999e-213 < z < 0.680000000000000049Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.8%
sub-neg66.8%
distribute-rgt-in66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
associate-+r+66.8%
metadata-eval66.8%
distribute-rgt-neg-in66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -5.9999999999999998e-82 < z < 1.0499999999999999e-213Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-define99.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 56.4%
Taylor expanded in z around 0 56.4%
if 0.680000000000000049 < z < 7.79999999999999968e51Initial program 99.7%
+-commutative99.7%
associate-*l*99.5%
fma-define99.5%
sub-neg99.5%
distribute-rgt-in99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-out99.5%
distribute-rgt-neg-in99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 78.2%
Taylor expanded in z around inf 64.5%
if 7.79999999999999968e51 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 59.2%
Final simplification62.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z (- y x)))))
(if (<= z -4000000.0)
t_0
(if (<= z -2e-15)
(* 6.0 (* y (- 0.6666666666666666 z)))
(if (<= z -1.75e-81)
(* x -3.0)
(if (<= z 3.7e-213) (* 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 * (z * (y - x));
double tmp;
if (z <= -4000000.0) {
tmp = t_0;
} else if (z <= -2e-15) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else if (z <= -1.75e-81) {
tmp = x * -3.0;
} else if (z <= 3.7e-213) {
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) * (z * (y - x))
if (z <= (-4000000.0d0)) then
tmp = t_0
else if (z <= (-2d-15)) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else if (z <= (-1.75d-81)) then
tmp = x * (-3.0d0)
else if (z <= 3.7d-213) 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 * (z * (y - x));
double tmp;
if (z <= -4000000.0) {
tmp = t_0;
} else if (z <= -2e-15) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else if (z <= -1.75e-81) {
tmp = x * -3.0;
} else if (z <= 3.7e-213) {
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 * (z * (y - x)) tmp = 0 if z <= -4000000.0: tmp = t_0 elif z <= -2e-15: tmp = 6.0 * (y * (0.6666666666666666 - z)) elif z <= -1.75e-81: tmp = x * -3.0 elif z <= 3.7e-213: 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(z * Float64(y - x))) tmp = 0.0 if (z <= -4000000.0) tmp = t_0; elseif (z <= -2e-15) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); elseif (z <= -1.75e-81) tmp = Float64(x * -3.0); elseif (z <= 3.7e-213) 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 * (z * (y - x)); tmp = 0.0; if (z <= -4000000.0) tmp = t_0; elseif (z <= -2e-15) tmp = 6.0 * (y * (0.6666666666666666 - z)); elseif (z <= -1.75e-81) tmp = x * -3.0; elseif (z <= 3.7e-213) 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[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4000000.0], t$95$0, If[LessEqual[z, -2e-15], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-81], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.7e-213], 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(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -4000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-15}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-81}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-213}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -4e6 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 98.0%
if -4e6 < z < -2.0000000000000002e-15Initial program 99.0%
metadata-eval99.0%
Simplified99.0%
+-commutative99.0%
*-commutative99.0%
associate-*r*99.2%
fma-define99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 99.2%
if -2.0000000000000002e-15 < z < -1.74999999999999993e-81 or 3.70000000000000003e-213 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.8%
sub-neg66.8%
distribute-rgt-in66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
associate-+r+66.8%
metadata-eval66.8%
distribute-rgt-neg-in66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -1.74999999999999993e-81 < z < 3.70000000000000003e-213Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-define99.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 56.4%
Taylor expanded in z around 0 56.4%
Final simplification78.9%
(FPCore (x y z)
:precision binary64
(if (or (<= y -9e+14)
(not (or (<= y 0.0096) (and (not (<= y 1.4e+26)) (<= y 1.7e+58)))))
(* 6.0 (* y (- 0.6666666666666666 z)))
(* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -9e+14) || !((y <= 0.0096) || (!(y <= 1.4e+26) && (y <= 1.7e+58)))) {
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 <= (-9d+14)) .or. (.not. (y <= 0.0096d0) .or. (.not. (y <= 1.4d+26)) .and. (y <= 1.7d+58))) 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 <= -9e+14) || !((y <= 0.0096) || (!(y <= 1.4e+26) && (y <= 1.7e+58)))) {
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 <= -9e+14) or not ((y <= 0.0096) or (not (y <= 1.4e+26) and (y <= 1.7e+58))): 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 <= -9e+14) || !((y <= 0.0096) || (!(y <= 1.4e+26) && (y <= 1.7e+58)))) 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 <= -9e+14) || ~(((y <= 0.0096) || (~((y <= 1.4e+26)) && (y <= 1.7e+58))))) 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, -9e+14], N[Not[Or[LessEqual[y, 0.0096], And[N[Not[LessEqual[y, 1.4e+26]], $MachinePrecision], LessEqual[y, 1.7e+58]]]], $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 -9 \cdot 10^{+14} \lor \neg \left(y \leq 0.0096 \lor \neg \left(y \leq 1.4 \cdot 10^{+26}\right) \land y \leq 1.7 \cdot 10^{+58}\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 < -9e14 or 0.00959999999999999916 < y < 1.4e26 or 1.7e58 < y Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 78.8%
if -9e14 < y < 0.00959999999999999916 or 1.4e26 < y < 1.7e58Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 80.5%
sub-neg80.5%
distribute-rgt-in80.5%
metadata-eval80.5%
distribute-lft-neg-in80.5%
associate-+r+80.5%
metadata-eval80.5%
distribute-rgt-neg-in80.5%
metadata-eval80.5%
Simplified80.5%
Final simplification79.6%
(FPCore (x y z)
:precision binary64
(if (or (<= y -7200000000000.0)
(not (or (<= y 0.014) (and (not (<= y 1.3e+26)) (<= y 4.2e+58)))))
(* y (+ 4.0 (* -6.0 z)))
(* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -7200000000000.0) || !((y <= 0.014) || (!(y <= 1.3e+26) && (y <= 4.2e+58)))) {
tmp = y * (4.0 + (-6.0 * 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 <= (-7200000000000.0d0)) .or. (.not. (y <= 0.014d0) .or. (.not. (y <= 1.3d+26)) .and. (y <= 4.2d+58))) then
tmp = y * (4.0d0 + ((-6.0d0) * 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 <= -7200000000000.0) || !((y <= 0.014) || (!(y <= 1.3e+26) && (y <= 4.2e+58)))) {
tmp = y * (4.0 + (-6.0 * z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -7200000000000.0) or not ((y <= 0.014) or (not (y <= 1.3e+26) and (y <= 4.2e+58))): tmp = y * (4.0 + (-6.0 * z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -7200000000000.0) || !((y <= 0.014) || (!(y <= 1.3e+26) && (y <= 4.2e+58)))) tmp = Float64(y * Float64(4.0 + Float64(-6.0 * 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 <= -7200000000000.0) || ~(((y <= 0.014) || (~((y <= 1.3e+26)) && (y <= 4.2e+58))))) tmp = y * (4.0 + (-6.0 * z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -7200000000000.0], N[Not[Or[LessEqual[y, 0.014], And[N[Not[LessEqual[y, 1.3e+26]], $MachinePrecision], LessEqual[y, 4.2e+58]]]], $MachinePrecision]], N[(y * N[(4.0 + N[(-6.0 * 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 -7200000000000 \lor \neg \left(y \leq 0.014 \lor \neg \left(y \leq 1.3 \cdot 10^{+26}\right) \land y \leq 4.2 \cdot 10^{+58}\right):\\
\;\;\;\;y \cdot \left(4 + -6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -7.2e12 or 0.0140000000000000003 < y < 1.30000000000000001e26 or 4.20000000000000024e58 < y Initial program 99.7%
+-commutative99.7%
associate-*l*99.9%
fma-define99.9%
sub-neg99.9%
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 78.9%
if -7.2e12 < y < 0.0140000000000000003 or 1.30000000000000001e26 < y < 4.20000000000000024e58Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 80.5%
sub-neg80.5%
distribute-rgt-in80.5%
metadata-eval80.5%
distribute-lft-neg-in80.5%
associate-+r+80.5%
metadata-eval80.5%
distribute-rgt-neg-in80.5%
metadata-eval80.5%
Simplified80.5%
Final simplification79.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z (- y x)))))
(if (<= z -3.8e-14)
t_0
(if (<= z -1.25e-77)
(* x -3.0)
(if (<= z 1.65e-212) (* 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 * (z * (y - x));
double tmp;
if (z <= -3.8e-14) {
tmp = t_0;
} else if (z <= -1.25e-77) {
tmp = x * -3.0;
} else if (z <= 1.65e-212) {
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) * (z * (y - x))
if (z <= (-3.8d-14)) then
tmp = t_0
else if (z <= (-1.25d-77)) then
tmp = x * (-3.0d0)
else if (z <= 1.65d-212) 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 * (z * (y - x));
double tmp;
if (z <= -3.8e-14) {
tmp = t_0;
} else if (z <= -1.25e-77) {
tmp = x * -3.0;
} else if (z <= 1.65e-212) {
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 * (z * (y - x)) tmp = 0 if z <= -3.8e-14: tmp = t_0 elif z <= -1.25e-77: tmp = x * -3.0 elif z <= 1.65e-212: 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(z * Float64(y - x))) tmp = 0.0 if (z <= -3.8e-14) tmp = t_0; elseif (z <= -1.25e-77) tmp = Float64(x * -3.0); elseif (z <= 1.65e-212) 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 * (z * (y - x)); tmp = 0.0; if (z <= -3.8e-14) tmp = t_0; elseif (z <= -1.25e-77) tmp = x * -3.0; elseif (z <= 1.65e-212) 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[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e-14], t$95$0, If[LessEqual[z, -1.25e-77], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.65e-212], 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(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-77}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-212}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.8000000000000002e-14 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 94.2%
if -3.8000000000000002e-14 < z < -1.24999999999999991e-77 or 1.6500000000000001e-212 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.8%
sub-neg66.8%
distribute-rgt-in66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
associate-+r+66.8%
metadata-eval66.8%
distribute-rgt-neg-in66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -1.24999999999999991e-77 < z < 1.6500000000000001e-212Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-define99.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 56.4%
Taylor expanded in z around 0 56.4%
Final simplification77.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))))
(if (<= z -3.8e-14)
t_0
(if (<= z -2.35e-83)
(* x -3.0)
(if (<= z 7.2e-213) (* y 4.0) (if (<= z 0.65) (* x -3.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double tmp;
if (z <= -3.8e-14) {
tmp = t_0;
} else if (z <= -2.35e-83) {
tmp = x * -3.0;
} else if (z <= 7.2e-213) {
tmp = y * 4.0;
} else if (z <= 0.65) {
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) * (z * y)
if (z <= (-3.8d-14)) then
tmp = t_0
else if (z <= (-2.35d-83)) then
tmp = x * (-3.0d0)
else if (z <= 7.2d-213) then
tmp = y * 4.0d0
else if (z <= 0.65d0) 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 * (z * y);
double tmp;
if (z <= -3.8e-14) {
tmp = t_0;
} else if (z <= -2.35e-83) {
tmp = x * -3.0;
} else if (z <= 7.2e-213) {
tmp = y * 4.0;
} else if (z <= 0.65) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) tmp = 0 if z <= -3.8e-14: tmp = t_0 elif z <= -2.35e-83: tmp = x * -3.0 elif z <= 7.2e-213: tmp = y * 4.0 elif z <= 0.65: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) tmp = 0.0 if (z <= -3.8e-14) tmp = t_0; elseif (z <= -2.35e-83) tmp = Float64(x * -3.0); elseif (z <= 7.2e-213) tmp = Float64(y * 4.0); elseif (z <= 0.65) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); tmp = 0.0; if (z <= -3.8e-14) tmp = t_0; elseif (z <= -2.35e-83) tmp = x * -3.0; elseif (z <= 7.2e-213) tmp = y * 4.0; elseif (z <= 0.65) 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[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e-14], t$95$0, If[LessEqual[z, -2.35e-83], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.2e-213], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-83}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-213}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.8000000000000002e-14 or 0.650000000000000022 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 53.7%
Taylor expanded in z around inf 48.9%
if -3.8000000000000002e-14 < z < -2.3500000000000002e-83 or 7.2000000000000002e-213 < z < 0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.8%
sub-neg66.8%
distribute-rgt-in66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
associate-+r+66.8%
metadata-eval66.8%
distribute-rgt-neg-in66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in z around 0 66.6%
*-commutative66.6%
Simplified66.6%
if -2.3500000000000002e-83 < z < 7.2000000000000002e-213Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-define99.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 56.4%
Taylor expanded in z around 0 56.4%
Final simplification54.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.6) (not (<= z 0.5))) (* z (* -6.0 (- y x))) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.5)) {
tmp = z * (-6.0 * (y - x));
} 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.6d0)) .or. (.not. (z <= 0.5d0))) then
tmp = z * ((-6.0d0) * (y - x))
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.6) || !(z <= 0.5)) {
tmp = z * (-6.0 * (y - x));
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.6) or not (z <= 0.5): tmp = z * (-6.0 * (y - x)) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.6) || !(z <= 0.5)) tmp = Float64(z * Float64(-6.0 * Float64(y - x))); 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.6) || ~((z <= 0.5))) tmp = z * (-6.0 * (y - x)); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.6], N[Not[LessEqual[z, 0.5]], $MachinePrecision]], N[(z * N[(-6.0 * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6 \lor \neg \left(z \leq 0.5\right):\\
\;\;\;\;z \cdot \left(-6 \cdot \left(y - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.599999999999999978 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 96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*r*97.0%
Simplified97.0%
if -0.599999999999999978 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 98.5%
Final simplification97.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -4.6e+45) (not (<= x 6.5e-126))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -4.6e+45) || !(x <= 6.5e-126)) {
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 <= (-4.6d+45)) .or. (.not. (x <= 6.5d-126))) 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 <= -4.6e+45) || !(x <= 6.5e-126)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -4.6e+45) or not (x <= 6.5e-126): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -4.6e+45) || !(x <= 6.5e-126)) 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 <= -4.6e+45) || ~((x <= 6.5e-126))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -4.6e+45], N[Not[LessEqual[x, 6.5e-126]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+45} \lor \neg \left(x \leq 6.5 \cdot 10^{-126}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -4.60000000000000025e45 or 6.50000000000000014e-126 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 71.1%
sub-neg71.1%
distribute-rgt-in71.1%
metadata-eval71.1%
distribute-lft-neg-in71.1%
associate-+r+71.1%
metadata-eval71.1%
distribute-rgt-neg-in71.1%
metadata-eval71.1%
Simplified71.1%
Taylor expanded in z around 0 37.0%
*-commutative37.0%
Simplified37.0%
if -4.60000000000000025e45 < x < 6.50000000000000014e-126Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 77.1%
Taylor expanded in z around 0 44.5%
Final simplification40.0%
(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 (* 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.3%
sub-neg52.3%
distribute-rgt-in52.3%
metadata-eval52.3%
distribute-lft-neg-in52.3%
associate-+r+52.3%
metadata-eval52.3%
distribute-rgt-neg-in52.3%
metadata-eval52.3%
Simplified52.3%
Taylor expanded in z around 0 28.9%
*-commutative28.9%
Simplified28.9%
Final simplification28.9%
herbie shell --seed 2024089
(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))))