
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma (- y x) (fma z -6.0 4.0) x))
double code(double x, double y, double z) {
return fma((y - x), fma(z, -6.0, 4.0), x);
}
function code(x, y, z) return fma(Float64(y - x), fma(z, -6.0, 4.0), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(z * -6.0 + 4.0), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, \mathsf{fma}\left(z, -6, 4\right), x\right)
\end{array}
Initial 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%
distribute-lft-neg-in99.8%
*-commutative99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* y -6.0)))
(t_1 (* y (* z -6.0)))
(t_2 (* z (* x 6.0)))
(t_3 (* x (* z 6.0))))
(if (<= z -3.8e+237)
t_1
(if (<= z -1.3e+195)
t_3
(if (<= z -3.8e+167)
t_0
(if (<= z -4.8e+150)
t_2
(if (<= z -5.7e+113)
t_1
(if (<= z -1.05e+14)
t_2
(if (<= z -8.6e-55)
(* y 4.0)
(if (<= z -5.3e-214)
(* x -3.0)
(if (<= z 4.9e-298)
(* y 4.0)
(if (<= z 1.8e-168)
(* x -3.0)
(if (<= z 3.3e-124)
(* y 4.0)
(if (<= z 1.85e-45)
(* x -3.0)
(if (<= z 8.8e-9)
(* y 4.0)
(if (<= z 1.15e+184) t_0 t_3))))))))))))))))
double code(double x, double y, double z) {
double t_0 = z * (y * -6.0);
double t_1 = y * (z * -6.0);
double t_2 = z * (x * 6.0);
double t_3 = x * (z * 6.0);
double tmp;
if (z <= -3.8e+237) {
tmp = t_1;
} else if (z <= -1.3e+195) {
tmp = t_3;
} else if (z <= -3.8e+167) {
tmp = t_0;
} else if (z <= -4.8e+150) {
tmp = t_2;
} else if (z <= -5.7e+113) {
tmp = t_1;
} else if (z <= -1.05e+14) {
tmp = t_2;
} else if (z <= -8.6e-55) {
tmp = y * 4.0;
} else if (z <= -5.3e-214) {
tmp = x * -3.0;
} else if (z <= 4.9e-298) {
tmp = y * 4.0;
} else if (z <= 1.8e-168) {
tmp = x * -3.0;
} else if (z <= 3.3e-124) {
tmp = y * 4.0;
} else if (z <= 1.85e-45) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 1.15e+184) {
tmp = t_0;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = z * (y * (-6.0d0))
t_1 = y * (z * (-6.0d0))
t_2 = z * (x * 6.0d0)
t_3 = x * (z * 6.0d0)
if (z <= (-3.8d+237)) then
tmp = t_1
else if (z <= (-1.3d+195)) then
tmp = t_3
else if (z <= (-3.8d+167)) then
tmp = t_0
else if (z <= (-4.8d+150)) then
tmp = t_2
else if (z <= (-5.7d+113)) then
tmp = t_1
else if (z <= (-1.05d+14)) then
tmp = t_2
else if (z <= (-8.6d-55)) then
tmp = y * 4.0d0
else if (z <= (-5.3d-214)) then
tmp = x * (-3.0d0)
else if (z <= 4.9d-298) then
tmp = y * 4.0d0
else if (z <= 1.8d-168) then
tmp = x * (-3.0d0)
else if (z <= 3.3d-124) then
tmp = y * 4.0d0
else if (z <= 1.85d-45) then
tmp = x * (-3.0d0)
else if (z <= 8.8d-9) then
tmp = y * 4.0d0
else if (z <= 1.15d+184) then
tmp = t_0
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (y * -6.0);
double t_1 = y * (z * -6.0);
double t_2 = z * (x * 6.0);
double t_3 = x * (z * 6.0);
double tmp;
if (z <= -3.8e+237) {
tmp = t_1;
} else if (z <= -1.3e+195) {
tmp = t_3;
} else if (z <= -3.8e+167) {
tmp = t_0;
} else if (z <= -4.8e+150) {
tmp = t_2;
} else if (z <= -5.7e+113) {
tmp = t_1;
} else if (z <= -1.05e+14) {
tmp = t_2;
} else if (z <= -8.6e-55) {
tmp = y * 4.0;
} else if (z <= -5.3e-214) {
tmp = x * -3.0;
} else if (z <= 4.9e-298) {
tmp = y * 4.0;
} else if (z <= 1.8e-168) {
tmp = x * -3.0;
} else if (z <= 3.3e-124) {
tmp = y * 4.0;
} else if (z <= 1.85e-45) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 1.15e+184) {
tmp = t_0;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z): t_0 = z * (y * -6.0) t_1 = y * (z * -6.0) t_2 = z * (x * 6.0) t_3 = x * (z * 6.0) tmp = 0 if z <= -3.8e+237: tmp = t_1 elif z <= -1.3e+195: tmp = t_3 elif z <= -3.8e+167: tmp = t_0 elif z <= -4.8e+150: tmp = t_2 elif z <= -5.7e+113: tmp = t_1 elif z <= -1.05e+14: tmp = t_2 elif z <= -8.6e-55: tmp = y * 4.0 elif z <= -5.3e-214: tmp = x * -3.0 elif z <= 4.9e-298: tmp = y * 4.0 elif z <= 1.8e-168: tmp = x * -3.0 elif z <= 3.3e-124: tmp = y * 4.0 elif z <= 1.85e-45: tmp = x * -3.0 elif z <= 8.8e-9: tmp = y * 4.0 elif z <= 1.15e+184: tmp = t_0 else: tmp = t_3 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(y * -6.0)) t_1 = Float64(y * Float64(z * -6.0)) t_2 = Float64(z * Float64(x * 6.0)) t_3 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -3.8e+237) tmp = t_1; elseif (z <= -1.3e+195) tmp = t_3; elseif (z <= -3.8e+167) tmp = t_0; elseif (z <= -4.8e+150) tmp = t_2; elseif (z <= -5.7e+113) tmp = t_1; elseif (z <= -1.05e+14) tmp = t_2; elseif (z <= -8.6e-55) tmp = Float64(y * 4.0); elseif (z <= -5.3e-214) tmp = Float64(x * -3.0); elseif (z <= 4.9e-298) tmp = Float64(y * 4.0); elseif (z <= 1.8e-168) tmp = Float64(x * -3.0); elseif (z <= 3.3e-124) tmp = Float64(y * 4.0); elseif (z <= 1.85e-45) tmp = Float64(x * -3.0); elseif (z <= 8.8e-9) tmp = Float64(y * 4.0); elseif (z <= 1.15e+184) tmp = t_0; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (y * -6.0); t_1 = y * (z * -6.0); t_2 = z * (x * 6.0); t_3 = x * (z * 6.0); tmp = 0.0; if (z <= -3.8e+237) tmp = t_1; elseif (z <= -1.3e+195) tmp = t_3; elseif (z <= -3.8e+167) tmp = t_0; elseif (z <= -4.8e+150) tmp = t_2; elseif (z <= -5.7e+113) tmp = t_1; elseif (z <= -1.05e+14) tmp = t_2; elseif (z <= -8.6e-55) tmp = y * 4.0; elseif (z <= -5.3e-214) tmp = x * -3.0; elseif (z <= 4.9e-298) tmp = y * 4.0; elseif (z <= 1.8e-168) tmp = x * -3.0; elseif (z <= 3.3e-124) tmp = y * 4.0; elseif (z <= 1.85e-45) tmp = x * -3.0; elseif (z <= 8.8e-9) tmp = y * 4.0; elseif (z <= 1.15e+184) tmp = t_0; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+237], t$95$1, If[LessEqual[z, -1.3e+195], t$95$3, If[LessEqual[z, -3.8e+167], t$95$0, If[LessEqual[z, -4.8e+150], t$95$2, If[LessEqual[z, -5.7e+113], t$95$1, If[LessEqual[z, -1.05e+14], t$95$2, If[LessEqual[z, -8.6e-55], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -5.3e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.9e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.8e-168], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.3e-124], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.85e-45], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.8e-9], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.15e+184], t$95$0, t$95$3]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(y \cdot -6\right)\\
t_1 := y \cdot \left(z \cdot -6\right)\\
t_2 := z \cdot \left(x \cdot 6\right)\\
t_3 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+237}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+195}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+167}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-55}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-168}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-124}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-45}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-9}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+184}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -3.8e237 or -4.80000000000000005e150 < z < -5.6999999999999998e113Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
flip-+26.0%
div-inv25.9%
pow225.9%
pow225.9%
associate-*l*25.9%
associate-*l*26.0%
Applied egg-rr26.0%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around inf 79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in z around inf 79.1%
if -3.8e237 < z < -1.30000000000000001e195 or 1.15e184 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 64.7%
sub-neg64.7%
distribute-rgt-in64.7%
metadata-eval64.7%
metadata-eval64.7%
distribute-lft-neg-in64.7%
associate-+r+64.7%
metadata-eval64.7%
metadata-eval64.7%
distribute-rgt-neg-in64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in z around inf 64.7%
if -1.30000000000000001e195 < z < -3.79999999999999994e167 or 8.7999999999999994e-9 < z < 1.15e184Initial program 99.7%
+-commutative99.7%
associate-*l*99.6%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around -inf 99.7%
Taylor expanded in z around inf 87.6%
Taylor expanded in y around inf 56.6%
if -3.79999999999999994e167 < z < -4.80000000000000005e150 or -5.6999999999999998e113 < z < -1.05e14Initial program 99.8%
+-commutative99.8%
associate-*l*99.3%
fma-def99.4%
sub-neg99.4%
distribute-rgt-in99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-out99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around -inf 99.4%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around 0 74.1%
if -1.05e14 < z < -8.60000000000000021e-55 or -5.30000000000000005e-214 < z < 4.9e-298 or 1.7999999999999999e-168 < z < 3.29999999999999984e-124 or 1.85e-45 < z < 8.7999999999999994e-9Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
flip-+46.9%
div-inv46.8%
pow246.8%
pow246.8%
associate-*l*46.8%
associate-*l*46.9%
Applied egg-rr46.9%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around 0 67.1%
*-commutative67.1%
Simplified67.1%
if -8.60000000000000021e-55 < z < -5.30000000000000005e-214 or 4.9e-298 < z < 1.7999999999999999e-168 or 3.29999999999999984e-124 < z < 1.85e-45Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 73.7%
sub-neg73.7%
distribute-rgt-in73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-lft-neg-in73.7%
associate-+r+73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-rgt-neg-in73.7%
metadata-eval73.7%
Simplified73.7%
Taylor expanded in z around 0 73.7%
*-commutative73.7%
Simplified73.7%
Final simplification68.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -3.3e+237)
t_0
(if (<= z -1.02e+151)
t_1
(if (<= z -3e+105)
t_0
(if (<= z -1.05e+14)
t_1
(if (<= z -1.08e-54)
(* y 4.0)
(if (<= z -4.2e-214)
(* x -3.0)
(if (<= z 2.1e-298)
(* y 4.0)
(if (<= z 3.9e-168)
(* x -3.0)
(if (<= z 6.6e-116)
(* y 4.0)
(if (<= z 1.03e-44)
(* x -3.0)
(if (<= z 8.8e-9)
(* y 4.0)
(if (<= z 6e+183) t_0 t_1))))))))))))))
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 <= -3.3e+237) {
tmp = t_0;
} else if (z <= -1.02e+151) {
tmp = t_1;
} else if (z <= -3e+105) {
tmp = t_0;
} else if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -1.08e-54) {
tmp = y * 4.0;
} else if (z <= -4.2e-214) {
tmp = x * -3.0;
} else if (z <= 2.1e-298) {
tmp = y * 4.0;
} else if (z <= 3.9e-168) {
tmp = x * -3.0;
} else if (z <= 6.6e-116) {
tmp = y * 4.0;
} else if (z <= 1.03e-44) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 6e+183) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = x * (z * 6.0d0)
if (z <= (-3.3d+237)) then
tmp = t_0
else if (z <= (-1.02d+151)) then
tmp = t_1
else if (z <= (-3d+105)) then
tmp = t_0
else if (z <= (-1.05d+14)) then
tmp = t_1
else if (z <= (-1.08d-54)) then
tmp = y * 4.0d0
else if (z <= (-4.2d-214)) then
tmp = x * (-3.0d0)
else if (z <= 2.1d-298) then
tmp = y * 4.0d0
else if (z <= 3.9d-168) then
tmp = x * (-3.0d0)
else if (z <= 6.6d-116) then
tmp = y * 4.0d0
else if (z <= 1.03d-44) then
tmp = x * (-3.0d0)
else if (z <= 8.8d-9) then
tmp = y * 4.0d0
else if (z <= 6d+183) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -3.3e+237) {
tmp = t_0;
} else if (z <= -1.02e+151) {
tmp = t_1;
} else if (z <= -3e+105) {
tmp = t_0;
} else if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -1.08e-54) {
tmp = y * 4.0;
} else if (z <= -4.2e-214) {
tmp = x * -3.0;
} else if (z <= 2.1e-298) {
tmp = y * 4.0;
} else if (z <= 3.9e-168) {
tmp = x * -3.0;
} else if (z <= 6.6e-116) {
tmp = y * 4.0;
} else if (z <= 1.03e-44) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 6e+183) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -3.3e+237: tmp = t_0 elif z <= -1.02e+151: tmp = t_1 elif z <= -3e+105: tmp = t_0 elif z <= -1.05e+14: tmp = t_1 elif z <= -1.08e-54: tmp = y * 4.0 elif z <= -4.2e-214: tmp = x * -3.0 elif z <= 2.1e-298: tmp = y * 4.0 elif z <= 3.9e-168: tmp = x * -3.0 elif z <= 6.6e-116: tmp = y * 4.0 elif z <= 1.03e-44: tmp = x * -3.0 elif z <= 8.8e-9: tmp = y * 4.0 elif z <= 6e+183: tmp = t_0 else: tmp = t_1 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 <= -3.3e+237) tmp = t_0; elseif (z <= -1.02e+151) tmp = t_1; elseif (z <= -3e+105) tmp = t_0; elseif (z <= -1.05e+14) tmp = t_1; elseif (z <= -1.08e-54) tmp = Float64(y * 4.0); elseif (z <= -4.2e-214) tmp = Float64(x * -3.0); elseif (z <= 2.1e-298) tmp = Float64(y * 4.0); elseif (z <= 3.9e-168) tmp = Float64(x * -3.0); elseif (z <= 6.6e-116) tmp = Float64(y * 4.0); elseif (z <= 1.03e-44) tmp = Float64(x * -3.0); elseif (z <= 8.8e-9) tmp = Float64(y * 4.0); elseif (z <= 6e+183) tmp = t_0; else tmp = t_1; 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 <= -3.3e+237) tmp = t_0; elseif (z <= -1.02e+151) tmp = t_1; elseif (z <= -3e+105) tmp = t_0; elseif (z <= -1.05e+14) tmp = t_1; elseif (z <= -1.08e-54) tmp = y * 4.0; elseif (z <= -4.2e-214) tmp = x * -3.0; elseif (z <= 2.1e-298) tmp = y * 4.0; elseif (z <= 3.9e-168) tmp = x * -3.0; elseif (z <= 6.6e-116) tmp = y * 4.0; elseif (z <= 1.03e-44) tmp = x * -3.0; elseif (z <= 8.8e-9) tmp = y * 4.0; elseif (z <= 6e+183) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+237], t$95$0, If[LessEqual[z, -1.02e+151], t$95$1, If[LessEqual[z, -3e+105], t$95$0, If[LessEqual[z, -1.05e+14], t$95$1, If[LessEqual[z, -1.08e-54], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -4.2e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.1e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.9e-168], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.6e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.03e-44], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.8e-9], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6e+183], t$95$0, t$95$1]]]]]]]]]]]]]]
\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 -3.3 \cdot 10^{+237}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+105}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{-54}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-168}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.03 \cdot 10^{-44}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-9}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+183}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.3000000000000001e237 or -1.02000000000000002e151 < z < -3.0000000000000001e105 or 8.7999999999999994e-9 < z < 5.99999999999999992e183Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+21.5%
div-inv21.4%
pow221.4%
pow221.4%
associate-*l*21.3%
associate-*l*21.4%
Applied egg-rr21.4%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in z around inf 62.9%
if -3.3000000000000001e237 < z < -1.02000000000000002e151 or -3.0000000000000001e105 < z < -1.05e14 or 5.99999999999999992e183 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 64.0%
sub-neg64.0%
distribute-rgt-in64.0%
metadata-eval64.0%
metadata-eval64.0%
distribute-lft-neg-in64.0%
associate-+r+64.0%
metadata-eval64.0%
metadata-eval64.0%
distribute-rgt-neg-in64.0%
metadata-eval64.0%
Simplified64.0%
Taylor expanded in z around inf 64.0%
if -1.05e14 < z < -1.08000000000000002e-54 or -4.19999999999999984e-214 < z < 2.10000000000000005e-298 or 3.90000000000000012e-168 < z < 6.60000000000000002e-116 or 1.03e-44 < z < 8.7999999999999994e-9Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
flip-+46.9%
div-inv46.8%
pow246.8%
pow246.8%
associate-*l*46.8%
associate-*l*46.9%
Applied egg-rr46.9%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around 0 67.1%
*-commutative67.1%
Simplified67.1%
if -1.08000000000000002e-54 < z < -4.19999999999999984e-214 or 2.10000000000000005e-298 < z < 3.90000000000000012e-168 or 6.60000000000000002e-116 < z < 1.03e-44Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 73.7%
sub-neg73.7%
distribute-rgt-in73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-lft-neg-in73.7%
associate-+r+73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-rgt-neg-in73.7%
metadata-eval73.7%
Simplified73.7%
Taylor expanded in z around 0 73.7%
*-commutative73.7%
Simplified73.7%
Final simplification67.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (* z -6.0))) (t_1 (* x (* z 6.0))))
(if (<= z -2.85e+237)
t_0
(if (<= z -7.8e+148)
t_1
(if (<= z -7.1e+106)
t_0
(if (<= z -1.05e+14)
t_1
(if (<= z -3.5e-54)
(* y 4.0)
(if (<= z -6e-214)
(* x -3.0)
(if (<= z 1.35e-296)
(* y 4.0)
(if (<= z 7.6e-167)
(* x -3.0)
(if (<= z 4.5e-119)
(* y 4.0)
(if (<= z 1.3e-48)
(* x -3.0)
(if (<= z 8.8e-9)
(* y 4.0)
(if (<= z 8e+185) t_0 t_1))))))))))))))
double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -2.85e+237) {
tmp = t_0;
} else if (z <= -7.8e+148) {
tmp = t_1;
} else if (z <= -7.1e+106) {
tmp = t_0;
} else if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -3.5e-54) {
tmp = y * 4.0;
} else if (z <= -6e-214) {
tmp = x * -3.0;
} else if (z <= 1.35e-296) {
tmp = y * 4.0;
} else if (z <= 7.6e-167) {
tmp = x * -3.0;
} else if (z <= 4.5e-119) {
tmp = y * 4.0;
} else if (z <= 1.3e-48) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 8e+185) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * (z * (-6.0d0))
t_1 = x * (z * 6.0d0)
if (z <= (-2.85d+237)) then
tmp = t_0
else if (z <= (-7.8d+148)) then
tmp = t_1
else if (z <= (-7.1d+106)) then
tmp = t_0
else if (z <= (-1.05d+14)) then
tmp = t_1
else if (z <= (-3.5d-54)) then
tmp = y * 4.0d0
else if (z <= (-6d-214)) then
tmp = x * (-3.0d0)
else if (z <= 1.35d-296) then
tmp = y * 4.0d0
else if (z <= 7.6d-167) then
tmp = x * (-3.0d0)
else if (z <= 4.5d-119) then
tmp = y * 4.0d0
else if (z <= 1.3d-48) then
tmp = x * (-3.0d0)
else if (z <= 8.8d-9) then
tmp = y * 4.0d0
else if (z <= 8d+185) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -2.85e+237) {
tmp = t_0;
} else if (z <= -7.8e+148) {
tmp = t_1;
} else if (z <= -7.1e+106) {
tmp = t_0;
} else if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -3.5e-54) {
tmp = y * 4.0;
} else if (z <= -6e-214) {
tmp = x * -3.0;
} else if (z <= 1.35e-296) {
tmp = y * 4.0;
} else if (z <= 7.6e-167) {
tmp = x * -3.0;
} else if (z <= 4.5e-119) {
tmp = y * 4.0;
} else if (z <= 1.3e-48) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 8e+185) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y * (z * -6.0) t_1 = x * (z * 6.0) tmp = 0 if z <= -2.85e+237: tmp = t_0 elif z <= -7.8e+148: tmp = t_1 elif z <= -7.1e+106: tmp = t_0 elif z <= -1.05e+14: tmp = t_1 elif z <= -3.5e-54: tmp = y * 4.0 elif z <= -6e-214: tmp = x * -3.0 elif z <= 1.35e-296: tmp = y * 4.0 elif z <= 7.6e-167: tmp = x * -3.0 elif z <= 4.5e-119: tmp = y * 4.0 elif z <= 1.3e-48: tmp = x * -3.0 elif z <= 8.8e-9: tmp = y * 4.0 elif z <= 8e+185: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(z * -6.0)) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -2.85e+237) tmp = t_0; elseif (z <= -7.8e+148) tmp = t_1; elseif (z <= -7.1e+106) tmp = t_0; elseif (z <= -1.05e+14) tmp = t_1; elseif (z <= -3.5e-54) tmp = Float64(y * 4.0); elseif (z <= -6e-214) tmp = Float64(x * -3.0); elseif (z <= 1.35e-296) tmp = Float64(y * 4.0); elseif (z <= 7.6e-167) tmp = Float64(x * -3.0); elseif (z <= 4.5e-119) tmp = Float64(y * 4.0); elseif (z <= 1.3e-48) tmp = Float64(x * -3.0); elseif (z <= 8.8e-9) tmp = Float64(y * 4.0); elseif (z <= 8e+185) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (z * -6.0); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -2.85e+237) tmp = t_0; elseif (z <= -7.8e+148) tmp = t_1; elseif (z <= -7.1e+106) tmp = t_0; elseif (z <= -1.05e+14) tmp = t_1; elseif (z <= -3.5e-54) tmp = y * 4.0; elseif (z <= -6e-214) tmp = x * -3.0; elseif (z <= 1.35e-296) tmp = y * 4.0; elseif (z <= 7.6e-167) tmp = x * -3.0; elseif (z <= 4.5e-119) tmp = y * 4.0; elseif (z <= 1.3e-48) tmp = x * -3.0; elseif (z <= 8.8e-9) tmp = y * 4.0; elseif (z <= 8e+185) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e+237], t$95$0, If[LessEqual[z, -7.8e+148], t$95$1, If[LessEqual[z, -7.1e+106], t$95$0, If[LessEqual[z, -1.05e+14], t$95$1, If[LessEqual[z, -3.5e-54], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -6e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.35e-296], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.6e-167], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.5e-119], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.3e-48], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.8e-9], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8e+185], t$95$0, t$95$1]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(z \cdot -6\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -2.85 \cdot 10^{+237}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.1 \cdot 10^{+106}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-54}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-296}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-167}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-119}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-48}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-9}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+185}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.84999999999999997e237 or -7.80000000000000004e148 < z < -7.1000000000000003e106 or 8.7999999999999994e-9 < z < 7.9999999999999998e185Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+21.5%
div-inv21.4%
pow221.4%
pow221.4%
associate-*l*21.3%
associate-*l*21.4%
Applied egg-rr21.4%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in z around inf 63.0%
if -2.84999999999999997e237 < z < -7.80000000000000004e148 or -7.1000000000000003e106 < z < -1.05e14 or 7.9999999999999998e185 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 64.0%
sub-neg64.0%
distribute-rgt-in64.0%
metadata-eval64.0%
metadata-eval64.0%
distribute-lft-neg-in64.0%
associate-+r+64.0%
metadata-eval64.0%
metadata-eval64.0%
distribute-rgt-neg-in64.0%
metadata-eval64.0%
Simplified64.0%
Taylor expanded in z around inf 64.0%
if -1.05e14 < z < -3.49999999999999982e-54 or -5.99999999999999989e-214 < z < 1.34999999999999999e-296 or 7.59999999999999934e-167 < z < 4.5000000000000003e-119 or 1.29999999999999994e-48 < z < 8.7999999999999994e-9Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
flip-+46.9%
div-inv46.8%
pow246.8%
pow246.8%
associate-*l*46.8%
associate-*l*46.9%
Applied egg-rr46.9%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around 0 67.1%
*-commutative67.1%
Simplified67.1%
if -3.49999999999999982e-54 < z < -5.99999999999999989e-214 or 1.34999999999999999e-296 < z < 7.59999999999999934e-167 or 4.5000000000000003e-119 < z < 1.29999999999999994e-48Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 73.7%
sub-neg73.7%
distribute-rgt-in73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-lft-neg-in73.7%
associate-+r+73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-rgt-neg-in73.7%
metadata-eval73.7%
Simplified73.7%
Taylor expanded in z around 0 73.7%
*-commutative73.7%
Simplified73.7%
Final simplification67.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (* z -6.0))) (t_1 (* x (* z 6.0))))
(if (<= z -1.5e+237)
t_0
(if (<= z -4.9e+150)
t_1
(if (<= z -4.5e+93)
t_0
(if (<= z -1.05e+14)
t_1
(if (<= z -4e-55)
(* y 4.0)
(if (<= z -3.1e-214)
(* x -3.0)
(if (<= z 2.1e-297)
(* y 4.0)
(if (<= z 1.45e-166)
(* x -3.0)
(if (<= z 3.2e-123)
(* y 4.0)
(if (<= z 1.45e-47)
(* x -3.0)
(if (<= z 8.8e-9)
(* y 4.0)
(if (<= z 3.1e+184) (* z (* y -6.0)) t_1))))))))))))))
double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -1.5e+237) {
tmp = t_0;
} else if (z <= -4.9e+150) {
tmp = t_1;
} else if (z <= -4.5e+93) {
tmp = t_0;
} else if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -4e-55) {
tmp = y * 4.0;
} else if (z <= -3.1e-214) {
tmp = x * -3.0;
} else if (z <= 2.1e-297) {
tmp = y * 4.0;
} else if (z <= 1.45e-166) {
tmp = x * -3.0;
} else if (z <= 3.2e-123) {
tmp = y * 4.0;
} else if (z <= 1.45e-47) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 3.1e+184) {
tmp = z * (y * -6.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * (z * (-6.0d0))
t_1 = x * (z * 6.0d0)
if (z <= (-1.5d+237)) then
tmp = t_0
else if (z <= (-4.9d+150)) then
tmp = t_1
else if (z <= (-4.5d+93)) then
tmp = t_0
else if (z <= (-1.05d+14)) then
tmp = t_1
else if (z <= (-4d-55)) then
tmp = y * 4.0d0
else if (z <= (-3.1d-214)) then
tmp = x * (-3.0d0)
else if (z <= 2.1d-297) then
tmp = y * 4.0d0
else if (z <= 1.45d-166) then
tmp = x * (-3.0d0)
else if (z <= 3.2d-123) then
tmp = y * 4.0d0
else if (z <= 1.45d-47) then
tmp = x * (-3.0d0)
else if (z <= 8.8d-9) then
tmp = y * 4.0d0
else if (z <= 3.1d+184) then
tmp = z * (y * (-6.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -1.5e+237) {
tmp = t_0;
} else if (z <= -4.9e+150) {
tmp = t_1;
} else if (z <= -4.5e+93) {
tmp = t_0;
} else if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -4e-55) {
tmp = y * 4.0;
} else if (z <= -3.1e-214) {
tmp = x * -3.0;
} else if (z <= 2.1e-297) {
tmp = y * 4.0;
} else if (z <= 1.45e-166) {
tmp = x * -3.0;
} else if (z <= 3.2e-123) {
tmp = y * 4.0;
} else if (z <= 1.45e-47) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
tmp = y * 4.0;
} else if (z <= 3.1e+184) {
tmp = z * (y * -6.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y * (z * -6.0) t_1 = x * (z * 6.0) tmp = 0 if z <= -1.5e+237: tmp = t_0 elif z <= -4.9e+150: tmp = t_1 elif z <= -4.5e+93: tmp = t_0 elif z <= -1.05e+14: tmp = t_1 elif z <= -4e-55: tmp = y * 4.0 elif z <= -3.1e-214: tmp = x * -3.0 elif z <= 2.1e-297: tmp = y * 4.0 elif z <= 1.45e-166: tmp = x * -3.0 elif z <= 3.2e-123: tmp = y * 4.0 elif z <= 1.45e-47: tmp = x * -3.0 elif z <= 8.8e-9: tmp = y * 4.0 elif z <= 3.1e+184: tmp = z * (y * -6.0) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(z * -6.0)) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -1.5e+237) tmp = t_0; elseif (z <= -4.9e+150) tmp = t_1; elseif (z <= -4.5e+93) tmp = t_0; elseif (z <= -1.05e+14) tmp = t_1; elseif (z <= -4e-55) tmp = Float64(y * 4.0); elseif (z <= -3.1e-214) tmp = Float64(x * -3.0); elseif (z <= 2.1e-297) tmp = Float64(y * 4.0); elseif (z <= 1.45e-166) tmp = Float64(x * -3.0); elseif (z <= 3.2e-123) tmp = Float64(y * 4.0); elseif (z <= 1.45e-47) tmp = Float64(x * -3.0); elseif (z <= 8.8e-9) tmp = Float64(y * 4.0); elseif (z <= 3.1e+184) tmp = Float64(z * Float64(y * -6.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (z * -6.0); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -1.5e+237) tmp = t_0; elseif (z <= -4.9e+150) tmp = t_1; elseif (z <= -4.5e+93) tmp = t_0; elseif (z <= -1.05e+14) tmp = t_1; elseif (z <= -4e-55) tmp = y * 4.0; elseif (z <= -3.1e-214) tmp = x * -3.0; elseif (z <= 2.1e-297) tmp = y * 4.0; elseif (z <= 1.45e-166) tmp = x * -3.0; elseif (z <= 3.2e-123) tmp = y * 4.0; elseif (z <= 1.45e-47) tmp = x * -3.0; elseif (z <= 8.8e-9) tmp = y * 4.0; elseif (z <= 3.1e+184) tmp = z * (y * -6.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+237], t$95$0, If[LessEqual[z, -4.9e+150], t$95$1, If[LessEqual[z, -4.5e+93], t$95$0, If[LessEqual[z, -1.05e+14], t$95$1, If[LessEqual[z, -4e-55], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.1e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.1e-297], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.45e-166], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.2e-123], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.45e-47], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.8e-9], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.1e+184], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(z \cdot -6\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+237}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-55}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-297}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-166}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-123}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-47}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-9}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+184}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5e237 or -4.90000000000000007e150 < z < -4.49999999999999991e93Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
flip-+26.0%
div-inv25.9%
pow225.9%
pow225.9%
associate-*l*25.9%
associate-*l*26.0%
Applied egg-rr26.0%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around inf 79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in z around inf 79.1%
if -1.5e237 < z < -4.90000000000000007e150 or -4.49999999999999991e93 < z < -1.05e14 or 3.0999999999999998e184 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 64.0%
sub-neg64.0%
distribute-rgt-in64.0%
metadata-eval64.0%
metadata-eval64.0%
distribute-lft-neg-in64.0%
associate-+r+64.0%
metadata-eval64.0%
metadata-eval64.0%
distribute-rgt-neg-in64.0%
metadata-eval64.0%
Simplified64.0%
Taylor expanded in z around inf 64.0%
if -1.05e14 < z < -3.99999999999999998e-55 or -3.10000000000000004e-214 < z < 2.10000000000000013e-297 or 1.45e-166 < z < 3.19999999999999979e-123 or 1.45e-47 < z < 8.7999999999999994e-9Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
flip-+46.9%
div-inv46.8%
pow246.8%
pow246.8%
associate-*l*46.8%
associate-*l*46.9%
Applied egg-rr46.9%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around 0 67.1%
*-commutative67.1%
Simplified67.1%
if -3.99999999999999998e-55 < z < -3.10000000000000004e-214 or 2.10000000000000013e-297 < z < 1.45e-166 or 3.19999999999999979e-123 < z < 1.45e-47Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 73.7%
sub-neg73.7%
distribute-rgt-in73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-lft-neg-in73.7%
associate-+r+73.7%
metadata-eval73.7%
metadata-eval73.7%
distribute-rgt-neg-in73.7%
metadata-eval73.7%
Simplified73.7%
Taylor expanded in z around 0 73.7%
*-commutative73.7%
Simplified73.7%
if 8.7999999999999994e-9 < z < 3.0999999999999998e184Initial program 99.7%
+-commutative99.7%
associate-*l*99.6%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around -inf 99.7%
Taylor expanded in z around inf 85.6%
Taylor expanded in y around inf 52.0%
Final simplification67.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z))))
(t_1 (* -6.0 (* (- y x) z))))
(if (<= z -1.05e+14)
t_1
(if (<= z -1.8e-83)
t_0
(if (<= z -5.3e-214)
(* x -3.0)
(if (<= z 6e-297)
(* y 4.0)
(if (<= z 6.3e-168)
(* x -3.0)
(if (<= z 1.8e-126)
(* y 4.0)
(if (<= z 6.3e-50)
(* x -3.0)
(if (<= z 12500000.0) t_0 t_1))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -1.8e-83) {
tmp = t_0;
} else if (z <= -5.3e-214) {
tmp = x * -3.0;
} else if (z <= 6e-297) {
tmp = y * 4.0;
} else if (z <= 6.3e-168) {
tmp = x * -3.0;
} else if (z <= 1.8e-126) {
tmp = y * 4.0;
} else if (z <= 6.3e-50) {
tmp = x * -3.0;
} else if (z <= 12500000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * (y * (0.6666666666666666d0 - z))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-1.05d+14)) then
tmp = t_1
else if (z <= (-1.8d-83)) then
tmp = t_0
else if (z <= (-5.3d-214)) then
tmp = x * (-3.0d0)
else if (z <= 6d-297) then
tmp = y * 4.0d0
else if (z <= 6.3d-168) then
tmp = x * (-3.0d0)
else if (z <= 1.8d-126) then
tmp = y * 4.0d0
else if (z <= 6.3d-50) then
tmp = x * (-3.0d0)
else if (z <= 12500000.0d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -1.8e-83) {
tmp = t_0;
} else if (z <= -5.3e-214) {
tmp = x * -3.0;
} else if (z <= 6e-297) {
tmp = y * 4.0;
} else if (z <= 6.3e-168) {
tmp = x * -3.0;
} else if (z <= 1.8e-126) {
tmp = y * 4.0;
} else if (z <= 6.3e-50) {
tmp = x * -3.0;
} else if (z <= 12500000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -1.05e+14: tmp = t_1 elif z <= -1.8e-83: tmp = t_0 elif z <= -5.3e-214: tmp = x * -3.0 elif z <= 6e-297: tmp = y * 4.0 elif z <= 6.3e-168: tmp = x * -3.0 elif z <= 1.8e-126: tmp = y * 4.0 elif z <= 6.3e-50: tmp = x * -3.0 elif z <= 12500000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -1.05e+14) tmp = t_1; elseif (z <= -1.8e-83) tmp = t_0; elseif (z <= -5.3e-214) tmp = Float64(x * -3.0); elseif (z <= 6e-297) tmp = Float64(y * 4.0); elseif (z <= 6.3e-168) tmp = Float64(x * -3.0); elseif (z <= 1.8e-126) tmp = Float64(y * 4.0); elseif (z <= 6.3e-50) tmp = Float64(x * -3.0); elseif (z <= 12500000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -1.05e+14) tmp = t_1; elseif (z <= -1.8e-83) tmp = t_0; elseif (z <= -5.3e-214) tmp = x * -3.0; elseif (z <= 6e-297) tmp = y * 4.0; elseif (z <= 6.3e-168) tmp = x * -3.0; elseif (z <= 1.8e-126) tmp = y * 4.0; elseif (z <= 6.3e-50) tmp = x * -3.0; elseif (z <= 12500000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+14], t$95$1, If[LessEqual[z, -1.8e-83], t$95$0, If[LessEqual[z, -5.3e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6e-297], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.3e-168], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.8e-126], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.3e-50], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 12500000.0], t$95$0, t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-83}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-297}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{-168}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{-50}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 12500000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.05e14 or 1.25e7 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
flip-+19.3%
div-inv19.2%
pow219.2%
pow219.2%
associate-*l*19.1%
associate-*l*19.2%
Applied egg-rr19.2%
Taylor expanded in z around inf 99.8%
Taylor expanded in z around inf 99.3%
if -1.05e14 < z < -1.80000000000000006e-83 or 6.30000000000000023e-50 < z < 1.25e7Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 66.0%
Taylor expanded in x around 0 66.1%
if -1.80000000000000006e-83 < z < -5.30000000000000005e-214 or 5.9999999999999999e-297 < z < 6.29999999999999958e-168 or 1.8e-126 < z < 6.30000000000000023e-50Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 76.0%
sub-neg76.0%
distribute-rgt-in76.0%
metadata-eval76.0%
metadata-eval76.0%
distribute-lft-neg-in76.0%
associate-+r+76.0%
metadata-eval76.0%
metadata-eval76.0%
distribute-rgt-neg-in76.0%
metadata-eval76.0%
Simplified76.0%
Taylor expanded in z around 0 76.0%
*-commutative76.0%
Simplified76.0%
if -5.30000000000000005e-214 < z < 5.9999999999999999e-297 or 6.29999999999999958e-168 < z < 1.8e-126Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
flip-+48.1%
div-inv48.0%
pow248.0%
pow248.0%
associate-*l*48.0%
associate-*l*48.1%
Applied egg-rr48.1%
Taylor expanded in z around inf 99.9%
Taylor expanded in y around inf 72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in z around 0 72.3%
*-commutative72.3%
Simplified72.3%
Final simplification85.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -6.6e-9)
t_0
(if (<= z -2.7e-214)
(* x -3.0)
(if (<= z 1.05e-298)
(* y 4.0)
(if (<= z 2.9e-166)
(* x -3.0)
(if (<= z 4.5e-124)
(* y 4.0)
(if (<= z 4.1e-57)
(* x -3.0)
(if (<= z 0.62) (* y 4.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -6.6e-9) {
tmp = t_0;
} else if (z <= -2.7e-214) {
tmp = x * -3.0;
} else if (z <= 1.05e-298) {
tmp = y * 4.0;
} else if (z <= 2.9e-166) {
tmp = x * -3.0;
} else if (z <= 4.5e-124) {
tmp = y * 4.0;
} else if (z <= 4.1e-57) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-6.6d-9)) then
tmp = t_0
else if (z <= (-2.7d-214)) then
tmp = x * (-3.0d0)
else if (z <= 1.05d-298) then
tmp = y * 4.0d0
else if (z <= 2.9d-166) then
tmp = x * (-3.0d0)
else if (z <= 4.5d-124) then
tmp = y * 4.0d0
else if (z <= 4.1d-57) then
tmp = x * (-3.0d0)
else if (z <= 0.62d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -6.6e-9) {
tmp = t_0;
} else if (z <= -2.7e-214) {
tmp = x * -3.0;
} else if (z <= 1.05e-298) {
tmp = y * 4.0;
} else if (z <= 2.9e-166) {
tmp = x * -3.0;
} else if (z <= 4.5e-124) {
tmp = y * 4.0;
} else if (z <= 4.1e-57) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -6.6e-9: tmp = t_0 elif z <= -2.7e-214: tmp = x * -3.0 elif z <= 1.05e-298: tmp = y * 4.0 elif z <= 2.9e-166: tmp = x * -3.0 elif z <= 4.5e-124: tmp = y * 4.0 elif z <= 4.1e-57: tmp = x * -3.0 elif z <= 0.62: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -6.6e-9) tmp = t_0; elseif (z <= -2.7e-214) tmp = Float64(x * -3.0); elseif (z <= 1.05e-298) tmp = Float64(y * 4.0); elseif (z <= 2.9e-166) tmp = Float64(x * -3.0); elseif (z <= 4.5e-124) tmp = Float64(y * 4.0); elseif (z <= 4.1e-57) tmp = Float64(x * -3.0); elseif (z <= 0.62) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -6.6e-9) tmp = t_0; elseif (z <= -2.7e-214) tmp = x * -3.0; elseif (z <= 1.05e-298) tmp = y * 4.0; elseif (z <= 2.9e-166) tmp = x * -3.0; elseif (z <= 4.5e-124) tmp = y * 4.0; elseif (z <= 4.1e-57) tmp = x * -3.0; elseif (z <= 0.62) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e-9], t$95$0, If[LessEqual[z, -2.7e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.9e-166], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.5e-124], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.1e-57], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.62], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-166}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-57}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -6.60000000000000037e-9 or 0.619999999999999996 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+21.4%
div-inv21.3%
pow221.3%
pow221.3%
associate-*l*21.2%
associate-*l*21.3%
Applied egg-rr21.3%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 95.8%
if -6.60000000000000037e-9 < z < -2.7000000000000001e-214 or 1.05000000000000002e-298 < z < 2.9e-166 or 4.4999999999999996e-124 < z < 4.1000000000000001e-57Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 71.5%
sub-neg71.5%
distribute-rgt-in71.5%
metadata-eval71.5%
metadata-eval71.5%
distribute-lft-neg-in71.5%
associate-+r+71.5%
metadata-eval71.5%
metadata-eval71.5%
distribute-rgt-neg-in71.5%
metadata-eval71.5%
Simplified71.5%
Taylor expanded in z around 0 71.5%
*-commutative71.5%
Simplified71.5%
if -2.7000000000000001e-214 < z < 1.05000000000000002e-298 or 2.9e-166 < z < 4.4999999999999996e-124 or 4.1000000000000001e-57 < z < 0.619999999999999996Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
flip-+43.0%
div-inv43.0%
pow243.0%
pow243.0%
associate-*l*43.0%
associate-*l*43.1%
Applied egg-rr43.1%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around inf 68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
Final simplification83.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -6.6e-9)
t_0
(if (<= z -3.6e-214)
(* x -3.0)
(if (<= z 9.2e-298)
(* y 4.0)
(if (<= z 7e-169)
(* x -3.0)
(if (<= z 2.3e-117)
(* y 4.0)
(if (<= z 2.8e-48)
(* x -3.0)
(if (<= z 8.8e-9) (* y 4.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -6.6e-9) {
tmp = t_0;
} else if (z <= -3.6e-214) {
tmp = x * -3.0;
} else if (z <= 9.2e-298) {
tmp = y * 4.0;
} else if (z <= 7e-169) {
tmp = x * -3.0;
} else if (z <= 2.3e-117) {
tmp = y * 4.0;
} else if (z <= 2.8e-48) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
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 <= (-6.6d-9)) then
tmp = t_0
else if (z <= (-3.6d-214)) then
tmp = x * (-3.0d0)
else if (z <= 9.2d-298) then
tmp = y * 4.0d0
else if (z <= 7d-169) then
tmp = x * (-3.0d0)
else if (z <= 2.3d-117) then
tmp = y * 4.0d0
else if (z <= 2.8d-48) then
tmp = x * (-3.0d0)
else if (z <= 8.8d-9) 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 <= -6.6e-9) {
tmp = t_0;
} else if (z <= -3.6e-214) {
tmp = x * -3.0;
} else if (z <= 9.2e-298) {
tmp = y * 4.0;
} else if (z <= 7e-169) {
tmp = x * -3.0;
} else if (z <= 2.3e-117) {
tmp = y * 4.0;
} else if (z <= 2.8e-48) {
tmp = x * -3.0;
} else if (z <= 8.8e-9) {
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 <= -6.6e-9: tmp = t_0 elif z <= -3.6e-214: tmp = x * -3.0 elif z <= 9.2e-298: tmp = y * 4.0 elif z <= 7e-169: tmp = x * -3.0 elif z <= 2.3e-117: tmp = y * 4.0 elif z <= 2.8e-48: tmp = x * -3.0 elif z <= 8.8e-9: 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 <= -6.6e-9) tmp = t_0; elseif (z <= -3.6e-214) tmp = Float64(x * -3.0); elseif (z <= 9.2e-298) tmp = Float64(y * 4.0); elseif (z <= 7e-169) tmp = Float64(x * -3.0); elseif (z <= 2.3e-117) tmp = Float64(y * 4.0); elseif (z <= 2.8e-48) tmp = Float64(x * -3.0); elseif (z <= 8.8e-9) 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 <= -6.6e-9) tmp = t_0; elseif (z <= -3.6e-214) tmp = x * -3.0; elseif (z <= 9.2e-298) tmp = y * 4.0; elseif (z <= 7e-169) tmp = x * -3.0; elseif (z <= 2.3e-117) tmp = y * 4.0; elseif (z <= 2.8e-48) tmp = x * -3.0; elseif (z <= 8.8e-9) 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, -6.6e-9], t$95$0, If[LessEqual[z, -3.6e-214], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 9.2e-298], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7e-169], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.3e-117], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.8e-48], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.8e-9], 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 -6.6 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-214}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-298}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-169}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-117}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-48}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-9}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -6.60000000000000037e-9 or 8.7999999999999994e-9 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+20.9%
div-inv20.9%
pow220.9%
pow220.9%
associate-*l*20.8%
associate-*l*20.9%
Applied egg-rr20.9%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in z around inf 49.0%
if -6.60000000000000037e-9 < z < -3.6e-214 or 9.2000000000000003e-298 < z < 7.0000000000000006e-169 or 2.29999999999999994e-117 < z < 2.80000000000000005e-48Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 71.5%
sub-neg71.5%
distribute-rgt-in71.5%
metadata-eval71.5%
metadata-eval71.5%
distribute-lft-neg-in71.5%
associate-+r+71.5%
metadata-eval71.5%
metadata-eval71.5%
distribute-rgt-neg-in71.5%
metadata-eval71.5%
Simplified71.5%
Taylor expanded in z around 0 71.5%
*-commutative71.5%
Simplified71.5%
if -3.6e-214 < z < 9.2000000000000003e-298 or 7.0000000000000006e-169 < z < 2.29999999999999994e-117 or 2.80000000000000005e-48 < z < 8.7999999999999994e-9Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
flip-+45.8%
div-inv45.8%
pow245.8%
pow245.8%
associate-*l*45.8%
associate-*l*45.9%
Applied egg-rr45.9%
Taylor expanded in z around inf 99.9%
Taylor expanded in y around inf 72.6%
*-commutative72.6%
Simplified72.6%
Taylor expanded in z around 0 72.1%
*-commutative72.1%
Simplified72.1%
Final simplification59.6%
(FPCore (x y z) :precision binary64 (+ (+ (* -6.0 (* (- y x) z)) (* (- y x) 8.0)) (+ x (* 4.0 (- x y)))))
double code(double x, double y, double z) {
return ((-6.0 * ((y - x) * z)) + ((y - x) * 8.0)) + (x + (4.0 * (x - y)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (((-6.0d0) * ((y - x) * z)) + ((y - x) * 8.0d0)) + (x + (4.0d0 * (x - y)))
end function
public static double code(double x, double y, double z) {
return ((-6.0 * ((y - x) * z)) + ((y - x) * 8.0)) + (x + (4.0 * (x - y)));
}
def code(x, y, z): return ((-6.0 * ((y - x) * z)) + ((y - x) * 8.0)) + (x + (4.0 * (x - y)))
function code(x, y, z) return Float64(Float64(Float64(-6.0 * Float64(Float64(y - x) * z)) + Float64(Float64(y - x) * 8.0)) + Float64(x + Float64(4.0 * Float64(x - y)))) end
function tmp = code(x, y, z) tmp = ((-6.0 * ((y - x) * z)) + ((y - x) * 8.0)) + (x + (4.0 * (x - y))); end
code[x_, y_, z_] := N[(N[(N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision] + N[(x + N[(4.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-6 \cdot \left(\left(y - x\right) \cdot z\right) + \left(y - x\right) \cdot 8\right) + \left(x + 4 \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
flip-+35.4%
div-inv35.3%
pow235.3%
pow235.3%
associate-*l*35.2%
associate-*l*35.3%
Applied egg-rr35.3%
Taylor expanded in z around inf 99.7%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (if (or (<= x -3.6e-56) (not (<= x 1e-26))) (* x (+ -3.0 (* z 6.0))) (* 6.0 (* y (- 0.6666666666666666 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.6e-56) || !(x <= 1e-26)) {
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 <= (-3.6d-56)) .or. (.not. (x <= 1d-26))) 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 <= -3.6e-56) || !(x <= 1e-26)) {
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 <= -3.6e-56) or not (x <= 1e-26): 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 <= -3.6e-56) || !(x <= 1e-26)) 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 <= -3.6e-56) || ~((x <= 1e-26))) 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, -3.6e-56], N[Not[LessEqual[x, 1e-26]], $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 -3.6 \cdot 10^{-56} \lor \neg \left(x \leq 10^{-26}\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 < -3.59999999999999978e-56 or 1e-26 < x Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
metadata-eval77.7%
distribute-lft-neg-in77.7%
associate-+r+77.7%
metadata-eval77.7%
metadata-eval77.7%
distribute-rgt-neg-in77.7%
metadata-eval77.7%
Simplified77.7%
if -3.59999999999999978e-56 < x < 1e-26Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 82.4%
Taylor expanded in x around 0 82.7%
Final simplification79.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -7e-56) (not (<= x 9.6e-27))) (* x (+ -3.0 (* z 6.0))) (* y (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7e-56) || !(x <= 9.6e-27)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.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 ((x <= (-7d-56)) .or. (.not. (x <= 9.6d-27))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = y * (4.0d0 + (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -7e-56) || !(x <= 9.6e-27)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7e-56) or not (x <= 9.6e-27): tmp = x * (-3.0 + (z * 6.0)) else: tmp = y * (4.0 + (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7e-56) || !(x <= 9.6e-27)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -7e-56) || ~((x <= 9.6e-27))) tmp = x * (-3.0 + (z * 6.0)); else tmp = y * (4.0 + (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7e-56], N[Not[LessEqual[x, 9.6e-27]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-56} \lor \neg \left(x \leq 9.6 \cdot 10^{-27}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\end{array}
\end{array}
if x < -6.9999999999999996e-56 or 9.60000000000000008e-27 < x Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 77.7%
sub-neg77.7%
distribute-rgt-in77.7%
metadata-eval77.7%
metadata-eval77.7%
distribute-lft-neg-in77.7%
associate-+r+77.7%
metadata-eval77.7%
metadata-eval77.7%
distribute-rgt-neg-in77.7%
metadata-eval77.7%
Simplified77.7%
if -6.9999999999999996e-56 < x < 9.60000000000000008e-27Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 82.8%
Final simplification79.9%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* -6.0 (* (- y x) z)) (if (<= z 0.6) (+ x (* (- y x) 4.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.6) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.55d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.6d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = z * ((y - x) * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.6) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = -6.0 * ((y - x) * z) elif z <= 0.6: tmp = x + ((y - x) * 4.0) else: tmp = z * ((y - x) * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.6) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(z * Float64(Float64(y - x) * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.6) tmp = x + ((y - x) * 4.0); else tmp = z * ((y - x) * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.6], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+25.6%
div-inv25.5%
pow225.5%
pow225.5%
associate-*l*25.5%
associate-*l*25.6%
Applied egg-rr25.6%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 97.9%
if -0.55000000000000004 < z < 0.599999999999999978Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.6%
if 0.599999999999999978 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 96.2%
neg-mul-196.2%
Simplified96.2%
Taylor expanded in z around inf 96.2%
associate-*r*96.2%
*-commutative96.2%
associate-*l*96.2%
Simplified96.2%
Final simplification97.3%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* -6.0 (* (- y x) z)) (if (<= z 0.5) (+ (* x -3.0) (* y 4.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.5) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.6d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.5d0) then
tmp = (x * (-3.0d0)) + (y * 4.0d0)
else
tmp = z * ((y - x) * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.5) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = -6.0 * ((y - x) * z) elif z <= 0.5: tmp = (x * -3.0) + (y * 4.0) else: tmp = z * ((y - x) * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.5) tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); else tmp = Float64(z * Float64(Float64(y - x) * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.5) tmp = (x * -3.0) + (y * 4.0); else tmp = z * ((y - x) * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.5], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+25.6%
div-inv25.5%
pow225.5%
pow225.5%
associate-*l*25.5%
associate-*l*25.6%
Applied egg-rr25.6%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 97.9%
if -0.599999999999999978 < z < 0.5Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around -inf 99.9%
Taylor expanded in z around 0 97.6%
if 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 96.2%
neg-mul-196.2%
Simplified96.2%
Taylor expanded in z around inf 96.2%
associate-*r*96.2%
*-commutative96.2%
associate-*l*96.2%
Simplified96.2%
Final simplification97.3%
(FPCore (x y z) :precision binary64 (+ x (+ (* (* (- y x) 6.0) 0.6666666666666666) (* z (* 6.0 (- x y))))))
double code(double x, double y, double z) {
return x + ((((y - x) * 6.0) * 0.6666666666666666) + (z * (6.0 * (x - y))));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((((y - x) * 6.0d0) * 0.6666666666666666d0) + (z * (6.0d0 * (x - y))))
end function
public static double code(double x, double y, double z) {
return x + ((((y - x) * 6.0) * 0.6666666666666666) + (z * (6.0 * (x - y))));
}
def code(x, y, z): return x + ((((y - x) * 6.0) * 0.6666666666666666) + (z * (6.0 * (x - y))))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(Float64(y - x) * 6.0) * 0.6666666666666666) + Float64(z * Float64(6.0 * Float64(x - y))))) end
function tmp = code(x, y, z) tmp = x + ((((y - x) * 6.0) * 0.6666666666666666) + (z * (6.0 * (x - y)))); end
code[x_, y_, z_] := N[(x + N[(N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * 0.6666666666666666), $MachinePrecision] + N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(\left(y - x\right) \cdot 6\right) \cdot 0.6666666666666666 + z \cdot \left(6 \cdot \left(x - y\right)\right)\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.05e-63) (not (<= y 1.8e+101))) (* y 4.0) (* x -3.0)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.05e-63) || !(y <= 1.8e+101)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-1.05d-63)) .or. (.not. (y <= 1.8d+101))) then
tmp = y * 4.0d0
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.05e-63) || !(y <= 1.8e+101)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.05e-63) or not (y <= 1.8e+101): tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.05e-63) || !(y <= 1.8e+101)) tmp = Float64(y * 4.0); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.05e-63) || ~((y <= 1.8e+101))) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.05e-63], N[Not[LessEqual[y, 1.8e+101]], $MachinePrecision]], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-63} \lor \neg \left(y \leq 1.8 \cdot 10^{+101}\right):\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if y < -1.05e-63 or 1.80000000000000015e101 < y Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+20.0%
div-inv20.0%
pow220.0%
pow220.0%
associate-*l*20.0%
associate-*l*20.1%
Applied egg-rr20.1%
Taylor expanded in z around inf 99.9%
Taylor expanded in y around inf 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in z around 0 37.3%
*-commutative37.3%
Simplified37.3%
if -1.05e-63 < y < 1.80000000000000015e101Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 75.6%
sub-neg75.6%
distribute-rgt-in75.6%
metadata-eval75.6%
metadata-eval75.6%
distribute-lft-neg-in75.6%
associate-+r+75.6%
metadata-eval75.6%
metadata-eval75.6%
distribute-rgt-neg-in75.6%
metadata-eval75.6%
Simplified75.6%
Taylor expanded in z around 0 40.6%
*-commutative40.6%
Simplified40.6%
Final simplification39.2%
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (* x -3.0))
double code(double x, double y, double z) {
return x * -3.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-3.0d0)
end function
public static double code(double x, double y, double z) {
return x * -3.0;
}
def code(x, y, z): return x * -3.0
function code(x, y, z) return Float64(x * -3.0) end
function tmp = code(x, y, z) tmp = x * -3.0; end
code[x_, y_, z_] := N[(x * -3.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -3
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 53.0%
sub-neg53.0%
distribute-rgt-in53.0%
metadata-eval53.0%
metadata-eval53.0%
distribute-lft-neg-in53.0%
associate-+r+53.0%
metadata-eval53.0%
metadata-eval53.0%
distribute-rgt-neg-in53.0%
metadata-eval53.0%
Simplified53.0%
Taylor expanded in z around 0 28.1%
*-commutative28.1%
Simplified28.1%
Final simplification28.1%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 48.7%
Taylor expanded in x around inf 2.5%
Final simplification2.5%
herbie shell --seed 2024031
(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))))