
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)
\end{array}
Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
(FPCore (x y z) :precision binary64 (fma (* (- y x) (- 0.6666666666666666 z)) 6.0 x))
double code(double x, double y, double z) {
return fma(((y - x) * (0.6666666666666666 - z)), 6.0, x);
}
function code(x, y, z) return fma(Float64(Float64(y - x) * Float64(0.6666666666666666 - z)), 6.0, x) end
code[x_, y_, z_] := N[(N[(N[(y - x), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision] * 6.0 + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(y - x\right) \cdot \left(0.6666666666666666 - z\right), 6, x\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.6%
fma-define99.5%
Applied egg-rr99.5%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -2.9e+264)
t_0
(if (<= z -6.4e+177)
(* -6.0 (* y z))
(if (<= z -0.092)
t_0
(if (<= z -5e-97)
(* y 4.0)
(if (<= z -3.2e-130)
(* x -3.0)
(if (<= z -2.5e-257)
(* y 4.0)
(if (<= z 1.4e-121)
(* x -3.0)
(if (<= z 0.64)
(* y 4.0)
(if (<= z 3e+163) t_0 (* z (* y -6.0)))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -2.9e+264) {
tmp = t_0;
} else if (z <= -6.4e+177) {
tmp = -6.0 * (y * z);
} else if (z <= -0.092) {
tmp = t_0;
} else if (z <= -5e-97) {
tmp = y * 4.0;
} else if (z <= -3.2e-130) {
tmp = x * -3.0;
} else if (z <= -2.5e-257) {
tmp = y * 4.0;
} else if (z <= 1.4e-121) {
tmp = x * -3.0;
} else if (z <= 0.64) {
tmp = y * 4.0;
} else if (z <= 3e+163) {
tmp = t_0;
} else {
tmp = z * (y * -6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (z * 6.0d0)
if (z <= (-2.9d+264)) then
tmp = t_0
else if (z <= (-6.4d+177)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-0.092d0)) then
tmp = t_0
else if (z <= (-5d-97)) then
tmp = y * 4.0d0
else if (z <= (-3.2d-130)) then
tmp = x * (-3.0d0)
else if (z <= (-2.5d-257)) then
tmp = y * 4.0d0
else if (z <= 1.4d-121) then
tmp = x * (-3.0d0)
else if (z <= 0.64d0) then
tmp = y * 4.0d0
else if (z <= 3d+163) then
tmp = t_0
else
tmp = z * (y * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -2.9e+264) {
tmp = t_0;
} else if (z <= -6.4e+177) {
tmp = -6.0 * (y * z);
} else if (z <= -0.092) {
tmp = t_0;
} else if (z <= -5e-97) {
tmp = y * 4.0;
} else if (z <= -3.2e-130) {
tmp = x * -3.0;
} else if (z <= -2.5e-257) {
tmp = y * 4.0;
} else if (z <= 1.4e-121) {
tmp = x * -3.0;
} else if (z <= 0.64) {
tmp = y * 4.0;
} else if (z <= 3e+163) {
tmp = t_0;
} else {
tmp = z * (y * -6.0);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -2.9e+264: tmp = t_0 elif z <= -6.4e+177: tmp = -6.0 * (y * z) elif z <= -0.092: tmp = t_0 elif z <= -5e-97: tmp = y * 4.0 elif z <= -3.2e-130: tmp = x * -3.0 elif z <= -2.5e-257: tmp = y * 4.0 elif z <= 1.4e-121: tmp = x * -3.0 elif z <= 0.64: tmp = y * 4.0 elif z <= 3e+163: tmp = t_0 else: tmp = z * (y * -6.0) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -2.9e+264) tmp = t_0; elseif (z <= -6.4e+177) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -0.092) tmp = t_0; elseif (z <= -5e-97) tmp = Float64(y * 4.0); elseif (z <= -3.2e-130) tmp = Float64(x * -3.0); elseif (z <= -2.5e-257) tmp = Float64(y * 4.0); elseif (z <= 1.4e-121) tmp = Float64(x * -3.0); elseif (z <= 0.64) tmp = Float64(y * 4.0); elseif (z <= 3e+163) tmp = t_0; else tmp = Float64(z * Float64(y * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -2.9e+264) tmp = t_0; elseif (z <= -6.4e+177) tmp = -6.0 * (y * z); elseif (z <= -0.092) tmp = t_0; elseif (z <= -5e-97) tmp = y * 4.0; elseif (z <= -3.2e-130) tmp = x * -3.0; elseif (z <= -2.5e-257) tmp = y * 4.0; elseif (z <= 1.4e-121) tmp = x * -3.0; elseif (z <= 0.64) tmp = y * 4.0; elseif (z <= 3e+163) tmp = t_0; else tmp = z * (y * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+264], t$95$0, If[LessEqual[z, -6.4e+177], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.092], t$95$0, If[LessEqual[z, -5e-97], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.2e-130], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.5e-257], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-121], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.64], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3e+163], t$95$0, N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+264}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{+177}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -0.092:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-97}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-130}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-257}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-121}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.64:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+163}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\end{array}
\end{array}
if z < -2.8999999999999998e264 or -6.4e177 < z < -0.091999999999999998 or 0.640000000000000013 < z < 3.00000000000000013e163Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 66.1%
sub-neg66.1%
distribute-rgt-in66.1%
metadata-eval66.1%
distribute-lft-neg-in66.1%
associate-+r+66.1%
metadata-eval66.1%
distribute-rgt-neg-in66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in z around inf 62.0%
*-commutative62.0%
associate-*r*62.0%
Simplified62.0%
if -2.8999999999999998e264 < z < -6.4e177Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 71.3%
Taylor expanded in z around inf 71.3%
if -0.091999999999999998 < z < -4.9999999999999995e-97 or -3.2e-130 < z < -2.49999999999999994e-257 or 1.4000000000000001e-121 < z < 0.640000000000000013Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
+-commutative99.3%
*-commutative99.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 68.6%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if -4.9999999999999995e-97 < z < -3.2e-130 or -2.49999999999999994e-257 < z < 1.4000000000000001e-121Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 74.2%
sub-neg74.2%
distribute-rgt-in74.2%
metadata-eval74.2%
distribute-lft-neg-in74.2%
associate-+r+74.2%
metadata-eval74.2%
distribute-rgt-neg-in74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
Simplified74.2%
if 3.00000000000000013e163 < 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%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 65.6%
associate-*r*65.6%
Simplified65.6%
Final simplification66.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -5.4e+264)
t_0
(if (<= z -3.6e+177)
(* -6.0 (* y z))
(if (<= z -0.078)
t_0
(if (<= z -6.6e-97)
(* y 4.0)
(if (<= z -2.9e-130)
(* x -3.0)
(if (<= z -3.5e-262)
(* y 4.0)
(if (<= z 4.2e-121)
(* x -3.0)
(if (<= z 0.52)
(* y 4.0)
(if (<= z 8e+163) t_0 (* z (* y -6.0)))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -5.4e+264) {
tmp = t_0;
} else if (z <= -3.6e+177) {
tmp = -6.0 * (y * z);
} else if (z <= -0.078) {
tmp = t_0;
} else if (z <= -6.6e-97) {
tmp = y * 4.0;
} else if (z <= -2.9e-130) {
tmp = x * -3.0;
} else if (z <= -3.5e-262) {
tmp = y * 4.0;
} else if (z <= 4.2e-121) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = y * 4.0;
} else if (z <= 8e+163) {
tmp = t_0;
} else {
tmp = z * (y * -6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (z * 6.0d0)
if (z <= (-5.4d+264)) then
tmp = t_0
else if (z <= (-3.6d+177)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-0.078d0)) then
tmp = t_0
else if (z <= (-6.6d-97)) then
tmp = y * 4.0d0
else if (z <= (-2.9d-130)) then
tmp = x * (-3.0d0)
else if (z <= (-3.5d-262)) then
tmp = y * 4.0d0
else if (z <= 4.2d-121) then
tmp = x * (-3.0d0)
else if (z <= 0.52d0) then
tmp = y * 4.0d0
else if (z <= 8d+163) then
tmp = t_0
else
tmp = z * (y * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -5.4e+264) {
tmp = t_0;
} else if (z <= -3.6e+177) {
tmp = -6.0 * (y * z);
} else if (z <= -0.078) {
tmp = t_0;
} else if (z <= -6.6e-97) {
tmp = y * 4.0;
} else if (z <= -2.9e-130) {
tmp = x * -3.0;
} else if (z <= -3.5e-262) {
tmp = y * 4.0;
} else if (z <= 4.2e-121) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = y * 4.0;
} else if (z <= 8e+163) {
tmp = t_0;
} else {
tmp = z * (y * -6.0);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -5.4e+264: tmp = t_0 elif z <= -3.6e+177: tmp = -6.0 * (y * z) elif z <= -0.078: tmp = t_0 elif z <= -6.6e-97: tmp = y * 4.0 elif z <= -2.9e-130: tmp = x * -3.0 elif z <= -3.5e-262: tmp = y * 4.0 elif z <= 4.2e-121: tmp = x * -3.0 elif z <= 0.52: tmp = y * 4.0 elif z <= 8e+163: tmp = t_0 else: tmp = z * (y * -6.0) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -5.4e+264) tmp = t_0; elseif (z <= -3.6e+177) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -0.078) tmp = t_0; elseif (z <= -6.6e-97) tmp = Float64(y * 4.0); elseif (z <= -2.9e-130) tmp = Float64(x * -3.0); elseif (z <= -3.5e-262) tmp = Float64(y * 4.0); elseif (z <= 4.2e-121) tmp = Float64(x * -3.0); elseif (z <= 0.52) tmp = Float64(y * 4.0); elseif (z <= 8e+163) tmp = t_0; else tmp = Float64(z * Float64(y * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -5.4e+264) tmp = t_0; elseif (z <= -3.6e+177) tmp = -6.0 * (y * z); elseif (z <= -0.078) tmp = t_0; elseif (z <= -6.6e-97) tmp = y * 4.0; elseif (z <= -2.9e-130) tmp = x * -3.0; elseif (z <= -3.5e-262) tmp = y * 4.0; elseif (z <= 4.2e-121) tmp = x * -3.0; elseif (z <= 0.52) tmp = y * 4.0; elseif (z <= 8e+163) tmp = t_0; else tmp = z * (y * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+264], t$95$0, If[LessEqual[z, -3.6e+177], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.078], t$95$0, If[LessEqual[z, -6.6e-97], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.9e-130], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -3.5e-262], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.2e-121], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.52], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8e+163], t$95$0, N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+264}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+177}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -0.078:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-97}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-130}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-262}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-121}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+163}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\end{array}
\end{array}
if z < -5.4000000000000004e264 or -3.60000000000000003e177 < z < -0.0779999999999999999 or 0.52000000000000002 < z < 7.9999999999999995e163Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 66.1%
sub-neg66.1%
distribute-rgt-in66.1%
metadata-eval66.1%
distribute-lft-neg-in66.1%
associate-+r+66.1%
metadata-eval66.1%
distribute-rgt-neg-in66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in z around inf 62.0%
*-commutative62.0%
associate-*r*62.0%
Simplified62.0%
if -5.4000000000000004e264 < z < -3.60000000000000003e177Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 71.3%
Taylor expanded in z around inf 71.3%
if -0.0779999999999999999 < z < -6.6000000000000002e-97 or -2.9e-130 < z < -3.50000000000000011e-262 or 4.1999999999999997e-121 < z < 0.52000000000000002Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
+-commutative99.3%
*-commutative99.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 68.6%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if -6.6000000000000002e-97 < z < -2.9e-130 or -3.50000000000000011e-262 < z < 4.1999999999999997e-121Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 74.2%
sub-neg74.2%
distribute-rgt-in74.2%
metadata-eval74.2%
distribute-lft-neg-in74.2%
associate-+r+74.2%
metadata-eval74.2%
distribute-rgt-neg-in74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
Simplified74.2%
if 7.9999999999999995e163 < 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 y around inf 65.6%
Taylor expanded in z around inf 65.6%
*-commutative65.6%
*-commutative65.6%
associate-*r*65.6%
Simplified65.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))) (t_1 (* -6.0 (* y z))))
(if (<= z -3.75e+264)
t_0
(if (<= z -1.6e+180)
t_1
(if (<= z -0.098)
t_0
(if (<= z -4.3e-97)
(* y 4.0)
(if (<= z -4.1e-130)
(* x -3.0)
(if (<= z -2.8e-258)
(* y 4.0)
(if (<= z 3.5e-121)
(* x -3.0)
(if (<= z 0.58)
(* y 4.0)
(if (<= z 2.2e+163) t_0 t_1)))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -3.75e+264) {
tmp = t_0;
} else if (z <= -1.6e+180) {
tmp = t_1;
} else if (z <= -0.098) {
tmp = t_0;
} else if (z <= -4.3e-97) {
tmp = y * 4.0;
} else if (z <= -4.1e-130) {
tmp = x * -3.0;
} else if (z <= -2.8e-258) {
tmp = y * 4.0;
} else if (z <= 3.5e-121) {
tmp = x * -3.0;
} else if (z <= 0.58) {
tmp = y * 4.0;
} else if (z <= 2.2e+163) {
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 = x * (z * 6.0d0)
t_1 = (-6.0d0) * (y * z)
if (z <= (-3.75d+264)) then
tmp = t_0
else if (z <= (-1.6d+180)) then
tmp = t_1
else if (z <= (-0.098d0)) then
tmp = t_0
else if (z <= (-4.3d-97)) then
tmp = y * 4.0d0
else if (z <= (-4.1d-130)) then
tmp = x * (-3.0d0)
else if (z <= (-2.8d-258)) then
tmp = y * 4.0d0
else if (z <= 3.5d-121) then
tmp = x * (-3.0d0)
else if (z <= 0.58d0) then
tmp = y * 4.0d0
else if (z <= 2.2d+163) 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 = x * (z * 6.0);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -3.75e+264) {
tmp = t_0;
} else if (z <= -1.6e+180) {
tmp = t_1;
} else if (z <= -0.098) {
tmp = t_0;
} else if (z <= -4.3e-97) {
tmp = y * 4.0;
} else if (z <= -4.1e-130) {
tmp = x * -3.0;
} else if (z <= -2.8e-258) {
tmp = y * 4.0;
} else if (z <= 3.5e-121) {
tmp = x * -3.0;
} else if (z <= 0.58) {
tmp = y * 4.0;
} else if (z <= 2.2e+163) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) t_1 = -6.0 * (y * z) tmp = 0 if z <= -3.75e+264: tmp = t_0 elif z <= -1.6e+180: tmp = t_1 elif z <= -0.098: tmp = t_0 elif z <= -4.3e-97: tmp = y * 4.0 elif z <= -4.1e-130: tmp = x * -3.0 elif z <= -2.8e-258: tmp = y * 4.0 elif z <= 3.5e-121: tmp = x * -3.0 elif z <= 0.58: tmp = y * 4.0 elif z <= 2.2e+163: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -3.75e+264) tmp = t_0; elseif (z <= -1.6e+180) tmp = t_1; elseif (z <= -0.098) tmp = t_0; elseif (z <= -4.3e-97) tmp = Float64(y * 4.0); elseif (z <= -4.1e-130) tmp = Float64(x * -3.0); elseif (z <= -2.8e-258) tmp = Float64(y * 4.0); elseif (z <= 3.5e-121) tmp = Float64(x * -3.0); elseif (z <= 0.58) tmp = Float64(y * 4.0); elseif (z <= 2.2e+163) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -3.75e+264) tmp = t_0; elseif (z <= -1.6e+180) tmp = t_1; elseif (z <= -0.098) tmp = t_0; elseif (z <= -4.3e-97) tmp = y * 4.0; elseif (z <= -4.1e-130) tmp = x * -3.0; elseif (z <= -2.8e-258) tmp = y * 4.0; elseif (z <= 3.5e-121) tmp = x * -3.0; elseif (z <= 0.58) tmp = y * 4.0; elseif (z <= 2.2e+163) tmp = t_0; else tmp = t_1; 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[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.75e+264], t$95$0, If[LessEqual[z, -1.6e+180], t$95$1, If[LessEqual[z, -0.098], t$95$0, If[LessEqual[z, -4.3e-97], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -4.1e-130], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.8e-258], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.5e-121], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.58], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.2e+163], t$95$0, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -3.75 \cdot 10^{+264}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{+180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -0.098:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-97}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-130}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-258}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-121}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+163}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.75000000000000003e264 or -1.59999999999999997e180 < z < -0.098000000000000004 or 0.57999999999999996 < z < 2.19999999999999986e163Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 66.1%
sub-neg66.1%
distribute-rgt-in66.1%
metadata-eval66.1%
distribute-lft-neg-in66.1%
associate-+r+66.1%
metadata-eval66.1%
distribute-rgt-neg-in66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in z around inf 62.0%
*-commutative62.0%
associate-*r*62.0%
Simplified62.0%
if -3.75000000000000003e264 < z < -1.59999999999999997e180 or 2.19999999999999986e163 < 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 y around inf 67.9%
Taylor expanded in z around inf 67.9%
if -0.098000000000000004 < z < -4.3e-97 or -4.09999999999999979e-130 < z < -2.8000000000000002e-258 or 3.49999999999999993e-121 < z < 0.57999999999999996Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
+-commutative99.3%
*-commutative99.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 68.6%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if -4.3e-97 < z < -4.09999999999999979e-130 or -2.8000000000000002e-258 < z < 3.49999999999999993e-121Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 74.2%
sub-neg74.2%
distribute-rgt-in74.2%
metadata-eval74.2%
distribute-lft-neg-in74.2%
associate-+r+74.2%
metadata-eval74.2%
distribute-rgt-neg-in74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
Simplified74.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))) (t_1 (* -6.0 (* y z))))
(if (<= z -7.4e+265)
t_0
(if (<= z -1.05e+179)
t_1
(if (<= z -0.047)
t_0
(if (<= z -3.7e-97)
(* y 4.0)
(if (<= z -1.42e-129)
(* x -3.0)
(if (<= z -8e-259)
(* y 4.0)
(if (<= z 3.6e-121)
(* x -3.0)
(if (<= z 0.52)
(* y 4.0)
(if (<= z 8.6e+163) t_0 t_1)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -7.4e+265) {
tmp = t_0;
} else if (z <= -1.05e+179) {
tmp = t_1;
} else if (z <= -0.047) {
tmp = t_0;
} else if (z <= -3.7e-97) {
tmp = y * 4.0;
} else if (z <= -1.42e-129) {
tmp = x * -3.0;
} else if (z <= -8e-259) {
tmp = y * 4.0;
} else if (z <= 3.6e-121) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = y * 4.0;
} else if (z <= 8.6e+163) {
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 * (x * z)
t_1 = (-6.0d0) * (y * z)
if (z <= (-7.4d+265)) then
tmp = t_0
else if (z <= (-1.05d+179)) then
tmp = t_1
else if (z <= (-0.047d0)) then
tmp = t_0
else if (z <= (-3.7d-97)) then
tmp = y * 4.0d0
else if (z <= (-1.42d-129)) then
tmp = x * (-3.0d0)
else if (z <= (-8d-259)) then
tmp = y * 4.0d0
else if (z <= 3.6d-121) then
tmp = x * (-3.0d0)
else if (z <= 0.52d0) then
tmp = y * 4.0d0
else if (z <= 8.6d+163) 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 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -7.4e+265) {
tmp = t_0;
} else if (z <= -1.05e+179) {
tmp = t_1;
} else if (z <= -0.047) {
tmp = t_0;
} else if (z <= -3.7e-97) {
tmp = y * 4.0;
} else if (z <= -1.42e-129) {
tmp = x * -3.0;
} else if (z <= -8e-259) {
tmp = y * 4.0;
} else if (z <= 3.6e-121) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = y * 4.0;
} else if (z <= 8.6e+163) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) t_1 = -6.0 * (y * z) tmp = 0 if z <= -7.4e+265: tmp = t_0 elif z <= -1.05e+179: tmp = t_1 elif z <= -0.047: tmp = t_0 elif z <= -3.7e-97: tmp = y * 4.0 elif z <= -1.42e-129: tmp = x * -3.0 elif z <= -8e-259: tmp = y * 4.0 elif z <= 3.6e-121: tmp = x * -3.0 elif z <= 0.52: tmp = y * 4.0 elif z <= 8.6e+163: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -7.4e+265) tmp = t_0; elseif (z <= -1.05e+179) tmp = t_1; elseif (z <= -0.047) tmp = t_0; elseif (z <= -3.7e-97) tmp = Float64(y * 4.0); elseif (z <= -1.42e-129) tmp = Float64(x * -3.0); elseif (z <= -8e-259) tmp = Float64(y * 4.0); elseif (z <= 3.6e-121) tmp = Float64(x * -3.0); elseif (z <= 0.52) tmp = Float64(y * 4.0); elseif (z <= 8.6e+163) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -7.4e+265) tmp = t_0; elseif (z <= -1.05e+179) tmp = t_1; elseif (z <= -0.047) tmp = t_0; elseif (z <= -3.7e-97) tmp = y * 4.0; elseif (z <= -1.42e-129) tmp = x * -3.0; elseif (z <= -8e-259) tmp = y * 4.0; elseif (z <= 3.6e-121) tmp = x * -3.0; elseif (z <= 0.52) tmp = y * 4.0; elseif (z <= 8.6e+163) tmp = t_0; else tmp = t_1; 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[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e+265], t$95$0, If[LessEqual[z, -1.05e+179], t$95$1, If[LessEqual[z, -0.047], t$95$0, If[LessEqual[z, -3.7e-97], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.42e-129], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8e-259], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.6e-121], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.52], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.6e+163], t$95$0, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{+265}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -0.047:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-97}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.42 \cdot 10^{-129}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-259}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-121}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+163}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.4e265 or -1.0499999999999999e179 < z < -0.047 or 0.52000000000000002 < z < 8.6000000000000004e163Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 66.1%
sub-neg66.1%
distribute-rgt-in66.1%
metadata-eval66.1%
distribute-lft-neg-in66.1%
associate-+r+66.1%
metadata-eval66.1%
distribute-rgt-neg-in66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in z around inf 62.0%
if -7.4e265 < z < -1.0499999999999999e179 or 8.6000000000000004e163 < 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 y around inf 67.9%
Taylor expanded in z around inf 67.9%
if -0.047 < z < -3.69999999999999976e-97 or -1.42e-129 < z < -8.0000000000000006e-259 or 3.59999999999999984e-121 < z < 0.52000000000000002Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
+-commutative99.3%
*-commutative99.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 68.6%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if -3.69999999999999976e-97 < z < -1.42e-129 or -8.0000000000000006e-259 < z < 3.59999999999999984e-121Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 74.2%
sub-neg74.2%
distribute-rgt-in74.2%
metadata-eval74.2%
distribute-lft-neg-in74.2%
associate-+r+74.2%
metadata-eval74.2%
distribute-rgt-neg-in74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
Simplified74.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (+ 4.0 (* z -6.0))))
(t_1 (* x (+ -3.0 (* z 6.0))))
(t_2 (* (- y x) (* z -6.0))))
(if (<= z -11000000.0)
t_2
(if (<= z -4.8e-97)
t_0
(if (<= z -2.2e-130)
t_1
(if (<= z -2.9e-260)
t_0
(if (<= z 4.6e-121) t_1 (if (<= z 2.1) t_0 t_2))))))))
double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = x * (-3.0 + (z * 6.0));
double t_2 = (y - x) * (z * -6.0);
double tmp;
if (z <= -11000000.0) {
tmp = t_2;
} else if (z <= -4.8e-97) {
tmp = t_0;
} else if (z <= -2.2e-130) {
tmp = t_1;
} else if (z <= -2.9e-260) {
tmp = t_0;
} else if (z <= 4.6e-121) {
tmp = t_1;
} else if (z <= 2.1) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y * (4.0d0 + (z * (-6.0d0)))
t_1 = x * ((-3.0d0) + (z * 6.0d0))
t_2 = (y - x) * (z * (-6.0d0))
if (z <= (-11000000.0d0)) then
tmp = t_2
else if (z <= (-4.8d-97)) then
tmp = t_0
else if (z <= (-2.2d-130)) then
tmp = t_1
else if (z <= (-2.9d-260)) then
tmp = t_0
else if (z <= 4.6d-121) then
tmp = t_1
else if (z <= 2.1d0) then
tmp = t_0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = x * (-3.0 + (z * 6.0));
double t_2 = (y - x) * (z * -6.0);
double tmp;
if (z <= -11000000.0) {
tmp = t_2;
} else if (z <= -4.8e-97) {
tmp = t_0;
} else if (z <= -2.2e-130) {
tmp = t_1;
} else if (z <= -2.9e-260) {
tmp = t_0;
} else if (z <= 4.6e-121) {
tmp = t_1;
} else if (z <= 2.1) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = y * (4.0 + (z * -6.0)) t_1 = x * (-3.0 + (z * 6.0)) t_2 = (y - x) * (z * -6.0) tmp = 0 if z <= -11000000.0: tmp = t_2 elif z <= -4.8e-97: tmp = t_0 elif z <= -2.2e-130: tmp = t_1 elif z <= -2.9e-260: tmp = t_0 elif z <= 4.6e-121: tmp = t_1 elif z <= 2.1: tmp = t_0 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(4.0 + Float64(z * -6.0))) t_1 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) t_2 = Float64(Float64(y - x) * Float64(z * -6.0)) tmp = 0.0 if (z <= -11000000.0) tmp = t_2; elseif (z <= -4.8e-97) tmp = t_0; elseif (z <= -2.2e-130) tmp = t_1; elseif (z <= -2.9e-260) tmp = t_0; elseif (z <= 4.6e-121) tmp = t_1; elseif (z <= 2.1) tmp = t_0; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (4.0 + (z * -6.0)); t_1 = x * (-3.0 + (z * 6.0)); t_2 = (y - x) * (z * -6.0); tmp = 0.0; if (z <= -11000000.0) tmp = t_2; elseif (z <= -4.8e-97) tmp = t_0; elseif (z <= -2.2e-130) tmp = t_1; elseif (z <= -2.9e-260) tmp = t_0; elseif (z <= 4.6e-121) tmp = t_1; elseif (z <= 2.1) tmp = t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -11000000.0], t$95$2, If[LessEqual[z, -4.8e-97], t$95$0, If[LessEqual[z, -2.2e-130], t$95$1, If[LessEqual[z, -2.9e-260], t$95$0, If[LessEqual[z, 4.6e-121], t$95$1, If[LessEqual[z, 2.1], t$95$0, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(4 + z \cdot -6\right)\\
t_1 := x \cdot \left(-3 + z \cdot 6\right)\\
t_2 := \left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -11000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-97}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-260}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.1e7 or 2.10000000000000009 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 98.1%
associate-*r*98.1%
*-commutative98.1%
Simplified98.1%
if -1.1e7 < z < -4.8e-97 or -2.1999999999999999e-130 < z < -2.8999999999999999e-260 or 4.60000000000000025e-121 < z < 2.10000000000000009Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 67.5%
if -4.8e-97 < z < -2.1999999999999999e-130 or -2.8999999999999999e-260 < z < 4.60000000000000025e-121Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 74.2%
sub-neg74.2%
distribute-rgt-in74.2%
metadata-eval74.2%
distribute-lft-neg-in74.2%
associate-+r+74.2%
metadata-eval74.2%
distribute-rgt-neg-in74.2%
metadata-eval74.2%
Simplified74.2%
Final simplification84.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.66)
t_0
(if (<= z -8e-98)
(* y 4.0)
(if (<= z -1.35e-129)
(* x -3.0)
(if (<= z -8.2e-262)
(* y 4.0)
(if (<= z 7e-121)
(* x -3.0)
(if (<= z 95000000.0) (* 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 <= -8e-98) {
tmp = y * 4.0;
} else if (z <= -1.35e-129) {
tmp = x * -3.0;
} else if (z <= -8.2e-262) {
tmp = y * 4.0;
} else if (z <= 7e-121) {
tmp = x * -3.0;
} else if (z <= 95000000.0) {
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 <= (-8d-98)) then
tmp = y * 4.0d0
else if (z <= (-1.35d-129)) then
tmp = x * (-3.0d0)
else if (z <= (-8.2d-262)) then
tmp = y * 4.0d0
else if (z <= 7d-121) then
tmp = x * (-3.0d0)
else if (z <= 95000000.0d0) 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 <= -8e-98) {
tmp = y * 4.0;
} else if (z <= -1.35e-129) {
tmp = x * -3.0;
} else if (z <= -8.2e-262) {
tmp = y * 4.0;
} else if (z <= 7e-121) {
tmp = x * -3.0;
} else if (z <= 95000000.0) {
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 <= -8e-98: tmp = y * 4.0 elif z <= -1.35e-129: tmp = x * -3.0 elif z <= -8.2e-262: tmp = y * 4.0 elif z <= 7e-121: tmp = x * -3.0 elif z <= 95000000.0: 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 <= -8e-98) tmp = Float64(y * 4.0); elseif (z <= -1.35e-129) tmp = Float64(x * -3.0); elseif (z <= -8.2e-262) tmp = Float64(y * 4.0); elseif (z <= 7e-121) tmp = Float64(x * -3.0); elseif (z <= 95000000.0) 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 <= -8e-98) tmp = y * 4.0; elseif (z <= -1.35e-129) tmp = x * -3.0; elseif (z <= -8.2e-262) tmp = y * 4.0; elseif (z <= 7e-121) tmp = x * -3.0; elseif (z <= 95000000.0) 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, -8e-98], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.35e-129], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8.2e-262], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7e-121], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 95000000.0], 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 -8 \cdot 10^{-98}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-129}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-262}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-121}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 95000000:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.660000000000000031 or 9.5e7 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 48.0%
Taylor expanded in z around inf 47.6%
if -0.660000000000000031 < z < -7.99999999999999951e-98 or -1.35e-129 < z < -8.20000000000000052e-262 or 6.99999999999999985e-121 < z < 9.5e7Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
+-commutative99.3%
*-commutative99.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 65.3%
Taylor expanded in z around 0 64.0%
*-commutative64.0%
Simplified64.0%
if -7.99999999999999951e-98 < z < -1.35e-129 or -8.20000000000000052e-262 < z < 6.99999999999999985e-121Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 74.2%
sub-neg74.2%
distribute-rgt-in74.2%
metadata-eval74.2%
distribute-lft-neg-in74.2%
associate-+r+74.2%
metadata-eval74.2%
distribute-rgt-neg-in74.2%
metadata-eval74.2%
Simplified74.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
Simplified74.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z)))))
(if (<= y -2.85e+97)
t_0
(if (<= y -3.7e+15)
(* z (* x 6.0))
(if (<= y -5.5e-140)
t_0
(if (<= y 3.1e-303)
(* x (* z 6.0))
(if (<= y 1.52e-38) (* x -3.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double tmp;
if (y <= -2.85e+97) {
tmp = t_0;
} else if (y <= -3.7e+15) {
tmp = z * (x * 6.0);
} else if (y <= -5.5e-140) {
tmp = t_0;
} else if (y <= 3.1e-303) {
tmp = x * (z * 6.0);
} else if (y <= 1.52e-38) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (y * (0.6666666666666666d0 - z))
if (y <= (-2.85d+97)) then
tmp = t_0
else if (y <= (-3.7d+15)) then
tmp = z * (x * 6.0d0)
else if (y <= (-5.5d-140)) then
tmp = t_0
else if (y <= 3.1d-303) then
tmp = x * (z * 6.0d0)
else if (y <= 1.52d-38) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double tmp;
if (y <= -2.85e+97) {
tmp = t_0;
} else if (y <= -3.7e+15) {
tmp = z * (x * 6.0);
} else if (y <= -5.5e-140) {
tmp = t_0;
} else if (y <= 3.1e-303) {
tmp = x * (z * 6.0);
} else if (y <= 1.52e-38) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) tmp = 0 if y <= -2.85e+97: tmp = t_0 elif y <= -3.7e+15: tmp = z * (x * 6.0) elif y <= -5.5e-140: tmp = t_0 elif y <= 3.1e-303: tmp = x * (z * 6.0) elif y <= 1.52e-38: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) tmp = 0.0 if (y <= -2.85e+97) tmp = t_0; elseif (y <= -3.7e+15) tmp = Float64(z * Float64(x * 6.0)); elseif (y <= -5.5e-140) tmp = t_0; elseif (y <= 3.1e-303) tmp = Float64(x * Float64(z * 6.0)); elseif (y <= 1.52e-38) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); tmp = 0.0; if (y <= -2.85e+97) tmp = t_0; elseif (y <= -3.7e+15) tmp = z * (x * 6.0); elseif (y <= -5.5e-140) tmp = t_0; elseif (y <= 3.1e-303) tmp = x * (z * 6.0); elseif (y <= 1.52e-38) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.85e+97], t$95$0, If[LessEqual[y, -3.7e+15], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.5e-140], t$95$0, If[LessEqual[y, 3.1e-303], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.52e-38], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{if}\;y \leq -2.85 \cdot 10^{+97}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{+15}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-303}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-38}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -2.8500000000000001e97 or -3.7e15 < y < -5.50000000000000026e-140 or 1.5200000000000001e-38 < y Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 72.3%
if -2.8500000000000001e97 < y < -3.7e15Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 82.7%
sub-neg82.7%
distribute-rgt-in82.8%
metadata-eval82.8%
distribute-lft-neg-in82.8%
associate-+r+82.8%
metadata-eval82.8%
distribute-rgt-neg-in82.8%
metadata-eval82.8%
Simplified82.8%
Taylor expanded in z around inf 55.4%
*-commutative55.4%
*-commutative55.4%
associate-*r*55.4%
Simplified55.4%
if -5.50000000000000026e-140 < y < 3.1000000000000001e-303Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 90.4%
sub-neg90.4%
distribute-rgt-in90.4%
metadata-eval90.4%
distribute-lft-neg-in90.4%
associate-+r+90.4%
metadata-eval90.4%
distribute-rgt-neg-in90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in z around inf 64.1%
*-commutative64.1%
associate-*r*64.2%
Simplified64.2%
if 3.1000000000000001e-303 < y < 1.5200000000000001e-38Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 82.6%
sub-neg82.6%
distribute-rgt-in82.6%
metadata-eval82.6%
distribute-lft-neg-in82.6%
associate-+r+82.6%
metadata-eval82.6%
distribute-rgt-neg-in82.6%
metadata-eval82.6%
Simplified82.6%
Taylor expanded in z around 0 50.5%
*-commutative50.5%
Simplified50.5%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* (- y x) (* z -6.0)) (if (<= z 0.66) (+ (* x -3.0) (* y 4.0)) (* z (+ (* y -6.0) (* x 6.0))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = (y - x) * (z * -6.0);
} else if (z <= 0.66) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y * -6.0) + (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 = (y - x) * (z * (-6.0d0))
else if (z <= 0.66d0) then
tmp = (x * (-3.0d0)) + (y * 4.0d0)
else
tmp = z * ((y * (-6.0d0)) + (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 = (y - x) * (z * -6.0);
} else if (z <= 0.66) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y * -6.0) + (x * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = (y - x) * (z * -6.0) elif z <= 0.66: tmp = (x * -3.0) + (y * 4.0) else: tmp = z * ((y * -6.0) + (x * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); elseif (z <= 0.66) tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); else tmp = Float64(z * Float64(Float64(y * -6.0) + Float64(x * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = (y - x) * (z * -6.0); elseif (z <= 0.66) tmp = (x * -3.0) + (y * 4.0); else tmp = z * ((y * -6.0) + (x * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.66], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y * -6.0), $MachinePrecision] + N[(x * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot -6 + x \cdot 6\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 97.7%
associate-*r*97.8%
*-commutative97.8%
Simplified97.8%
if -0.55000000000000004 < z < 0.660000000000000031Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 92.5%
Taylor expanded in z around 0 90.8%
distribute-lft1-in91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in y around 0 98.0%
if 0.660000000000000031 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 92.6%
Taylor expanded in z around inf 96.5%
Final simplification97.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.57))) (* (- y x) (* z -6.0)) (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.57)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.58d0)) .or. (.not. (z <= 0.57d0))) then
tmp = (y - x) * (z * (-6.0d0))
else
tmp = (x * (-3.0d0)) + (y * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.57)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.57): tmp = (y - x) * (z * -6.0) else: tmp = (x * -3.0) + (y * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.57)) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); else tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.57))) tmp = (y - x) * (z * -6.0); else tmp = (x * -3.0) + (y * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.57]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.57\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.569999999999999951 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.2%
associate-*r*97.2%
*-commutative97.2%
Simplified97.2%
if -0.57999999999999996 < z < 0.569999999999999951Initial program 99.3%
+-commutative99.3%
associate-*l*99.7%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 92.5%
Taylor expanded in z around 0 90.8%
distribute-lft1-in91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in y around 0 98.0%
Final simplification97.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.55) (not (<= z 0.62))) (* (- y x) (* z -6.0)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.55) || !(z <= 0.62)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.55d0)) .or. (.not. (z <= 0.62d0))) then
tmp = (y - x) * (z * (-6.0d0))
else
tmp = x + ((y - x) * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.55) || !(z <= 0.62)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.55) or not (z <= 0.62): tmp = (y - x) * (z * -6.0) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.55) || !(z <= 0.62)) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); else tmp = Float64(x + Float64(Float64(y - x) * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.55) || ~((z <= 0.62))) tmp = (y - x) * (z * -6.0); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.55], N[Not[LessEqual[z, 0.62]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55 \lor \neg \left(z \leq 0.62\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.55000000000000004 or 0.619999999999999996 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.2%
associate-*r*97.2%
*-commutative97.2%
Simplified97.2%
if -0.55000000000000004 < z < 0.619999999999999996Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 98.0%
Final simplification97.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -4.2e+97) (not (<= y 9.8e-25))) (* y (+ 4.0 (* z -6.0))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.2e+97) || !(y <= 9.8e-25)) {
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 <= (-4.2d+97)) .or. (.not. (y <= 9.8d-25))) 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 <= -4.2e+97) || !(y <= 9.8e-25)) {
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 <= -4.2e+97) or not (y <= 9.8e-25): 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 <= -4.2e+97) || !(y <= 9.8e-25)) 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 <= -4.2e+97) || ~((y <= 9.8e-25))) 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, -4.2e+97], N[Not[LessEqual[y, 9.8e-25]], $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 -4.2 \cdot 10^{+97} \lor \neg \left(y \leq 9.8 \cdot 10^{-25}\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 < -4.20000000000000023e97 or 9.7999999999999998e-25 < y Initial program 99.6%
+-commutative99.6%
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 81.7%
if -4.20000000000000023e97 < y < 9.7999999999999998e-25Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.5%
sub-neg77.5%
distribute-rgt-in77.5%
metadata-eval77.5%
distribute-lft-neg-in77.5%
associate-+r+77.5%
metadata-eval77.5%
distribute-rgt-neg-in77.5%
metadata-eval77.5%
Simplified77.5%
Final simplification79.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.85e+97) (not (<= y 1.45e-19))) (* 6.0 (* y (- 0.6666666666666666 z))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.85e+97) || !(y <= 1.45e-19)) {
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 <= (-2.85d+97)) .or. (.not. (y <= 1.45d-19))) 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 <= -2.85e+97) || !(y <= 1.45e-19)) {
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 <= -2.85e+97) or not (y <= 1.45e-19): 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 <= -2.85e+97) || !(y <= 1.45e-19)) 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 <= -2.85e+97) || ~((y <= 1.45e-19))) 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, -2.85e+97], N[Not[LessEqual[y, 1.45e-19]], $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 -2.85 \cdot 10^{+97} \lor \neg \left(y \leq 1.45 \cdot 10^{-19}\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 < -2.8500000000000001e97 or 1.45e-19 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 81.5%
if -2.8500000000000001e97 < y < 1.45e-19Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.5%
sub-neg77.5%
distribute-rgt-in77.5%
metadata-eval77.5%
distribute-lft-neg-in77.5%
associate-+r+77.5%
metadata-eval77.5%
distribute-rgt-neg-in77.5%
metadata-eval77.5%
Simplified77.5%
Final simplification79.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.55e+73) (not (<= y 9.2e-38))) (* y 4.0) (* x -3.0)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.55e+73) || !(y <= 9.2e-38)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-1.55d+73)) .or. (.not. (y <= 9.2d-38))) then
tmp = y * 4.0d0
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.55e+73) || !(y <= 9.2e-38)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.55e+73) or not (y <= 9.2e-38): tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.55e+73) || !(y <= 9.2e-38)) tmp = Float64(y * 4.0); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.55e+73) || ~((y <= 9.2e-38))) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.55e+73], N[Not[LessEqual[y, 9.2e-38]], $MachinePrecision]], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+73} \lor \neg \left(y \leq 9.2 \cdot 10^{-38}\right):\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if y < -1.55e73 or 9.20000000000000007e-38 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 79.7%
Taylor expanded in z around 0 44.0%
*-commutative44.0%
Simplified44.0%
if -1.55e73 < y < 9.20000000000000007e-38Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.5%
sub-neg77.5%
distribute-rgt-in77.5%
metadata-eval77.5%
distribute-lft-neg-in77.5%
associate-+r+77.5%
metadata-eval77.5%
distribute-rgt-neg-in77.5%
metadata-eval77.5%
Simplified77.5%
Taylor expanded in z around 0 38.1%
*-commutative38.1%
Simplified38.1%
Final simplification40.7%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (+ (* x -6.0) (* y 6.0)))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.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 + ((0.6666666666666666d0 - z) * ((x * (-6.0d0)) + (y * 6.0d0)))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0)));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0)))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(x * -6.0) + Float64(y * 6.0)))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0))); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(x * -6.0), $MachinePrecision] + N[(y * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(x \cdot -6 + y \cdot 6\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (* (- y x) 6.0))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.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 + ((0.6666666666666666d0 - z) * ((y - x) * 6.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((y - x) * 6.0))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(y - x) * 6.0))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((y - x) * 6.0)); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(\left(y - x\right) \cdot 6\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (* x -3.0))
double code(double x, double y, double z) {
return x * -3.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-3.0d0)
end function
public static double code(double x, double y, double z) {
return x * -3.0;
}
def code(x, y, z): return x * -3.0
function code(x, y, z) return Float64(x * -3.0) end
function tmp = code(x, y, z) tmp = x * -3.0; end
code[x_, y_, z_] := N[(x * -3.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -3
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 53.7%
sub-neg53.7%
distribute-rgt-in53.7%
metadata-eval53.7%
distribute-lft-neg-in53.7%
associate-+r+53.7%
metadata-eval53.7%
distribute-rgt-neg-in53.7%
metadata-eval53.7%
Simplified53.7%
Taylor expanded in z around 0 25.8%
*-commutative25.8%
Simplified25.8%
herbie shell --seed 2024103
(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))))