
(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 (+ x (fma -6.0 (* (- y x) z) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + fma(-6.0, ((y - x) * z), ((y - x) * 4.0));
}
function code(x, y, z) return Float64(x + fma(-6.0, Float64(Float64(y - x) * z), Float64(Float64(y - x) * 4.0))) end
code[x_, y_, z_] := N[(x + N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \mathsf{fma}\left(-6, \left(y - x\right) \cdot z, \left(y - x\right) \cdot 4\right)
\end{array}
Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
+-commutative99.2%
*-commutative99.2%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 99.8%
fma-define99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.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.2%
metadata-eval99.2%
Simplified99.2%
+-commutative99.2%
*-commutative99.2%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* x 6.0))))
(if (<= z -2.35e+175)
(* z (* -6.0 y))
(if (<= z -1.25e+136)
t_0
(if (<= z -2.55e+127)
(* -6.0 (* y z))
(if (<= z -360.0)
(* x (* z 6.0))
(if (<= z -9.5e-180)
(* y 4.0)
(if (<= z 1.95e-272)
(* x -3.0)
(if (<= z 2.9e-194)
(* y 4.0)
(if (<= z 2.1e-66)
(* x -3.0)
(if (<= z 0.68)
(* y 4.0)
(if (<= z 1.85e+127) t_0 (* y (* -6.0 z))))))))))))))
double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -2.35e+175) {
tmp = z * (-6.0 * y);
} else if (z <= -1.25e+136) {
tmp = t_0;
} else if (z <= -2.55e+127) {
tmp = -6.0 * (y * z);
} else if (z <= -360.0) {
tmp = x * (z * 6.0);
} else if (z <= -9.5e-180) {
tmp = y * 4.0;
} else if (z <= 1.95e-272) {
tmp = x * -3.0;
} else if (z <= 2.9e-194) {
tmp = y * 4.0;
} else if (z <= 2.1e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 1.85e+127) {
tmp = t_0;
} else {
tmp = y * (-6.0 * 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 = z * (x * 6.0d0)
if (z <= (-2.35d+175)) then
tmp = z * ((-6.0d0) * y)
else if (z <= (-1.25d+136)) then
tmp = t_0
else if (z <= (-2.55d+127)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-360.0d0)) then
tmp = x * (z * 6.0d0)
else if (z <= (-9.5d-180)) then
tmp = y * 4.0d0
else if (z <= 1.95d-272) then
tmp = x * (-3.0d0)
else if (z <= 2.9d-194) then
tmp = y * 4.0d0
else if (z <= 2.1d-66) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else if (z <= 1.85d+127) then
tmp = t_0
else
tmp = y * ((-6.0d0) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -2.35e+175) {
tmp = z * (-6.0 * y);
} else if (z <= -1.25e+136) {
tmp = t_0;
} else if (z <= -2.55e+127) {
tmp = -6.0 * (y * z);
} else if (z <= -360.0) {
tmp = x * (z * 6.0);
} else if (z <= -9.5e-180) {
tmp = y * 4.0;
} else if (z <= 1.95e-272) {
tmp = x * -3.0;
} else if (z <= 2.9e-194) {
tmp = y * 4.0;
} else if (z <= 2.1e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 1.85e+127) {
tmp = t_0;
} else {
tmp = y * (-6.0 * z);
}
return tmp;
}
def code(x, y, z): t_0 = z * (x * 6.0) tmp = 0 if z <= -2.35e+175: tmp = z * (-6.0 * y) elif z <= -1.25e+136: tmp = t_0 elif z <= -2.55e+127: tmp = -6.0 * (y * z) elif z <= -360.0: tmp = x * (z * 6.0) elif z <= -9.5e-180: tmp = y * 4.0 elif z <= 1.95e-272: tmp = x * -3.0 elif z <= 2.9e-194: tmp = y * 4.0 elif z <= 2.1e-66: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 elif z <= 1.85e+127: tmp = t_0 else: tmp = y * (-6.0 * z) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -2.35e+175) tmp = Float64(z * Float64(-6.0 * y)); elseif (z <= -1.25e+136) tmp = t_0; elseif (z <= -2.55e+127) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -360.0) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -9.5e-180) tmp = Float64(y * 4.0); elseif (z <= 1.95e-272) tmp = Float64(x * -3.0); elseif (z <= 2.9e-194) tmp = Float64(y * 4.0); elseif (z <= 2.1e-66) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); elseif (z <= 1.85e+127) tmp = t_0; else tmp = Float64(y * Float64(-6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (x * 6.0); tmp = 0.0; if (z <= -2.35e+175) tmp = z * (-6.0 * y); elseif (z <= -1.25e+136) tmp = t_0; elseif (z <= -2.55e+127) tmp = -6.0 * (y * z); elseif (z <= -360.0) tmp = x * (z * 6.0); elseif (z <= -9.5e-180) tmp = y * 4.0; elseif (z <= 1.95e-272) tmp = x * -3.0; elseif (z <= 2.9e-194) tmp = y * 4.0; elseif (z <= 2.1e-66) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; elseif (z <= 1.85e+127) tmp = t_0; else tmp = y * (-6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e+175], N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e+136], t$95$0, If[LessEqual[z, -2.55e+127], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -360.0], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-180], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.95e-272], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.9e-194], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.1e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.85e+127], t$95$0, N[(y * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{+175}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{+127}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -360:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-180}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-272}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-194}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+127}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-6 \cdot z\right)\\
\end{array}
\end{array}
if z < -2.34999999999999998e175Initial 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 62.6%
Taylor expanded in z around inf 62.6%
*-commutative62.6%
*-commutative62.6%
associate-*r*62.7%
Simplified62.7%
if -2.34999999999999998e175 < z < -1.25e136 or 0.680000000000000049 < z < 1.8499999999999999e127Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 68.9%
sub-neg68.9%
distribute-rgt-in68.9%
metadata-eval68.9%
distribute-lft-neg-in68.9%
associate-+r+68.9%
metadata-eval68.9%
distribute-rgt-neg-in68.9%
metadata-eval68.9%
Simplified68.9%
Taylor expanded in z around inf 68.7%
*-commutative68.7%
associate-*r*68.9%
*-commutative68.9%
associate-*l*69.0%
*-commutative69.0%
Simplified69.0%
if -1.25e136 < z < -2.55000000000000019e127Initial 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 y around inf 99.7%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
Simplified99.7%
if -2.55000000000000019e127 < z < -360Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.5%
sub-neg66.5%
distribute-rgt-in66.5%
metadata-eval66.5%
distribute-lft-neg-in66.5%
associate-+r+66.6%
metadata-eval66.6%
distribute-rgt-neg-in66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in z around inf 64.3%
*-commutative64.3%
associate-*r*64.4%
Simplified64.4%
if -360 < z < -9.49999999999999934e-180 or 1.9499999999999999e-272 < z < 2.8999999999999997e-194 or 2.1e-66 < z < 0.680000000000000049Initial program 98.3%
metadata-eval98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around 0 62.1%
*-commutative62.1%
Simplified62.1%
if -9.49999999999999934e-180 < z < 1.9499999999999999e-272 or 2.8999999999999997e-194 < z < 2.1e-66Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 63.9%
sub-neg63.9%
distribute-rgt-in63.9%
metadata-eval63.9%
distribute-lft-neg-in63.9%
associate-+r+63.9%
metadata-eval63.9%
distribute-rgt-neg-in63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in z around 0 63.9%
*-commutative63.9%
Simplified63.9%
if 1.8499999999999999e127 < z Initial program 99.8%
+-commutative99.8%
associate-*l*97.3%
fma-define97.3%
sub-neg97.3%
distribute-rgt-in97.3%
metadata-eval97.3%
metadata-eval97.3%
distribute-lft-neg-out97.3%
distribute-rgt-neg-in97.3%
metadata-eval97.3%
Simplified97.3%
Taylor expanded in y around inf 70.4%
Taylor expanded in z around inf 70.4%
*-commutative70.4%
associate-*r*70.4%
Simplified70.4%
Final simplification65.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* z (* x 6.0))))
(if (<= z -7.5e+175)
t_0
(if (<= z -6.5e+137)
t_1
(if (<= z -2.55e+127)
t_0
(if (<= z -16.0)
(* x (* z 6.0))
(if (<= z -8.2e-181)
(* y 4.0)
(if (<= z 1.95e-272)
(* x -3.0)
(if (<= z 3.3e-194)
(* y 4.0)
(if (<= z 2.2e-66)
(* x -3.0)
(if (<= z 0.5)
(* y 4.0)
(if (<= z 8.5e+133) t_1 (* y (* -6.0 z))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = z * (x * 6.0);
double tmp;
if (z <= -7.5e+175) {
tmp = t_0;
} else if (z <= -6.5e+137) {
tmp = t_1;
} else if (z <= -2.55e+127) {
tmp = t_0;
} else if (z <= -16.0) {
tmp = x * (z * 6.0);
} else if (z <= -8.2e-181) {
tmp = y * 4.0;
} else if (z <= 1.95e-272) {
tmp = x * -3.0;
} else if (z <= 3.3e-194) {
tmp = y * 4.0;
} else if (z <= 2.2e-66) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else if (z <= 8.5e+133) {
tmp = t_1;
} else {
tmp = y * (-6.0 * 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 = (-6.0d0) * (y * z)
t_1 = z * (x * 6.0d0)
if (z <= (-7.5d+175)) then
tmp = t_0
else if (z <= (-6.5d+137)) then
tmp = t_1
else if (z <= (-2.55d+127)) then
tmp = t_0
else if (z <= (-16.0d0)) then
tmp = x * (z * 6.0d0)
else if (z <= (-8.2d-181)) then
tmp = y * 4.0d0
else if (z <= 1.95d-272) then
tmp = x * (-3.0d0)
else if (z <= 3.3d-194) then
tmp = y * 4.0d0
else if (z <= 2.2d-66) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
else if (z <= 8.5d+133) then
tmp = t_1
else
tmp = y * ((-6.0d0) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = z * (x * 6.0);
double tmp;
if (z <= -7.5e+175) {
tmp = t_0;
} else if (z <= -6.5e+137) {
tmp = t_1;
} else if (z <= -2.55e+127) {
tmp = t_0;
} else if (z <= -16.0) {
tmp = x * (z * 6.0);
} else if (z <= -8.2e-181) {
tmp = y * 4.0;
} else if (z <= 1.95e-272) {
tmp = x * -3.0;
} else if (z <= 3.3e-194) {
tmp = y * 4.0;
} else if (z <= 2.2e-66) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else if (z <= 8.5e+133) {
tmp = t_1;
} else {
tmp = y * (-6.0 * z);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = z * (x * 6.0) tmp = 0 if z <= -7.5e+175: tmp = t_0 elif z <= -6.5e+137: tmp = t_1 elif z <= -2.55e+127: tmp = t_0 elif z <= -16.0: tmp = x * (z * 6.0) elif z <= -8.2e-181: tmp = y * 4.0 elif z <= 1.95e-272: tmp = x * -3.0 elif z <= 3.3e-194: tmp = y * 4.0 elif z <= 2.2e-66: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 elif z <= 8.5e+133: tmp = t_1 else: tmp = y * (-6.0 * z) return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -7.5e+175) tmp = t_0; elseif (z <= -6.5e+137) tmp = t_1; elseif (z <= -2.55e+127) tmp = t_0; elseif (z <= -16.0) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -8.2e-181) tmp = Float64(y * 4.0); elseif (z <= 1.95e-272) tmp = Float64(x * -3.0); elseif (z <= 3.3e-194) tmp = Float64(y * 4.0); elseif (z <= 2.2e-66) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); elseif (z <= 8.5e+133) tmp = t_1; else tmp = Float64(y * Float64(-6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = z * (x * 6.0); tmp = 0.0; if (z <= -7.5e+175) tmp = t_0; elseif (z <= -6.5e+137) tmp = t_1; elseif (z <= -2.55e+127) tmp = t_0; elseif (z <= -16.0) tmp = x * (z * 6.0); elseif (z <= -8.2e-181) tmp = y * 4.0; elseif (z <= 1.95e-272) tmp = x * -3.0; elseif (z <= 3.3e-194) tmp = y * 4.0; elseif (z <= 2.2e-66) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; elseif (z <= 8.5e+133) tmp = t_1; else tmp = y * (-6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+175], t$95$0, If[LessEqual[z, -6.5e+137], t$95$1, If[LessEqual[z, -2.55e+127], t$95$0, If[LessEqual[z, -16.0], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.2e-181], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.95e-272], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.3e-194], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.2e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.5e+133], t$95$1, N[(y * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+175}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{+127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -16:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-181}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-272}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-194}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-6 \cdot z\right)\\
\end{array}
\end{array}
if z < -7.5000000000000001e175 or -6.5000000000000002e137 < z < -2.55000000000000019e127Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 68.6%
Taylor expanded in z around inf 68.6%
*-commutative68.6%
Simplified68.6%
if -7.5000000000000001e175 < z < -6.5000000000000002e137 or 0.5 < z < 8.50000000000000044e133Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 68.9%
sub-neg68.9%
distribute-rgt-in68.9%
metadata-eval68.9%
distribute-lft-neg-in68.9%
associate-+r+68.9%
metadata-eval68.9%
distribute-rgt-neg-in68.9%
metadata-eval68.9%
Simplified68.9%
Taylor expanded in z around inf 68.7%
*-commutative68.7%
associate-*r*68.9%
*-commutative68.9%
associate-*l*69.0%
*-commutative69.0%
Simplified69.0%
if -2.55000000000000019e127 < z < -16Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 66.5%
sub-neg66.5%
distribute-rgt-in66.5%
metadata-eval66.5%
distribute-lft-neg-in66.5%
associate-+r+66.6%
metadata-eval66.6%
distribute-rgt-neg-in66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in z around inf 64.3%
*-commutative64.3%
associate-*r*64.4%
Simplified64.4%
if -16 < z < -8.2000000000000003e-181 or 1.9499999999999999e-272 < z < 3.2999999999999999e-194 or 2.2000000000000001e-66 < z < 0.5Initial program 98.3%
metadata-eval98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around 0 62.1%
*-commutative62.1%
Simplified62.1%
if -8.2000000000000003e-181 < z < 1.9499999999999999e-272 or 3.2999999999999999e-194 < z < 2.2000000000000001e-66Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 63.9%
sub-neg63.9%
distribute-rgt-in63.9%
metadata-eval63.9%
distribute-lft-neg-in63.9%
associate-+r+63.9%
metadata-eval63.9%
distribute-rgt-neg-in63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in z around 0 63.9%
*-commutative63.9%
Simplified63.9%
if 8.50000000000000044e133 < z Initial program 99.8%
+-commutative99.8%
associate-*l*97.3%
fma-define97.3%
sub-neg97.3%
distribute-rgt-in97.3%
metadata-eval97.3%
metadata-eval97.3%
distribute-lft-neg-out97.3%
distribute-rgt-neg-in97.3%
metadata-eval97.3%
Simplified97.3%
Taylor expanded in y around inf 70.4%
Taylor expanded in z around inf 70.4%
*-commutative70.4%
associate-*r*70.4%
Simplified70.4%
Final simplification65.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -4.2e+175)
t_0
(if (<= z -1.2e+136)
t_1
(if (<= z -1.46e+128)
t_0
(if (<= z -18.0)
t_1
(if (<= z -3e-180)
(* y 4.0)
(if (<= z 2.65e-270)
(* x -3.0)
(if (<= z 3.2e-193)
(* y 4.0)
(if (<= z 4e-66)
(* x -3.0)
(if (<= z 0.68)
(* y 4.0)
(if (<= z 7.6e+130) t_1 (* y (* -6.0 z))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -4.2e+175) {
tmp = t_0;
} else if (z <= -1.2e+136) {
tmp = t_1;
} else if (z <= -1.46e+128) {
tmp = t_0;
} else if (z <= -18.0) {
tmp = t_1;
} else if (z <= -3e-180) {
tmp = y * 4.0;
} else if (z <= 2.65e-270) {
tmp = x * -3.0;
} else if (z <= 3.2e-193) {
tmp = y * 4.0;
} else if (z <= 4e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 7.6e+130) {
tmp = t_1;
} else {
tmp = y * (-6.0 * 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 = (-6.0d0) * (y * z)
t_1 = x * (z * 6.0d0)
if (z <= (-4.2d+175)) then
tmp = t_0
else if (z <= (-1.2d+136)) then
tmp = t_1
else if (z <= (-1.46d+128)) then
tmp = t_0
else if (z <= (-18.0d0)) then
tmp = t_1
else if (z <= (-3d-180)) then
tmp = y * 4.0d0
else if (z <= 2.65d-270) then
tmp = x * (-3.0d0)
else if (z <= 3.2d-193) then
tmp = y * 4.0d0
else if (z <= 4d-66) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else if (z <= 7.6d+130) then
tmp = t_1
else
tmp = y * ((-6.0d0) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -4.2e+175) {
tmp = t_0;
} else if (z <= -1.2e+136) {
tmp = t_1;
} else if (z <= -1.46e+128) {
tmp = t_0;
} else if (z <= -18.0) {
tmp = t_1;
} else if (z <= -3e-180) {
tmp = y * 4.0;
} else if (z <= 2.65e-270) {
tmp = x * -3.0;
} else if (z <= 3.2e-193) {
tmp = y * 4.0;
} else if (z <= 4e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 7.6e+130) {
tmp = t_1;
} else {
tmp = y * (-6.0 * z);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -4.2e+175: tmp = t_0 elif z <= -1.2e+136: tmp = t_1 elif z <= -1.46e+128: tmp = t_0 elif z <= -18.0: tmp = t_1 elif z <= -3e-180: tmp = y * 4.0 elif z <= 2.65e-270: tmp = x * -3.0 elif z <= 3.2e-193: tmp = y * 4.0 elif z <= 4e-66: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 elif z <= 7.6e+130: tmp = t_1 else: tmp = y * (-6.0 * z) return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -4.2e+175) tmp = t_0; elseif (z <= -1.2e+136) tmp = t_1; elseif (z <= -1.46e+128) tmp = t_0; elseif (z <= -18.0) tmp = t_1; elseif (z <= -3e-180) tmp = Float64(y * 4.0); elseif (z <= 2.65e-270) tmp = Float64(x * -3.0); elseif (z <= 3.2e-193) tmp = Float64(y * 4.0); elseif (z <= 4e-66) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); elseif (z <= 7.6e+130) tmp = t_1; else tmp = Float64(y * Float64(-6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -4.2e+175) tmp = t_0; elseif (z <= -1.2e+136) tmp = t_1; elseif (z <= -1.46e+128) tmp = t_0; elseif (z <= -18.0) tmp = t_1; elseif (z <= -3e-180) tmp = y * 4.0; elseif (z <= 2.65e-270) tmp = x * -3.0; elseif (z <= 3.2e-193) tmp = y * 4.0; elseif (z <= 4e-66) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; elseif (z <= 7.6e+130) tmp = t_1; else tmp = y * (-6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+175], t$95$0, If[LessEqual[z, -1.2e+136], t$95$1, If[LessEqual[z, -1.46e+128], t$95$0, If[LessEqual[z, -18.0], t$95$1, If[LessEqual[z, -3e-180], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.65e-270], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.2e-193], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.6e+130], t$95$1, N[(y * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+175}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{+128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -18:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-180}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-270}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-193}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-6 \cdot z\right)\\
\end{array}
\end{array}
if z < -4.1999999999999998e175 or -1.2e136 < z < -1.4599999999999999e128Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 68.6%
Taylor expanded in z around inf 68.6%
*-commutative68.6%
Simplified68.6%
if -4.1999999999999998e175 < z < -1.2e136 or -1.4599999999999999e128 < z < -18 or 0.680000000000000049 < z < 7.6000000000000004e130Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 67.8%
sub-neg67.8%
distribute-rgt-in67.8%
metadata-eval67.8%
distribute-lft-neg-in67.8%
associate-+r+67.9%
metadata-eval67.9%
distribute-rgt-neg-in67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 66.8%
*-commutative66.8%
associate-*r*66.9%
Simplified66.9%
if -18 < z < -3.0000000000000001e-180 or 2.6499999999999999e-270 < z < 3.20000000000000006e-193 or 3.9999999999999999e-66 < z < 0.680000000000000049Initial program 98.3%
metadata-eval98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around 0 62.1%
*-commutative62.1%
Simplified62.1%
if -3.0000000000000001e-180 < z < 2.6499999999999999e-270 or 3.20000000000000006e-193 < z < 3.9999999999999999e-66Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 63.9%
sub-neg63.9%
distribute-rgt-in63.9%
metadata-eval63.9%
distribute-lft-neg-in63.9%
associate-+r+63.9%
metadata-eval63.9%
distribute-rgt-neg-in63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in z around 0 63.9%
*-commutative63.9%
Simplified63.9%
if 7.6000000000000004e130 < z Initial program 99.8%
+-commutative99.8%
associate-*l*97.3%
fma-define97.3%
sub-neg97.3%
distribute-rgt-in97.3%
metadata-eval97.3%
metadata-eval97.3%
distribute-lft-neg-out97.3%
distribute-rgt-neg-in97.3%
metadata-eval97.3%
Simplified97.3%
Taylor expanded in y around inf 70.4%
Taylor expanded in z around inf 70.4%
*-commutative70.4%
associate-*r*70.4%
Simplified70.4%
Final simplification65.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -7.2e+174)
t_0
(if (<= z -2e+137)
t_1
(if (<= z -2.7e+127)
t_0
(if (<= z -35.0)
t_1
(if (<= z -4.7e-181)
(* y 4.0)
(if (<= z 1.08e-271)
(* x -3.0)
(if (<= z 1.75e-193)
(* y 4.0)
(if (<= z 1.8e-66)
(* x -3.0)
(if (<= z 0.68)
(* y 4.0)
(if (<= z 1.2e+131) t_1 t_0))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -7.2e+174) {
tmp = t_0;
} else if (z <= -2e+137) {
tmp = t_1;
} else if (z <= -2.7e+127) {
tmp = t_0;
} else if (z <= -35.0) {
tmp = t_1;
} else if (z <= -4.7e-181) {
tmp = y * 4.0;
} else if (z <= 1.08e-271) {
tmp = x * -3.0;
} else if (z <= 1.75e-193) {
tmp = y * 4.0;
} else if (z <= 1.8e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 1.2e+131) {
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) * (y * z)
t_1 = x * (z * 6.0d0)
if (z <= (-7.2d+174)) then
tmp = t_0
else if (z <= (-2d+137)) then
tmp = t_1
else if (z <= (-2.7d+127)) then
tmp = t_0
else if (z <= (-35.0d0)) then
tmp = t_1
else if (z <= (-4.7d-181)) then
tmp = y * 4.0d0
else if (z <= 1.08d-271) then
tmp = x * (-3.0d0)
else if (z <= 1.75d-193) then
tmp = y * 4.0d0
else if (z <= 1.8d-66) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else if (z <= 1.2d+131) 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 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -7.2e+174) {
tmp = t_0;
} else if (z <= -2e+137) {
tmp = t_1;
} else if (z <= -2.7e+127) {
tmp = t_0;
} else if (z <= -35.0) {
tmp = t_1;
} else if (z <= -4.7e-181) {
tmp = y * 4.0;
} else if (z <= 1.08e-271) {
tmp = x * -3.0;
} else if (z <= 1.75e-193) {
tmp = y * 4.0;
} else if (z <= 1.8e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 1.2e+131) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -7.2e+174: tmp = t_0 elif z <= -2e+137: tmp = t_1 elif z <= -2.7e+127: tmp = t_0 elif z <= -35.0: tmp = t_1 elif z <= -4.7e-181: tmp = y * 4.0 elif z <= 1.08e-271: tmp = x * -3.0 elif z <= 1.75e-193: tmp = y * 4.0 elif z <= 1.8e-66: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 elif z <= 1.2e+131: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -7.2e+174) tmp = t_0; elseif (z <= -2e+137) tmp = t_1; elseif (z <= -2.7e+127) tmp = t_0; elseif (z <= -35.0) tmp = t_1; elseif (z <= -4.7e-181) tmp = Float64(y * 4.0); elseif (z <= 1.08e-271) tmp = Float64(x * -3.0); elseif (z <= 1.75e-193) tmp = Float64(y * 4.0); elseif (z <= 1.8e-66) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); elseif (z <= 1.2e+131) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -7.2e+174) tmp = t_0; elseif (z <= -2e+137) tmp = t_1; elseif (z <= -2.7e+127) tmp = t_0; elseif (z <= -35.0) tmp = t_1; elseif (z <= -4.7e-181) tmp = y * 4.0; elseif (z <= 1.08e-271) tmp = x * -3.0; elseif (z <= 1.75e-193) tmp = y * 4.0; elseif (z <= 1.8e-66) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; elseif (z <= 1.2e+131) tmp = t_1; 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]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+174], t$95$0, If[LessEqual[z, -2e+137], t$95$1, If[LessEqual[z, -2.7e+127], t$95$0, If[LessEqual[z, -35.0], t$95$1, If[LessEqual[z, -4.7e-181], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.08e-271], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.75e-193], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.8e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.2e+131], t$95$1, t$95$0]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+174}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -35:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-181}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-271}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-193}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -7.2000000000000003e174 or -2.0000000000000001e137 < z < -2.7000000000000002e127 or 1.2e131 < 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 69.5%
Taylor expanded in z around inf 69.5%
*-commutative69.5%
Simplified69.5%
if -7.2000000000000003e174 < z < -2.0000000000000001e137 or -2.7000000000000002e127 < z < -35 or 0.680000000000000049 < z < 1.2e131Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 67.8%
sub-neg67.8%
distribute-rgt-in67.8%
metadata-eval67.8%
distribute-lft-neg-in67.8%
associate-+r+67.9%
metadata-eval67.9%
distribute-rgt-neg-in67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 66.8%
*-commutative66.8%
associate-*r*66.9%
Simplified66.9%
if -35 < z < -4.6999999999999998e-181 or 1.07999999999999997e-271 < z < 1.75000000000000002e-193 or 1.80000000000000006e-66 < z < 0.680000000000000049Initial program 98.3%
metadata-eval98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around 0 62.1%
*-commutative62.1%
Simplified62.1%
if -4.6999999999999998e-181 < z < 1.07999999999999997e-271 or 1.75000000000000002e-193 < z < 1.80000000000000006e-66Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 63.9%
sub-neg63.9%
distribute-rgt-in63.9%
metadata-eval63.9%
distribute-lft-neg-in63.9%
associate-+r+63.9%
metadata-eval63.9%
distribute-rgt-neg-in63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in z around 0 63.9%
*-commutative63.9%
Simplified63.9%
Final simplification65.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -1.9e+174)
t_0
(if (<= z -1.9e+135)
t_1
(if (<= z -6.1e+128)
t_0
(if (<= z -16.5)
t_1
(if (<= z -1.15e-179)
(* y 4.0)
(if (<= z 4.3e-272)
(* x -3.0)
(if (<= z 6.6e-193)
(* y 4.0)
(if (<= z 1.75e-66)
(* x -3.0)
(if (<= z 0.5)
(* y 4.0)
(if (<= z 2.6e+133) t_1 t_0))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.9e+174) {
tmp = t_0;
} else if (z <= -1.9e+135) {
tmp = t_1;
} else if (z <= -6.1e+128) {
tmp = t_0;
} else if (z <= -16.5) {
tmp = t_1;
} else if (z <= -1.15e-179) {
tmp = y * 4.0;
} else if (z <= 4.3e-272) {
tmp = x * -3.0;
} else if (z <= 6.6e-193) {
tmp = y * 4.0;
} else if (z <= 1.75e-66) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else if (z <= 2.6e+133) {
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) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-1.9d+174)) then
tmp = t_0
else if (z <= (-1.9d+135)) then
tmp = t_1
else if (z <= (-6.1d+128)) then
tmp = t_0
else if (z <= (-16.5d0)) then
tmp = t_1
else if (z <= (-1.15d-179)) then
tmp = y * 4.0d0
else if (z <= 4.3d-272) then
tmp = x * (-3.0d0)
else if (z <= 6.6d-193) then
tmp = y * 4.0d0
else if (z <= 1.75d-66) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
else if (z <= 2.6d+133) 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 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.9e+174) {
tmp = t_0;
} else if (z <= -1.9e+135) {
tmp = t_1;
} else if (z <= -6.1e+128) {
tmp = t_0;
} else if (z <= -16.5) {
tmp = t_1;
} else if (z <= -1.15e-179) {
tmp = y * 4.0;
} else if (z <= 4.3e-272) {
tmp = x * -3.0;
} else if (z <= 6.6e-193) {
tmp = y * 4.0;
} else if (z <= 1.75e-66) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else if (z <= 2.6e+133) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -1.9e+174: tmp = t_0 elif z <= -1.9e+135: tmp = t_1 elif z <= -6.1e+128: tmp = t_0 elif z <= -16.5: tmp = t_1 elif z <= -1.15e-179: tmp = y * 4.0 elif z <= 4.3e-272: tmp = x * -3.0 elif z <= 6.6e-193: tmp = y * 4.0 elif z <= 1.75e-66: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 elif z <= 2.6e+133: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.9e+174) tmp = t_0; elseif (z <= -1.9e+135) tmp = t_1; elseif (z <= -6.1e+128) tmp = t_0; elseif (z <= -16.5) tmp = t_1; elseif (z <= -1.15e-179) tmp = Float64(y * 4.0); elseif (z <= 4.3e-272) tmp = Float64(x * -3.0); elseif (z <= 6.6e-193) tmp = Float64(y * 4.0); elseif (z <= 1.75e-66) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); elseif (z <= 2.6e+133) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.9e+174) tmp = t_0; elseif (z <= -1.9e+135) tmp = t_1; elseif (z <= -6.1e+128) tmp = t_0; elseif (z <= -16.5) tmp = t_1; elseif (z <= -1.15e-179) tmp = y * 4.0; elseif (z <= 4.3e-272) tmp = x * -3.0; elseif (z <= 6.6e-193) tmp = y * 4.0; elseif (z <= 1.75e-66) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; elseif (z <= 2.6e+133) tmp = t_1; 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]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+174], t$95$0, If[LessEqual[z, -1.9e+135], t$95$1, If[LessEqual[z, -6.1e+128], t$95$0, If[LessEqual[z, -16.5], t$95$1, If[LessEqual[z, -1.15e-179], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.3e-272], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.6e-193], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.75e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.6e+133], t$95$1, t$95$0]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+174}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.1 \cdot 10^{+128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -16.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-179}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-272}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-193}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.9000000000000001e174 or -1.9000000000000001e135 < z < -6.1000000000000003e128 or 2.5999999999999998e133 < 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 69.5%
Taylor expanded in z around inf 69.5%
*-commutative69.5%
Simplified69.5%
if -1.9000000000000001e174 < z < -1.9000000000000001e135 or -6.1000000000000003e128 < z < -16.5 or 0.5 < z < 2.5999999999999998e133Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 67.8%
sub-neg67.8%
distribute-rgt-in67.8%
metadata-eval67.8%
distribute-lft-neg-in67.8%
associate-+r+67.9%
metadata-eval67.9%
distribute-rgt-neg-in67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 66.8%
if -16.5 < z < -1.14999999999999994e-179 or 4.2999999999999997e-272 < z < 6.5999999999999998e-193 or 1.75e-66 < z < 0.5Initial program 98.3%
metadata-eval98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*r*99.4%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 67.3%
Taylor expanded in z around 0 62.1%
*-commutative62.1%
Simplified62.1%
if -1.14999999999999994e-179 < z < 4.2999999999999997e-272 or 6.5999999999999998e-193 < z < 1.75e-66Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 63.9%
sub-neg63.9%
distribute-rgt-in63.9%
metadata-eval63.9%
distribute-lft-neg-in63.9%
associate-+r+63.9%
metadata-eval63.9%
distribute-rgt-neg-in63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in z around 0 63.9%
*-commutative63.9%
Simplified63.9%
Final simplification65.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -1.2e-5)
t_0
(if (<= z -1.65e-179)
(* y 4.0)
(if (<= z 2.4e-66) (* x -3.0) (if (<= z 0.68) (* y 4.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -1.2e-5) {
tmp = t_0;
} else if (z <= -1.65e-179) {
tmp = y * 4.0;
} else if (z <= 2.4e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
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 <= (-1.2d-5)) then
tmp = t_0
else if (z <= (-1.65d-179)) then
tmp = y * 4.0d0
else if (z <= 2.4d-66) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) 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 <= -1.2e-5) {
tmp = t_0;
} else if (z <= -1.65e-179) {
tmp = y * 4.0;
} else if (z <= 2.4e-66) {
tmp = x * -3.0;
} else if (z <= 0.68) {
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 <= -1.2e-5: tmp = t_0 elif z <= -1.65e-179: tmp = y * 4.0 elif z <= 2.4e-66: tmp = x * -3.0 elif z <= 0.68: 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 <= -1.2e-5) tmp = t_0; elseif (z <= -1.65e-179) tmp = Float64(y * 4.0); elseif (z <= 2.4e-66) tmp = Float64(x * -3.0); elseif (z <= 0.68) 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 <= -1.2e-5) tmp = t_0; elseif (z <= -1.65e-179) tmp = y * 4.0; elseif (z <= 2.4e-66) tmp = x * -3.0; elseif (z <= 0.68) 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, -1.2e-5], t$95$0, If[LessEqual[z, -1.65e-179], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.4e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], 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 -1.2 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-179}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.2e-5 or 0.680000000000000049 < 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 y around inf 53.4%
Taylor expanded in z around inf 51.8%
*-commutative51.8%
Simplified51.8%
if -1.2e-5 < z < -1.6499999999999999e-179 or 2.40000000000000026e-66 < z < 0.680000000000000049Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
+-commutative99.4%
*-commutative99.4%
associate-*r*99.5%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 67.6%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -1.6499999999999999e-179 < z < 2.40000000000000026e-66Initial program 98.1%
metadata-eval98.1%
Simplified98.1%
Taylor expanded in x around inf 56.0%
sub-neg56.0%
distribute-rgt-in56.0%
metadata-eval56.0%
distribute-lft-neg-in56.0%
associate-+r+56.0%
metadata-eval56.0%
distribute-rgt-neg-in56.0%
metadata-eval56.0%
Simplified56.0%
Taylor expanded in z around 0 56.0%
*-commutative56.0%
Simplified56.0%
Final simplification55.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z)))))
(if (<= y -3.05e-183)
t_0
(if (<= y -2.45e-259)
(* z (* x 6.0))
(if (<= y 2.75e-146) (* 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 <= -3.05e-183) {
tmp = t_0;
} else if (y <= -2.45e-259) {
tmp = z * (x * 6.0);
} else if (y <= 2.75e-146) {
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 <= (-3.05d-183)) then
tmp = t_0
else if (y <= (-2.45d-259)) then
tmp = z * (x * 6.0d0)
else if (y <= 2.75d-146) 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 <= -3.05e-183) {
tmp = t_0;
} else if (y <= -2.45e-259) {
tmp = z * (x * 6.0);
} else if (y <= 2.75e-146) {
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 <= -3.05e-183: tmp = t_0 elif y <= -2.45e-259: tmp = z * (x * 6.0) elif y <= 2.75e-146: 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 <= -3.05e-183) tmp = t_0; elseif (y <= -2.45e-259) tmp = Float64(z * Float64(x * 6.0)); elseif (y <= 2.75e-146) 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 <= -3.05e-183) tmp = t_0; elseif (y <= -2.45e-259) tmp = z * (x * 6.0); elseif (y <= 2.75e-146) 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, -3.05e-183], t$95$0, If[LessEqual[y, -2.45e-259], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e-146], 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 -3.05 \cdot 10^{-183}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -2.45 \cdot 10^{-259}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-146}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -3.0500000000000001e-183 or 2.74999999999999999e-146 < y Initial program 99.1%
metadata-eval99.1%
Simplified99.1%
+-commutative99.1%
*-commutative99.1%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 66.2%
if -3.0500000000000001e-183 < y < -2.45000000000000011e-259Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 92.0%
sub-neg92.0%
distribute-rgt-in92.0%
metadata-eval92.0%
distribute-lft-neg-in92.0%
associate-+r+92.0%
metadata-eval92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
Simplified92.0%
Taylor expanded in z around inf 59.9%
*-commutative59.9%
associate-*r*56.5%
*-commutative56.5%
associate-*l*60.2%
*-commutative60.2%
Simplified60.2%
if -2.45000000000000011e-259 < y < 2.74999999999999999e-146Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 85.7%
sub-neg85.7%
distribute-rgt-in85.7%
metadata-eval85.7%
distribute-lft-neg-in85.7%
associate-+r+85.9%
metadata-eval85.9%
distribute-rgt-neg-in85.9%
metadata-eval85.9%
Simplified85.9%
Taylor expanded in z around 0 49.8%
*-commutative49.8%
Simplified49.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.66) (not (<= z 0.52))) (+ x (* z (* 6.0 (- x y)))) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.66) || !(z <= 0.52)) {
tmp = x + (z * (6.0 * (x - y)));
} 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.66d0)) .or. (.not. (z <= 0.52d0))) then
tmp = x + (z * (6.0d0 * (x - y)))
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.66) || !(z <= 0.52)) {
tmp = x + (z * (6.0 * (x - y)));
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.66) or not (z <= 0.52): tmp = x + (z * (6.0 * (x - y))) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.66) || !(z <= 0.52)) tmp = Float64(x + Float64(z * Float64(6.0 * Float64(x - y)))); 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.66) || ~((z <= 0.52))) tmp = x + (z * (6.0 * (x - y))); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.66], N[Not[LessEqual[z, 0.52]], $MachinePrecision]], N[(x + N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $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.66 \lor \neg \left(z \leq 0.52\right):\\
\;\;\;\;x + z \cdot \left(6 \cdot \left(x - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.660000000000000031 or 0.52000000000000002 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 97.7%
neg-mul-197.7%
Simplified97.7%
if -0.660000000000000031 < z < 0.52000000000000002Initial program 98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in z around 0 95.7%
Final simplification96.7%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* (- y x) (* -6.0 z)) (if (<= z 0.6) (+ x (* (- y x) 4.0)) (+ x (* -6.0 (* (- y x) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = (y - x) * (-6.0 * z);
} else if (z <= 0.6) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + (-6.0 * ((y - x) * z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.6d0)) then
tmp = (y - x) * ((-6.0d0) * z)
else if (z <= 0.6d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = x + ((-6.0d0) * ((y - x) * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = (y - x) * (-6.0 * z);
} else if (z <= 0.6) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + (-6.0 * ((y - x) * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = (y - x) * (-6.0 * z) elif z <= 0.6: tmp = x + ((y - x) * 4.0) else: tmp = x + (-6.0 * ((y - x) * z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(Float64(y - x) * Float64(-6.0 * z)); elseif (z <= 0.6) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(x + Float64(-6.0 * Float64(Float64(y - x) * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = (y - x) * (-6.0 * z); elseif (z <= 0.6) tmp = x + ((y - x) * 4.0); else tmp = x + (-6.0 * ((y - x) * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(N[(y - x), $MachinePrecision] * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.6], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;\left(y - x\right) \cdot \left(-6 \cdot z\right)\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x + -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial 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 95.9%
associate-*r*96.0%
Simplified96.0%
if -0.599999999999999978 < z < 0.599999999999999978Initial program 98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in z around 0 95.7%
if 0.599999999999999978 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.6%
Final simplification96.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.56) (not (<= z 0.68))) (* (- y x) (* -6.0 z)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.56) || !(z <= 0.68)) {
tmp = (y - x) * (-6.0 * z);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.56d0)) .or. (.not. (z <= 0.68d0))) then
tmp = (y - x) * ((-6.0d0) * z)
else
tmp = x + ((y - x) * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.56) || !(z <= 0.68)) {
tmp = (y - x) * (-6.0 * z);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.56) or not (z <= 0.68): tmp = (y - x) * (-6.0 * z) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.56) || !(z <= 0.68)) tmp = Float64(Float64(y - x) * Float64(-6.0 * z)); else tmp = Float64(x + Float64(Float64(y - x) * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.56) || ~((z <= 0.68))) tmp = (y - x) * (-6.0 * z); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.56], N[Not[LessEqual[z, 0.68]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.56 \lor \neg \left(z \leq 0.68\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(-6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.56000000000000005 or 0.680000000000000049 < 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.6%
associate-*r*97.1%
Simplified97.1%
if -0.56000000000000005 < z < 0.680000000000000049Initial program 98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in z around 0 95.7%
Final simplification96.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -8500000000000.0) (not (<= x 7.8e-14))) (* x (+ -3.0 (* z 6.0))) (* y (+ 4.0 (* -6.0 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -8500000000000.0) || !(x <= 7.8e-14)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (-6.0 * z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-8500000000000.0d0)) .or. (.not. (x <= 7.8d-14))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = y * (4.0d0 + ((-6.0d0) * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -8500000000000.0) || !(x <= 7.8e-14)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (-6.0 * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -8500000000000.0) or not (x <= 7.8e-14): tmp = x * (-3.0 + (z * 6.0)) else: tmp = y * (4.0 + (-6.0 * z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -8500000000000.0) || !(x <= 7.8e-14)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(y * Float64(4.0 + Float64(-6.0 * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -8500000000000.0) || ~((x <= 7.8e-14))) tmp = x * (-3.0 + (z * 6.0)); else tmp = y * (4.0 + (-6.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -8500000000000.0], N[Not[LessEqual[x, 7.8e-14]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8500000000000 \lor \neg \left(x \leq 7.8 \cdot 10^{-14}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + -6 \cdot z\right)\\
\end{array}
\end{array}
if x < -8.5e12 or 7.7999999999999996e-14 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 80.8%
sub-neg80.8%
distribute-rgt-in80.8%
metadata-eval80.8%
distribute-lft-neg-in80.8%
associate-+r+80.8%
metadata-eval80.8%
distribute-rgt-neg-in80.8%
metadata-eval80.8%
Simplified80.8%
if -8.5e12 < x < 7.7999999999999996e-14Initial program 99.0%
+-commutative99.0%
associate-*l*99.1%
fma-define99.1%
sub-neg99.1%
distribute-rgt-in99.2%
metadata-eval99.2%
metadata-eval99.2%
distribute-lft-neg-out99.2%
distribute-rgt-neg-in99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 77.9%
Final simplification79.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -48000000000.0) (not (<= x 3.2e-15))) (* x (+ -3.0 (* z 6.0))) (* 6.0 (* y (- 0.6666666666666666 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -48000000000.0) || !(x <= 3.2e-15)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-48000000000.0d0)) .or. (.not. (x <= 3.2d-15))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -48000000000.0) || !(x <= 3.2e-15)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -48000000000.0) or not (x <= 3.2e-15): tmp = x * (-3.0 + (z * 6.0)) else: tmp = 6.0 * (y * (0.6666666666666666 - z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -48000000000.0) || !(x <= 3.2e-15)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -48000000000.0) || ~((x <= 3.2e-15))) tmp = x * (-3.0 + (z * 6.0)); else tmp = 6.0 * (y * (0.6666666666666666 - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -48000000000.0], N[Not[LessEqual[x, 3.2e-15]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -48000000000 \lor \neg \left(x \leq 3.2 \cdot 10^{-15}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\end{array}
\end{array}
if x < -4.8e10 or 3.1999999999999999e-15 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 80.8%
sub-neg80.8%
distribute-rgt-in80.8%
metadata-eval80.8%
distribute-lft-neg-in80.8%
associate-+r+80.8%
metadata-eval80.8%
distribute-rgt-neg-in80.8%
metadata-eval80.8%
Simplified80.8%
if -4.8e10 < x < 3.1999999999999999e-15Initial program 99.0%
metadata-eval99.0%
Simplified99.0%
+-commutative99.0%
*-commutative99.0%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 77.7%
Final simplification79.1%
(FPCore (x y z) :precision binary64 (if (or (<= x -8e-30) (not (<= x 1.02e-13))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -8e-30) || !(x <= 1.02e-13)) {
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 <= (-8d-30)) .or. (.not. (x <= 1.02d-13))) 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 <= -8e-30) || !(x <= 1.02e-13)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -8e-30) or not (x <= 1.02e-13): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -8e-30) || !(x <= 1.02e-13)) 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 <= -8e-30) || ~((x <= 1.02e-13))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -8e-30], N[Not[LessEqual[x, 1.02e-13]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-30} \lor \neg \left(x \leq 1.02 \cdot 10^{-13}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -8.000000000000001e-30 or 1.0199999999999999e-13 < x Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 77.3%
sub-neg77.3%
distribute-rgt-in77.3%
metadata-eval77.3%
distribute-lft-neg-in77.3%
associate-+r+77.4%
metadata-eval77.4%
distribute-rgt-neg-in77.4%
metadata-eval77.4%
Simplified77.4%
Taylor expanded in z around 0 37.9%
*-commutative37.9%
Simplified37.9%
if -8.000000000000001e-30 < x < 1.0199999999999999e-13Initial program 99.0%
metadata-eval99.0%
Simplified99.0%
+-commutative99.0%
*-commutative99.0%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 79.8%
Taylor expanded in z around 0 42.9%
*-commutative42.9%
Simplified42.9%
Final simplification40.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.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.2%
(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.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 48.9%
sub-neg48.9%
distribute-rgt-in48.9%
metadata-eval48.9%
distribute-lft-neg-in48.9%
associate-+r+48.9%
metadata-eval48.9%
distribute-rgt-neg-in48.9%
metadata-eval48.9%
Simplified48.9%
Taylor expanded in z around 0 23.8%
*-commutative23.8%
Simplified23.8%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 53.5%
associate-*r*53.1%
Simplified53.1%
Taylor expanded in x around inf 2.6%
herbie shell --seed 2024107
(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))))