
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (+ x (fma -6.0 (* z (- y x)) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + fma(-6.0, (z * (y - x)), ((y - x) * 4.0));
}
function code(x, y, z) return Float64(x + fma(-6.0, Float64(z * Float64(y - x)), Float64(Float64(y - x) * 4.0))) end
code[x_, y_, z_] := N[(x + N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \mathsf{fma}\left(-6, z \cdot \left(y - x\right), \left(y - x\right) \cdot 4\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-*l*99.5%
fma-def99.5%
metadata-eval99.5%
Simplified99.5%
flip--89.6%
associate-*r/84.3%
metadata-eval84.3%
pow284.3%
Applied egg-rr84.3%
*-commutative84.3%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in z around inf 99.7%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (fma (- y x) (* 6.0 (- 0.6666666666666666 z)) x))
double code(double x, double y, double z) {
return fma((y - x), (6.0 * (0.6666666666666666 - z)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(6.0 * Float64(0.6666666666666666 - z)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(6.0 * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 6 \cdot \left(0.6666666666666666 - z\right), x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-def99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))) (t_1 (* 6.0 (* x z))))
(if (<= z -8e+224)
t_0
(if (<= z -4e+209)
t_1
(if (<= z -0.112)
t_0
(if (<= z -1.3e-225)
(* x -3.0)
(if (<= z 2.9e-205)
(* y 4.0)
(if (<= z 1.9e-91)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (or (<= z 2.7e+114) (not (<= z 5.8e+251)))
t_1
t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -8e+224) {
tmp = t_0;
} else if (z <= -4e+209) {
tmp = t_1;
} else if (z <= -0.112) {
tmp = t_0;
} else if (z <= -1.3e-225) {
tmp = x * -3.0;
} else if (z <= 2.9e-205) {
tmp = y * 4.0;
} else if (z <= 1.9e-91) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 2.7e+114) || !(z <= 5.8e+251)) {
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) * (z * y)
t_1 = 6.0d0 * (x * z)
if (z <= (-8d+224)) then
tmp = t_0
else if (z <= (-4d+209)) then
tmp = t_1
else if (z <= (-0.112d0)) then
tmp = t_0
else if (z <= (-1.3d-225)) then
tmp = x * (-3.0d0)
else if (z <= 2.9d-205) then
tmp = y * 4.0d0
else if (z <= 1.9d-91) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if ((z <= 2.7d+114) .or. (.not. (z <= 5.8d+251))) 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 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -8e+224) {
tmp = t_0;
} else if (z <= -4e+209) {
tmp = t_1;
} else if (z <= -0.112) {
tmp = t_0;
} else if (z <= -1.3e-225) {
tmp = x * -3.0;
} else if (z <= 2.9e-205) {
tmp = y * 4.0;
} else if (z <= 1.9e-91) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 2.7e+114) || !(z <= 5.8e+251)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) t_1 = 6.0 * (x * z) tmp = 0 if z <= -8e+224: tmp = t_0 elif z <= -4e+209: tmp = t_1 elif z <= -0.112: tmp = t_0 elif z <= -1.3e-225: tmp = x * -3.0 elif z <= 2.9e-205: tmp = y * 4.0 elif z <= 1.9e-91: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif (z <= 2.7e+114) or not (z <= 5.8e+251): tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -8e+224) tmp = t_0; elseif (z <= -4e+209) tmp = t_1; elseif (z <= -0.112) tmp = t_0; elseif (z <= -1.3e-225) tmp = Float64(x * -3.0); elseif (z <= 2.9e-205) tmp = Float64(y * 4.0); elseif (z <= 1.9e-91) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif ((z <= 2.7e+114) || !(z <= 5.8e+251)) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -8e+224) tmp = t_0; elseif (z <= -4e+209) tmp = t_1; elseif (z <= -0.112) tmp = t_0; elseif (z <= -1.3e-225) tmp = x * -3.0; elseif (z <= 2.9e-205) tmp = y * 4.0; elseif (z <= 1.9e-91) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif ((z <= 2.7e+114) || ~((z <= 5.8e+251))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+224], t$95$0, If[LessEqual[z, -4e+209], t$95$1, If[LessEqual[z, -0.112], t$95$0, If[LessEqual[z, -1.3e-225], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.9e-205], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.9e-91], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[Or[LessEqual[z, 2.7e+114], N[Not[LessEqual[z, 5.8e+251]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+224}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.112:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-225}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-205}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-91}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+114} \lor \neg \left(z \leq 5.8 \cdot 10^{+251}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -7.99999999999999976e224 or -4.0000000000000003e209 < z < -0.112000000000000002 or 2.7e114 < z < 5.7999999999999999e251Initial program 99.8%
+-commutative99.8%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
distribute-rgt-neg-out99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 70.1%
Taylor expanded in z around inf 68.2%
if -7.99999999999999976e224 < z < -4.0000000000000003e209 or 0.650000000000000022 < z < 2.7e114 or 5.7999999999999999e251 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l*99.6%
fma-def99.6%
metadata-eval99.6%
Simplified99.6%
flip--85.7%
associate-*r/76.1%
metadata-eval76.1%
pow276.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in z around inf 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
neg-sub098.9%
associate--r-98.9%
neg-sub098.9%
neg-mul-198.9%
+-commutative98.9%
neg-mul-198.9%
sub-neg98.9%
Simplified98.9%
Taylor expanded in z around inf 99.0%
Taylor expanded in x around inf 73.7%
if -0.112000000000000002 < z < -1.30000000000000007e-225 or 2.90000000000000018e-205 < z < 1.89999999999999989e-91Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
distribute-lft-in67.2%
distribute-lft-in67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 65.1%
if -1.30000000000000007e-225 < z < 2.90000000000000018e-205 or 1.89999999999999989e-91 < z < 0.650000000000000022Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 63.1%
Taylor expanded in z around 0 62.1%
Final simplification67.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))) (t_1 (* 6.0 (* x z))))
(if (<= z -1e+225)
t_0
(if (<= z -3.6e+192)
t_1
(if (<= z -0.039)
t_0
(if (<= z -3.8e-230)
(* x -3.0)
(if (<= z 1.4e-204)
(* y 4.0)
(if (<= z 1e-92)
(* x -3.0)
(if (<= z 0.56)
(* y 4.0)
(if (<= z 2.9e+114)
t_1
(if (<= z 6.2e+249) t_0 (* x (* z 6.0)))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1e+225) {
tmp = t_0;
} else if (z <= -3.6e+192) {
tmp = t_1;
} else if (z <= -0.039) {
tmp = t_0;
} else if (z <= -3.8e-230) {
tmp = x * -3.0;
} else if (z <= 1.4e-204) {
tmp = y * 4.0;
} else if (z <= 1e-92) {
tmp = x * -3.0;
} else if (z <= 0.56) {
tmp = y * 4.0;
} else if (z <= 2.9e+114) {
tmp = t_1;
} else if (z <= 6.2e+249) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (z * y)
t_1 = 6.0d0 * (x * z)
if (z <= (-1d+225)) then
tmp = t_0
else if (z <= (-3.6d+192)) then
tmp = t_1
else if (z <= (-0.039d0)) then
tmp = t_0
else if (z <= (-3.8d-230)) then
tmp = x * (-3.0d0)
else if (z <= 1.4d-204) then
tmp = y * 4.0d0
else if (z <= 1d-92) then
tmp = x * (-3.0d0)
else if (z <= 0.56d0) then
tmp = y * 4.0d0
else if (z <= 2.9d+114) then
tmp = t_1
else if (z <= 6.2d+249) then
tmp = t_0
else
tmp = x * (z * 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1e+225) {
tmp = t_0;
} else if (z <= -3.6e+192) {
tmp = t_1;
} else if (z <= -0.039) {
tmp = t_0;
} else if (z <= -3.8e-230) {
tmp = x * -3.0;
} else if (z <= 1.4e-204) {
tmp = y * 4.0;
} else if (z <= 1e-92) {
tmp = x * -3.0;
} else if (z <= 0.56) {
tmp = y * 4.0;
} else if (z <= 2.9e+114) {
tmp = t_1;
} else if (z <= 6.2e+249) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) t_1 = 6.0 * (x * z) tmp = 0 if z <= -1e+225: tmp = t_0 elif z <= -3.6e+192: tmp = t_1 elif z <= -0.039: tmp = t_0 elif z <= -3.8e-230: tmp = x * -3.0 elif z <= 1.4e-204: tmp = y * 4.0 elif z <= 1e-92: tmp = x * -3.0 elif z <= 0.56: tmp = y * 4.0 elif z <= 2.9e+114: tmp = t_1 elif z <= 6.2e+249: tmp = t_0 else: tmp = x * (z * 6.0) return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1e+225) tmp = t_0; elseif (z <= -3.6e+192) tmp = t_1; elseif (z <= -0.039) tmp = t_0; elseif (z <= -3.8e-230) tmp = Float64(x * -3.0); elseif (z <= 1.4e-204) tmp = Float64(y * 4.0); elseif (z <= 1e-92) tmp = Float64(x * -3.0); elseif (z <= 0.56) tmp = Float64(y * 4.0); elseif (z <= 2.9e+114) tmp = t_1; elseif (z <= 6.2e+249) tmp = t_0; else tmp = Float64(x * Float64(z * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -1e+225) tmp = t_0; elseif (z <= -3.6e+192) tmp = t_1; elseif (z <= -0.039) tmp = t_0; elseif (z <= -3.8e-230) tmp = x * -3.0; elseif (z <= 1.4e-204) tmp = y * 4.0; elseif (z <= 1e-92) tmp = x * -3.0; elseif (z <= 0.56) tmp = y * 4.0; elseif (z <= 2.9e+114) tmp = t_1; elseif (z <= 6.2e+249) tmp = t_0; else tmp = x * (z * 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+225], t$95$0, If[LessEqual[z, -3.6e+192], t$95$1, If[LessEqual[z, -0.039], t$95$0, If[LessEqual[z, -3.8e-230], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.4e-204], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1e-92], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.56], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.9e+114], t$95$1, If[LessEqual[z, 6.2e+249], t$95$0, N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+225}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+192}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.039:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-230}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-204}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 10^{-92}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.56:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+249}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\end{array}
\end{array}
if z < -9.99999999999999928e224 or -3.6000000000000002e192 < z < -0.0389999999999999999 or 2.9e114 < z < 6.20000000000000031e249Initial program 99.8%
+-commutative99.8%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
distribute-rgt-neg-out99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 70.1%
Taylor expanded in z around inf 68.2%
if -9.99999999999999928e224 < z < -3.6000000000000002e192 or 0.56000000000000005 < z < 2.9e114Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-*l*99.6%
fma-def99.6%
metadata-eval99.6%
Simplified99.6%
flip--91.2%
associate-*r/78.0%
metadata-eval78.0%
pow278.0%
Applied egg-rr78.0%
*-commutative78.0%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in z around inf 98.6%
mul-1-neg98.6%
distribute-rgt-neg-in98.6%
neg-sub098.6%
associate--r-98.6%
neg-sub098.6%
neg-mul-198.6%
+-commutative98.6%
neg-mul-198.6%
sub-neg98.6%
Simplified98.6%
Taylor expanded in z around inf 98.7%
Taylor expanded in x around inf 69.5%
if -0.0389999999999999999 < z < -3.7999999999999998e-230 or 1.4e-204 < z < 9.99999999999999988e-93Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
distribute-lft-in67.2%
distribute-lft-in67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 65.1%
if -3.7999999999999998e-230 < z < 1.4e-204 or 9.99999999999999988e-93 < z < 0.56000000000000005Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 63.1%
Taylor expanded in z around 0 62.1%
if 6.20000000000000031e249 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 84.6%
sub-neg84.6%
distribute-rgt-in84.6%
metadata-eval84.6%
metadata-eval84.6%
neg-mul-184.6%
associate-*r*84.6%
*-commutative84.6%
distribute-lft-in84.6%
distribute-lft-in84.6%
associate-+r+84.6%
metadata-eval84.6%
metadata-eval84.6%
associate-*r*84.6%
metadata-eval84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 84.6%
*-commutative84.6%
Simplified84.6%
Final simplification67.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))) (t_1 (* 6.0 (* x z))))
(if (<= z -8.5e+225)
t_0
(if (<= z -2.7e+202)
t_1
(if (<= z -4.5)
(* y (* -6.0 z))
(if (<= z -7.8e-227)
(* x -3.0)
(if (<= z 2.5e-204)
(* y 4.0)
(if (<= z 1.2e-91)
(* x -3.0)
(if (<= z 0.5)
(* y 4.0)
(if (<= z 5e+114)
t_1
(if (<= z 6.7e+242) t_0 (* x (* z 6.0)))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -8.5e+225) {
tmp = t_0;
} else if (z <= -2.7e+202) {
tmp = t_1;
} else if (z <= -4.5) {
tmp = y * (-6.0 * z);
} else if (z <= -7.8e-227) {
tmp = x * -3.0;
} else if (z <= 2.5e-204) {
tmp = y * 4.0;
} else if (z <= 1.2e-91) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else if (z <= 5e+114) {
tmp = t_1;
} else if (z <= 6.7e+242) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (z * y)
t_1 = 6.0d0 * (x * z)
if (z <= (-8.5d+225)) then
tmp = t_0
else if (z <= (-2.7d+202)) then
tmp = t_1
else if (z <= (-4.5d0)) then
tmp = y * ((-6.0d0) * z)
else if (z <= (-7.8d-227)) then
tmp = x * (-3.0d0)
else if (z <= 2.5d-204) then
tmp = y * 4.0d0
else if (z <= 1.2d-91) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
else if (z <= 5d+114) then
tmp = t_1
else if (z <= 6.7d+242) then
tmp = t_0
else
tmp = x * (z * 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -8.5e+225) {
tmp = t_0;
} else if (z <= -2.7e+202) {
tmp = t_1;
} else if (z <= -4.5) {
tmp = y * (-6.0 * z);
} else if (z <= -7.8e-227) {
tmp = x * -3.0;
} else if (z <= 2.5e-204) {
tmp = y * 4.0;
} else if (z <= 1.2e-91) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else if (z <= 5e+114) {
tmp = t_1;
} else if (z <= 6.7e+242) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) t_1 = 6.0 * (x * z) tmp = 0 if z <= -8.5e+225: tmp = t_0 elif z <= -2.7e+202: tmp = t_1 elif z <= -4.5: tmp = y * (-6.0 * z) elif z <= -7.8e-227: tmp = x * -3.0 elif z <= 2.5e-204: tmp = y * 4.0 elif z <= 1.2e-91: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 elif z <= 5e+114: tmp = t_1 elif z <= 6.7e+242: tmp = t_0 else: tmp = x * (z * 6.0) return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -8.5e+225) tmp = t_0; elseif (z <= -2.7e+202) tmp = t_1; elseif (z <= -4.5) tmp = Float64(y * Float64(-6.0 * z)); elseif (z <= -7.8e-227) tmp = Float64(x * -3.0); elseif (z <= 2.5e-204) tmp = Float64(y * 4.0); elseif (z <= 1.2e-91) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); elseif (z <= 5e+114) tmp = t_1; elseif (z <= 6.7e+242) tmp = t_0; else tmp = Float64(x * Float64(z * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -8.5e+225) tmp = t_0; elseif (z <= -2.7e+202) tmp = t_1; elseif (z <= -4.5) tmp = y * (-6.0 * z); elseif (z <= -7.8e-227) tmp = x * -3.0; elseif (z <= 2.5e-204) tmp = y * 4.0; elseif (z <= 1.2e-91) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; elseif (z <= 5e+114) tmp = t_1; elseif (z <= 6.7e+242) tmp = t_0; else tmp = x * (z * 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+225], t$95$0, If[LessEqual[z, -2.7e+202], t$95$1, If[LessEqual[z, -4.5], N[(y * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-227], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.5e-204], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.2e-91], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5e+114], t$95$1, If[LessEqual[z, 6.7e+242], t$95$0, N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+225}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.5:\\
\;\;\;\;y \cdot \left(-6 \cdot z\right)\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-227}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-204}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-91}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.7 \cdot 10^{+242}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\end{array}
\end{array}
if z < -8.49999999999999947e225 or 5.0000000000000001e114 < z < 6.7e242Initial program 99.8%
+-commutative99.8%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
distribute-rgt-neg-out99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 74.2%
Taylor expanded in z around inf 74.2%
if -8.49999999999999947e225 < z < -2.69999999999999995e202 or 0.5 < z < 5.0000000000000001e114Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-*l*99.6%
fma-def99.6%
metadata-eval99.6%
Simplified99.6%
flip--91.2%
associate-*r/78.0%
metadata-eval78.0%
pow278.0%
Applied egg-rr78.0%
*-commutative78.0%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in z around inf 98.6%
mul-1-neg98.6%
distribute-rgt-neg-in98.6%
neg-sub098.6%
associate--r-98.6%
neg-sub098.6%
neg-mul-198.6%
+-commutative98.6%
neg-mul-198.6%
sub-neg98.6%
Simplified98.6%
Taylor expanded in z around inf 98.7%
Taylor expanded in x around inf 69.5%
if -2.69999999999999995e202 < z < -4.5Initial program 99.7%
+-commutative99.7%
associate-*l*99.6%
fma-def99.6%
sub-neg99.6%
+-commutative99.6%
distribute-lft-in99.7%
distribute-rgt-neg-out99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 64.3%
Taylor expanded in z around inf 59.4%
*-commutative59.4%
associate-*r*59.5%
*-commutative59.5%
Simplified59.5%
if -4.5 < z < -7.7999999999999999e-227 or 2.5000000000000001e-204 < z < 1.20000000000000005e-91Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
distribute-lft-in67.2%
distribute-lft-in67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 65.1%
if -7.7999999999999999e-227 < z < 2.5000000000000001e-204 or 1.20000000000000005e-91 < z < 0.5Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 63.1%
Taylor expanded in z around 0 62.1%
if 6.7e242 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 84.6%
sub-neg84.6%
distribute-rgt-in84.6%
metadata-eval84.6%
metadata-eval84.6%
neg-mul-184.6%
associate-*r*84.6%
*-commutative84.6%
distribute-lft-in84.6%
distribute-lft-in84.6%
associate-+r+84.6%
metadata-eval84.6%
metadata-eval84.6%
associate-*r*84.6%
metadata-eval84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 84.6%
*-commutative84.6%
Simplified84.6%
Final simplification67.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* -6.0 y))) (t_1 (* 6.0 (* x z))))
(if (<= z -4.9e+225)
(* -6.0 (* z y))
(if (<= z -3.1e+205)
t_1
(if (<= z -26.5)
t_0
(if (<= z -7.5e-231)
(* x -3.0)
(if (<= z 2.5e-205)
(* y 4.0)
(if (<= z 1.25e-91)
(* x -3.0)
(if (<= z 0.62)
(* y 4.0)
(if (<= z 2.6e+114)
t_1
(if (<= z 1.25e+250) t_0 (* x (* z 6.0)))))))))))))
double code(double x, double y, double z) {
double t_0 = z * (-6.0 * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -4.9e+225) {
tmp = -6.0 * (z * y);
} else if (z <= -3.1e+205) {
tmp = t_1;
} else if (z <= -26.5) {
tmp = t_0;
} else if (z <= -7.5e-231) {
tmp = x * -3.0;
} else if (z <= 2.5e-205) {
tmp = y * 4.0;
} else if (z <= 1.25e-91) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else if (z <= 2.6e+114) {
tmp = t_1;
} else if (z <= 1.25e+250) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = z * ((-6.0d0) * y)
t_1 = 6.0d0 * (x * z)
if (z <= (-4.9d+225)) then
tmp = (-6.0d0) * (z * y)
else if (z <= (-3.1d+205)) then
tmp = t_1
else if (z <= (-26.5d0)) then
tmp = t_0
else if (z <= (-7.5d-231)) then
tmp = x * (-3.0d0)
else if (z <= 2.5d-205) then
tmp = y * 4.0d0
else if (z <= 1.25d-91) then
tmp = x * (-3.0d0)
else if (z <= 0.62d0) then
tmp = y * 4.0d0
else if (z <= 2.6d+114) then
tmp = t_1
else if (z <= 1.25d+250) then
tmp = t_0
else
tmp = x * (z * 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (-6.0 * y);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -4.9e+225) {
tmp = -6.0 * (z * y);
} else if (z <= -3.1e+205) {
tmp = t_1;
} else if (z <= -26.5) {
tmp = t_0;
} else if (z <= -7.5e-231) {
tmp = x * -3.0;
} else if (z <= 2.5e-205) {
tmp = y * 4.0;
} else if (z <= 1.25e-91) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else if (z <= 2.6e+114) {
tmp = t_1;
} else if (z <= 1.25e+250) {
tmp = t_0;
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
def code(x, y, z): t_0 = z * (-6.0 * y) t_1 = 6.0 * (x * z) tmp = 0 if z <= -4.9e+225: tmp = -6.0 * (z * y) elif z <= -3.1e+205: tmp = t_1 elif z <= -26.5: tmp = t_0 elif z <= -7.5e-231: tmp = x * -3.0 elif z <= 2.5e-205: tmp = y * 4.0 elif z <= 1.25e-91: tmp = x * -3.0 elif z <= 0.62: tmp = y * 4.0 elif z <= 2.6e+114: tmp = t_1 elif z <= 1.25e+250: tmp = t_0 else: tmp = x * (z * 6.0) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(-6.0 * y)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -4.9e+225) tmp = Float64(-6.0 * Float64(z * y)); elseif (z <= -3.1e+205) tmp = t_1; elseif (z <= -26.5) tmp = t_0; elseif (z <= -7.5e-231) tmp = Float64(x * -3.0); elseif (z <= 2.5e-205) tmp = Float64(y * 4.0); elseif (z <= 1.25e-91) tmp = Float64(x * -3.0); elseif (z <= 0.62) tmp = Float64(y * 4.0); elseif (z <= 2.6e+114) tmp = t_1; elseif (z <= 1.25e+250) tmp = t_0; else tmp = Float64(x * Float64(z * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (-6.0 * y); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -4.9e+225) tmp = -6.0 * (z * y); elseif (z <= -3.1e+205) tmp = t_1; elseif (z <= -26.5) tmp = t_0; elseif (z <= -7.5e-231) tmp = x * -3.0; elseif (z <= 2.5e-205) tmp = y * 4.0; elseif (z <= 1.25e-91) tmp = x * -3.0; elseif (z <= 0.62) tmp = y * 4.0; elseif (z <= 2.6e+114) tmp = t_1; elseif (z <= 1.25e+250) tmp = t_0; else tmp = x * (z * 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.9e+225], N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e+205], t$95$1, If[LessEqual[z, -26.5], t$95$0, If[LessEqual[z, -7.5e-231], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.5e-205], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.25e-91], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.62], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.6e+114], t$95$1, If[LessEqual[z, 1.25e+250], t$95$0, N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-6 \cdot y\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -4.9 \cdot 10^{+225}:\\
\;\;\;\;-6 \cdot \left(z \cdot y\right)\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -26.5:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-231}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-205}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-91}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+250}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\end{array}
\end{array}
if z < -4.90000000000000032e225Initial program 99.7%
+-commutative99.7%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
+-commutative99.9%
distribute-lft-in99.9%
distribute-rgt-neg-out99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-def99.9%
metadata-eval99.9%
metadata-eval99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 73.8%
Taylor expanded in z around inf 73.9%
if -4.90000000000000032e225 < z < -3.10000000000000017e205 or 0.619999999999999996 < z < 2.6e114Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-*l*99.6%
fma-def99.6%
metadata-eval99.6%
Simplified99.6%
flip--91.2%
associate-*r/78.0%
metadata-eval78.0%
pow278.0%
Applied egg-rr78.0%
*-commutative78.0%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in z around inf 98.6%
mul-1-neg98.6%
distribute-rgt-neg-in98.6%
neg-sub098.6%
associate--r-98.6%
neg-sub098.6%
neg-mul-198.6%
+-commutative98.6%
neg-mul-198.6%
sub-neg98.6%
Simplified98.6%
Taylor expanded in z around inf 98.7%
Taylor expanded in x around inf 69.5%
if -3.10000000000000017e205 < z < -26.5 or 2.6e114 < z < 1.2500000000000001e250Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l*99.6%
fma-def99.7%
metadata-eval99.7%
Simplified99.7%
flip--80.8%
associate-*r/67.7%
metadata-eval67.7%
pow267.7%
Applied egg-rr67.7%
*-commutative67.7%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in z around inf 95.7%
mul-1-neg95.7%
distribute-rgt-neg-in95.7%
neg-sub095.7%
associate--r-95.7%
neg-sub095.7%
neg-mul-195.7%
+-commutative95.7%
neg-mul-195.7%
sub-neg95.7%
Simplified95.7%
Taylor expanded in z around inf 95.6%
Taylor expanded in x around 0 66.7%
*-commutative66.7%
*-commutative66.7%
associate-*l*66.8%
Simplified66.8%
if -26.5 < z < -7.5000000000000001e-231 or 2.5e-205 < z < 1.24999999999999999e-91Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
distribute-lft-in67.2%
distribute-lft-in67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 65.1%
if -7.5000000000000001e-231 < z < 2.5e-205 or 1.24999999999999999e-91 < z < 0.619999999999999996Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 63.1%
Taylor expanded in z around 0 62.1%
if 1.2500000000000001e250 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 84.6%
sub-neg84.6%
distribute-rgt-in84.6%
metadata-eval84.6%
metadata-eval84.6%
neg-mul-184.6%
associate-*r*84.6%
*-commutative84.6%
distribute-lft-in84.6%
distribute-lft-in84.6%
associate-+r+84.6%
metadata-eval84.6%
metadata-eval84.6%
associate-*r*84.6%
metadata-eval84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 84.6%
*-commutative84.6%
Simplified84.6%
Final simplification67.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z (- y x)))))
(if (<= z -0.024)
t_0
(if (<= z -2.6e-226)
(* x -3.0)
(if (<= z 1.76e-205)
(* y 4.0)
(if (<= z 7e-93) (* x -3.0) (if (<= z 0.56) (* y 4.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * (y - x));
double tmp;
if (z <= -0.024) {
tmp = t_0;
} else if (z <= -2.6e-226) {
tmp = x * -3.0;
} else if (z <= 1.76e-205) {
tmp = y * 4.0;
} else if (z <= 7e-93) {
tmp = x * -3.0;
} else if (z <= 0.56) {
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) * (z * (y - x))
if (z <= (-0.024d0)) then
tmp = t_0
else if (z <= (-2.6d-226)) then
tmp = x * (-3.0d0)
else if (z <= 1.76d-205) then
tmp = y * 4.0d0
else if (z <= 7d-93) then
tmp = x * (-3.0d0)
else if (z <= 0.56d0) 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 * (z * (y - x));
double tmp;
if (z <= -0.024) {
tmp = t_0;
} else if (z <= -2.6e-226) {
tmp = x * -3.0;
} else if (z <= 1.76e-205) {
tmp = y * 4.0;
} else if (z <= 7e-93) {
tmp = x * -3.0;
} else if (z <= 0.56) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * (y - x)) tmp = 0 if z <= -0.024: tmp = t_0 elif z <= -2.6e-226: tmp = x * -3.0 elif z <= 1.76e-205: tmp = y * 4.0 elif z <= 7e-93: tmp = x * -3.0 elif z <= 0.56: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * Float64(y - x))) tmp = 0.0 if (z <= -0.024) tmp = t_0; elseif (z <= -2.6e-226) tmp = Float64(x * -3.0); elseif (z <= 1.76e-205) tmp = Float64(y * 4.0); elseif (z <= 7e-93) tmp = Float64(x * -3.0); elseif (z <= 0.56) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * (y - x)); tmp = 0.0; if (z <= -0.024) tmp = t_0; elseif (z <= -2.6e-226) tmp = x * -3.0; elseif (z <= 1.76e-205) tmp = y * 4.0; elseif (z <= 7e-93) tmp = x * -3.0; elseif (z <= 0.56) 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[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.024], t$95$0, If[LessEqual[z, -2.6e-226], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.76e-205], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7e-93], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.56], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -0.024:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-226}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.76 \cdot 10^{-205}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-93}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.56:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.024 or 0.56000000000000005 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l*99.6%
fma-def99.7%
metadata-eval99.7%
Simplified99.7%
flip--80.9%
associate-*r/70.7%
metadata-eval70.7%
pow270.7%
Applied egg-rr70.7%
*-commutative70.7%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in z around inf 97.4%
if -0.024 < z < -2.5999999999999998e-226 or 1.7599999999999999e-205 < z < 7e-93Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
distribute-lft-in67.2%
distribute-lft-in67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 65.1%
if -2.5999999999999998e-226 < z < 1.7599999999999999e-205 or 7e-93 < z < 0.56000000000000005Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 63.1%
Taylor expanded in z around 0 62.1%
Final simplification81.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z (- y x)))))
(if (<= z -0.0022)
t_0
(if (<= z -4.7e-225)
(* x -3.0)
(if (<= z 9.6e-205)
(* y 4.0)
(if (<= z 4.8e-93)
(* x -3.0)
(if (<= z 32000000000.0)
(* 6.0 (* y (- 0.6666666666666666 z)))
t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * (y - x));
double tmp;
if (z <= -0.0022) {
tmp = t_0;
} else if (z <= -4.7e-225) {
tmp = x * -3.0;
} else if (z <= 9.6e-205) {
tmp = y * 4.0;
} else if (z <= 4.8e-93) {
tmp = x * -3.0;
} else if (z <= 32000000000.0) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (z * (y - x))
if (z <= (-0.0022d0)) then
tmp = t_0
else if (z <= (-4.7d-225)) then
tmp = x * (-3.0d0)
else if (z <= 9.6d-205) then
tmp = y * 4.0d0
else if (z <= 4.8d-93) then
tmp = x * (-3.0d0)
else if (z <= 32000000000.0d0) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (z * (y - x));
double tmp;
if (z <= -0.0022) {
tmp = t_0;
} else if (z <= -4.7e-225) {
tmp = x * -3.0;
} else if (z <= 9.6e-205) {
tmp = y * 4.0;
} else if (z <= 4.8e-93) {
tmp = x * -3.0;
} else if (z <= 32000000000.0) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * (y - x)) tmp = 0 if z <= -0.0022: tmp = t_0 elif z <= -4.7e-225: tmp = x * -3.0 elif z <= 9.6e-205: tmp = y * 4.0 elif z <= 4.8e-93: tmp = x * -3.0 elif z <= 32000000000.0: tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * Float64(y - x))) tmp = 0.0 if (z <= -0.0022) tmp = t_0; elseif (z <= -4.7e-225) tmp = Float64(x * -3.0); elseif (z <= 9.6e-205) tmp = Float64(y * 4.0); elseif (z <= 4.8e-93) tmp = Float64(x * -3.0); elseif (z <= 32000000000.0) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * (y - x)); tmp = 0.0; if (z <= -0.0022) tmp = t_0; elseif (z <= -4.7e-225) tmp = x * -3.0; elseif (z <= 9.6e-205) tmp = y * 4.0; elseif (z <= 4.8e-93) tmp = x * -3.0; elseif (z <= 32000000000.0) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0022], t$95$0, If[LessEqual[z, -4.7e-225], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 9.6e-205], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.8e-93], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 32000000000.0], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -0.0022:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-225}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-205}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-93}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 32000000000:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.00220000000000000013 or 3.2e10 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l*99.7%
fma-def99.7%
metadata-eval99.7%
Simplified99.7%
flip--80.7%
associate-*r/70.5%
metadata-eval70.5%
pow270.5%
Applied egg-rr70.5%
*-commutative70.5%
associate-/l*79.6%
Simplified79.6%
Taylor expanded in z around inf 97.5%
if -0.00220000000000000013 < z < -4.70000000000000014e-225 or 9.6000000000000007e-205 < z < 4.8000000000000002e-93Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
distribute-lft-in67.2%
distribute-lft-in67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 65.1%
if -4.70000000000000014e-225 < z < 9.6000000000000007e-205Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 63.3%
Taylor expanded in z around 0 63.3%
if 4.8000000000000002e-93 < z < 3.2e10Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 64.2%
*-commutative64.2%
Simplified64.2%
Final simplification81.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))))
(if (<= z -0.49)
t_0
(if (<= z -3e-222)
(* x -3.0)
(if (<= z 1.25e-205)
(* y 4.0)
(if (<= z 1.3e-92) (* x -3.0) (if (<= z 0.05) (* y 4.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double tmp;
if (z <= -0.49) {
tmp = t_0;
} else if (z <= -3e-222) {
tmp = x * -3.0;
} else if (z <= 1.25e-205) {
tmp = y * 4.0;
} else if (z <= 1.3e-92) {
tmp = x * -3.0;
} else if (z <= 0.05) {
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) * (z * y)
if (z <= (-0.49d0)) then
tmp = t_0
else if (z <= (-3d-222)) then
tmp = x * (-3.0d0)
else if (z <= 1.25d-205) then
tmp = y * 4.0d0
else if (z <= 1.3d-92) then
tmp = x * (-3.0d0)
else if (z <= 0.05d0) 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 * (z * y);
double tmp;
if (z <= -0.49) {
tmp = t_0;
} else if (z <= -3e-222) {
tmp = x * -3.0;
} else if (z <= 1.25e-205) {
tmp = y * 4.0;
} else if (z <= 1.3e-92) {
tmp = x * -3.0;
} else if (z <= 0.05) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) tmp = 0 if z <= -0.49: tmp = t_0 elif z <= -3e-222: tmp = x * -3.0 elif z <= 1.25e-205: tmp = y * 4.0 elif z <= 1.3e-92: tmp = x * -3.0 elif z <= 0.05: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) tmp = 0.0 if (z <= -0.49) tmp = t_0; elseif (z <= -3e-222) tmp = Float64(x * -3.0); elseif (z <= 1.25e-205) tmp = Float64(y * 4.0); elseif (z <= 1.3e-92) tmp = Float64(x * -3.0); elseif (z <= 0.05) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); tmp = 0.0; if (z <= -0.49) tmp = t_0; elseif (z <= -3e-222) tmp = x * -3.0; elseif (z <= 1.25e-205) tmp = y * 4.0; elseif (z <= 1.3e-92) tmp = x * -3.0; elseif (z <= 0.05) 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[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.49], t$95$0, If[LessEqual[z, -3e-222], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.25e-205], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.3e-92], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.05], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -0.49:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-222}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-205}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-92}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.05:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.48999999999999999 or 0.050000000000000003 < z Initial program 99.8%
+-commutative99.8%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
distribute-rgt-neg-out99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 55.9%
Taylor expanded in z around inf 54.5%
if -0.48999999999999999 < z < -3.0000000000000003e-222 or 1.25e-205 < z < 1.3e-92Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
distribute-lft-in67.2%
distribute-lft-in67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 65.1%
if -3.0000000000000003e-222 < z < 1.25e-205 or 1.3e-92 < z < 0.050000000000000003Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
+-commutative99.9%
distribute-lft-in99.9%
distribute-rgt-neg-out99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-def99.9%
metadata-eval99.9%
metadata-eval99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.3%
Taylor expanded in z around 0 64.3%
Final simplification59.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.1e+19) (not (<= y 2.8e-49))) (* 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.1e+19) || !(y <= 2.8e-49)) {
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.1d+19)) .or. (.not. (y <= 2.8d-49))) 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.1e+19) || !(y <= 2.8e-49)) {
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.1e+19) or not (y <= 2.8e-49): 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.1e+19) || !(y <= 2.8e-49)) 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.1e+19) || ~((y <= 2.8e-49))) 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.1e+19], N[Not[LessEqual[y, 2.8e-49]], $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.1 \cdot 10^{+19} \lor \neg \left(y \leq 2.8 \cdot 10^{-49}\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.1e19 or 2.79999999999999997e-49 < y Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 97.3%
Taylor expanded in y around inf 82.9%
*-commutative82.9%
Simplified82.9%
if -2.1e19 < y < 2.79999999999999997e-49Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 80.7%
sub-neg80.7%
distribute-rgt-in80.7%
metadata-eval80.7%
metadata-eval80.7%
neg-mul-180.7%
associate-*r*80.7%
*-commutative80.7%
distribute-lft-in80.7%
distribute-lft-in80.7%
associate-+r+80.7%
metadata-eval80.7%
metadata-eval80.7%
associate-*r*80.7%
metadata-eval80.7%
*-commutative80.7%
Simplified80.7%
Final simplification81.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.15e+18) (not (<= y 3.3e-51))) (* y (+ 4.0 (* -6.0 z))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.15e+18) || !(y <= 3.3e-51)) {
tmp = y * (4.0 + (-6.0 * z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-2.15d+18)) .or. (.not. (y <= 3.3d-51))) then
tmp = y * (4.0d0 + ((-6.0d0) * z))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.15e+18) || !(y <= 3.3e-51)) {
tmp = y * (4.0 + (-6.0 * z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.15e+18) or not (y <= 3.3e-51): tmp = y * (4.0 + (-6.0 * z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.15e+18) || !(y <= 3.3e-51)) tmp = Float64(y * Float64(4.0 + Float64(-6.0 * z))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.15e+18) || ~((y <= 3.3e-51))) tmp = y * (4.0 + (-6.0 * z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.15e+18], N[Not[LessEqual[y, 3.3e-51]], $MachinePrecision]], N[(y * N[(4.0 + N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+18} \lor \neg \left(y \leq 3.3 \cdot 10^{-51}\right):\\
\;\;\;\;y \cdot \left(4 + -6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -2.15e18 or 3.29999999999999973e-51 < y Initial program 99.7%
+-commutative99.7%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 83.1%
if -2.15e18 < y < 3.29999999999999973e-51Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 80.7%
sub-neg80.7%
distribute-rgt-in80.7%
metadata-eval80.7%
metadata-eval80.7%
neg-mul-180.7%
associate-*r*80.7%
*-commutative80.7%
distribute-lft-in80.7%
distribute-lft-in80.7%
associate-+r+80.7%
metadata-eval80.7%
metadata-eval80.7%
associate-*r*80.7%
metadata-eval80.7%
*-commutative80.7%
Simplified80.7%
Final simplification81.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.6) (not (<= z 0.6))) (* z (* 6.0 (- x y))) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.6)) {
tmp = 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.6d0)) .or. (.not. (z <= 0.6d0))) then
tmp = 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.6) || !(z <= 0.6)) {
tmp = z * (6.0 * (x - y));
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.6) or not (z <= 0.6): tmp = 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.6) || !(z <= 0.6)) tmp = 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.6) || ~((z <= 0.6))) tmp = 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.6], N[Not[LessEqual[z, 0.6]], $MachinePrecision]], N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6 \lor \neg \left(z \leq 0.6\right):\\
\;\;\;\;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.599999999999999978 or 0.599999999999999978 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l*99.6%
fma-def99.7%
metadata-eval99.7%
Simplified99.7%
flip--80.9%
associate-*r/70.7%
metadata-eval70.7%
pow270.7%
Applied egg-rr70.7%
*-commutative70.7%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in z around inf 97.4%
mul-1-neg97.4%
distribute-rgt-neg-in97.4%
neg-sub097.4%
associate--r-97.4%
neg-sub097.4%
neg-mul-197.4%
+-commutative97.4%
neg-mul-197.4%
sub-neg97.4%
Simplified97.4%
Taylor expanded in z around inf 97.4%
*-commutative97.4%
associate-*l*97.4%
Simplified97.4%
if -0.599999999999999978 < z < 0.599999999999999978Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 96.9%
Final simplification97.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.52))) (* z (* 6.0 (- x y))) (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.52)) {
tmp = z * (6.0 * (x - y));
} 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.52d0))) then
tmp = z * (6.0d0 * (x - y))
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.52)) {
tmp = z * (6.0 * (x - y));
} 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.52): tmp = z * (6.0 * (x - y)) else: tmp = (x * -3.0) + (y * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.52)) tmp = Float64(z * Float64(6.0 * Float64(x - y))); 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.52))) tmp = z * (6.0 * (x - y)); 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.52]], $MachinePrecision]], N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $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.52\right):\\
\;\;\;\;z \cdot \left(6 \cdot \left(x - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.52000000000000002 < z Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l*99.6%
fma-def99.7%
metadata-eval99.7%
Simplified99.7%
flip--80.9%
associate-*r/70.7%
metadata-eval70.7%
pow270.7%
Applied egg-rr70.7%
*-commutative70.7%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in z around inf 97.4%
mul-1-neg97.4%
distribute-rgt-neg-in97.4%
neg-sub097.4%
associate--r-97.4%
neg-sub097.4%
neg-mul-197.4%
+-commutative97.4%
neg-mul-197.4%
sub-neg97.4%
Simplified97.4%
Taylor expanded in z around inf 97.4%
*-commutative97.4%
associate-*l*97.4%
Simplified97.4%
if -0.57999999999999996 < z < 0.52000000000000002Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.6%
Taylor expanded in z around 0 96.9%
Final simplification97.2%
(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.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -11000000000.0) (not (<= x 5.4e-37))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -11000000000.0) || !(x <= 5.4e-37)) {
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 <= (-11000000000.0d0)) .or. (.not. (x <= 5.4d-37))) 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 <= -11000000000.0) || !(x <= 5.4e-37)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -11000000000.0) or not (x <= 5.4e-37): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -11000000000.0) || !(x <= 5.4e-37)) 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 <= -11000000000.0) || ~((x <= 5.4e-37))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -11000000000.0], N[Not[LessEqual[x, 5.4e-37]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -11000000000 \lor \neg \left(x \leq 5.4 \cdot 10^{-37}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -1.1e10 or 5.40000000000000032e-37 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 78.6%
sub-neg78.6%
distribute-rgt-in78.6%
metadata-eval78.6%
metadata-eval78.6%
neg-mul-178.6%
associate-*r*78.6%
*-commutative78.6%
distribute-lft-in78.6%
distribute-lft-in78.6%
associate-+r+78.6%
metadata-eval78.6%
metadata-eval78.6%
associate-*r*78.6%
metadata-eval78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in z around 0 40.6%
if -1.1e10 < x < 5.40000000000000032e-37Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around 0 38.5%
Final simplification39.6%
(FPCore (x y z) :precision binary64 (* x -3.0))
double code(double x, double y, double z) {
return x * -3.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-3.0d0)
end function
public static double code(double x, double y, double z) {
return x * -3.0;
}
def code(x, y, z): return x * -3.0
function code(x, y, z) return Float64(x * -3.0) end
function tmp = code(x, y, z) tmp = x * -3.0; end
code[x_, y_, z_] := N[(x * -3.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -3
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 51.0%
sub-neg51.0%
distribute-rgt-in51.0%
metadata-eval51.0%
metadata-eval51.0%
neg-mul-151.0%
associate-*r*51.0%
*-commutative51.0%
distribute-lft-in51.0%
distribute-lft-in51.0%
associate-+r+51.0%
metadata-eval51.0%
metadata-eval51.0%
associate-*r*51.0%
metadata-eval51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in z around 0 25.6%
Final simplification25.6%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-*l*99.5%
fma-def99.5%
metadata-eval99.5%
Simplified99.5%
flip--89.6%
associate-*r/84.3%
metadata-eval84.3%
pow284.3%
Applied egg-rr84.3%
*-commutative84.3%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in z around inf 52.3%
mul-1-neg52.3%
distribute-rgt-neg-in52.3%
neg-sub052.3%
associate--r-52.3%
neg-sub052.3%
neg-mul-152.3%
+-commutative52.3%
neg-mul-152.3%
sub-neg52.3%
Simplified52.3%
Taylor expanded in z around 0 2.5%
Final simplification2.5%
herbie shell --seed 2023320
(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))))