
(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 (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.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.8%
distribute-rgt-neg-out99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.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.7%
fma-define99.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%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))))
(if (<= z -0.65)
t_0
(if (<= z -8.6e-184)
(* y 4.0)
(if (<= z -2.9e-236)
(* x -3.0)
(if (<= z -4.8e-306)
(* y 4.0)
(if (<= z 7e-231)
(* x -3.0)
(if (<= z 6.6e-177)
(* y 4.0)
(if (<= z 6e-37)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (or (<= z 7.5e+101) (not (<= z 8.5e+246)))
(* -6.0 (* y z))
t_0)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -0.65) {
tmp = t_0;
} else if (z <= -8.6e-184) {
tmp = y * 4.0;
} else if (z <= -2.9e-236) {
tmp = x * -3.0;
} else if (z <= -4.8e-306) {
tmp = y * 4.0;
} else if (z <= 7e-231) {
tmp = x * -3.0;
} else if (z <= 6.6e-177) {
tmp = y * 4.0;
} else if (z <= 6e-37) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 7.5e+101) || !(z <= 8.5e+246)) {
tmp = -6.0 * (y * 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 * (x * z)
if (z <= (-0.65d0)) then
tmp = t_0
else if (z <= (-8.6d-184)) then
tmp = y * 4.0d0
else if (z <= (-2.9d-236)) then
tmp = x * (-3.0d0)
else if (z <= (-4.8d-306)) then
tmp = y * 4.0d0
else if (z <= 7d-231) then
tmp = x * (-3.0d0)
else if (z <= 6.6d-177) then
tmp = y * 4.0d0
else if (z <= 6d-37) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if ((z <= 7.5d+101) .or. (.not. (z <= 8.5d+246))) then
tmp = (-6.0d0) * (y * 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 * (x * z);
double tmp;
if (z <= -0.65) {
tmp = t_0;
} else if (z <= -8.6e-184) {
tmp = y * 4.0;
} else if (z <= -2.9e-236) {
tmp = x * -3.0;
} else if (z <= -4.8e-306) {
tmp = y * 4.0;
} else if (z <= 7e-231) {
tmp = x * -3.0;
} else if (z <= 6.6e-177) {
tmp = y * 4.0;
} else if (z <= 6e-37) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 7.5e+101) || !(z <= 8.5e+246)) {
tmp = -6.0 * (y * z);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) tmp = 0 if z <= -0.65: tmp = t_0 elif z <= -8.6e-184: tmp = y * 4.0 elif z <= -2.9e-236: tmp = x * -3.0 elif z <= -4.8e-306: tmp = y * 4.0 elif z <= 7e-231: tmp = x * -3.0 elif z <= 6.6e-177: tmp = y * 4.0 elif z <= 6e-37: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif (z <= 7.5e+101) or not (z <= 8.5e+246): tmp = -6.0 * (y * z) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -0.65) tmp = t_0; elseif (z <= -8.6e-184) tmp = Float64(y * 4.0); elseif (z <= -2.9e-236) tmp = Float64(x * -3.0); elseif (z <= -4.8e-306) tmp = Float64(y * 4.0); elseif (z <= 7e-231) tmp = Float64(x * -3.0); elseif (z <= 6.6e-177) tmp = Float64(y * 4.0); elseif (z <= 6e-37) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif ((z <= 7.5e+101) || !(z <= 8.5e+246)) tmp = Float64(-6.0 * Float64(y * z)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); tmp = 0.0; if (z <= -0.65) tmp = t_0; elseif (z <= -8.6e-184) tmp = y * 4.0; elseif (z <= -2.9e-236) tmp = x * -3.0; elseif (z <= -4.8e-306) tmp = y * 4.0; elseif (z <= 7e-231) tmp = x * -3.0; elseif (z <= 6.6e-177) tmp = y * 4.0; elseif (z <= 6e-37) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif ((z <= 7.5e+101) || ~((z <= 8.5e+246))) tmp = -6.0 * (y * z); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.65], t$95$0, If[LessEqual[z, -8.6e-184], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.9e-236], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4.8e-306], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7e-231], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.6e-177], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6e-37], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[Or[LessEqual[z, 7.5e+101], N[Not[LessEqual[z, 8.5e+246]], $MachinePrecision]], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -0.65:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-184}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-236}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-306}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-231}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-177}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-37}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+101} \lor \neg \left(z \leq 8.5 \cdot 10^{+246}\right):\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.650000000000000022 or 7.4999999999999995e101 < z < 8.49999999999999952e246Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 59.4%
sub-neg59.4%
distribute-rgt-in59.4%
metadata-eval59.4%
distribute-lft-neg-in59.4%
associate-+r+59.4%
metadata-eval59.4%
*-commutative59.4%
distribute-lft-neg-in59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
Simplified58.4%
if -0.650000000000000022 < z < -8.60000000000000013e-184 or -2.9e-236 < z < -4.7999999999999999e-306 or 7.0000000000000002e-231 < z < 6.5999999999999999e-177 or 6e-37 < z < 0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 96.2%
distribute-rgt-in96.2%
associate-+r+96.2%
*-commutative96.2%
associate-*r*96.3%
metadata-eval96.3%
distribute-rgt1-in96.3%
metadata-eval96.3%
*-commutative96.3%
*-commutative96.3%
associate-*l*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
if -8.60000000000000013e-184 < z < -2.9e-236 or -4.7999999999999999e-306 < z < 7.0000000000000002e-231 or 6.5999999999999999e-177 < z < 6e-37Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 67.7%
sub-neg67.7%
distribute-rgt-in67.7%
metadata-eval67.7%
distribute-lft-neg-in67.7%
associate-+r+67.7%
metadata-eval67.7%
*-commutative67.7%
distribute-lft-neg-in67.7%
metadata-eval67.7%
Simplified67.7%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if 0.650000000000000022 < z < 7.4999999999999995e101 or 8.49999999999999952e246 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 89.7%
Taylor expanded in y around inf 74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in z around inf 70.3%
Final simplification65.4%
(FPCore (x y z)
:precision binary64
(if (<= z -0.34)
(* 6.0 (* x z))
(if (<= z -3e-181)
(* y 4.0)
(if (<= z -3.4e-234)
(* x -3.0)
(if (<= z -4e-299)
(* y 4.0)
(if (<= z 6e-229)
(* x -3.0)
(if (<= z 5e-176)
(* y 4.0)
(if (<= z 3.6e-39)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (or (<= z 8.5e+97) (not (<= z 4e+245)))
(* -6.0 (* y z))
(* x (* z 6.0))))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.34) {
tmp = 6.0 * (x * z);
} else if (z <= -3e-181) {
tmp = y * 4.0;
} else if (z <= -3.4e-234) {
tmp = x * -3.0;
} else if (z <= -4e-299) {
tmp = y * 4.0;
} else if (z <= 6e-229) {
tmp = x * -3.0;
} else if (z <= 5e-176) {
tmp = y * 4.0;
} else if (z <= 3.6e-39) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 8.5e+97) || !(z <= 4e+245)) {
tmp = -6.0 * (y * z);
} 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) :: tmp
if (z <= (-0.34d0)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-3d-181)) then
tmp = y * 4.0d0
else if (z <= (-3.4d-234)) then
tmp = x * (-3.0d0)
else if (z <= (-4d-299)) then
tmp = y * 4.0d0
else if (z <= 6d-229) then
tmp = x * (-3.0d0)
else if (z <= 5d-176) then
tmp = y * 4.0d0
else if (z <= 3.6d-39) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if ((z <= 8.5d+97) .or. (.not. (z <= 4d+245))) then
tmp = (-6.0d0) * (y * z)
else
tmp = x * (z * 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.34) {
tmp = 6.0 * (x * z);
} else if (z <= -3e-181) {
tmp = y * 4.0;
} else if (z <= -3.4e-234) {
tmp = x * -3.0;
} else if (z <= -4e-299) {
tmp = y * 4.0;
} else if (z <= 6e-229) {
tmp = x * -3.0;
} else if (z <= 5e-176) {
tmp = y * 4.0;
} else if (z <= 3.6e-39) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 8.5e+97) || !(z <= 4e+245)) {
tmp = -6.0 * (y * z);
} else {
tmp = x * (z * 6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.34: tmp = 6.0 * (x * z) elif z <= -3e-181: tmp = y * 4.0 elif z <= -3.4e-234: tmp = x * -3.0 elif z <= -4e-299: tmp = y * 4.0 elif z <= 6e-229: tmp = x * -3.0 elif z <= 5e-176: tmp = y * 4.0 elif z <= 3.6e-39: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif (z <= 8.5e+97) or not (z <= 4e+245): tmp = -6.0 * (y * z) else: tmp = x * (z * 6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.34) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -3e-181) tmp = Float64(y * 4.0); elseif (z <= -3.4e-234) tmp = Float64(x * -3.0); elseif (z <= -4e-299) tmp = Float64(y * 4.0); elseif (z <= 6e-229) tmp = Float64(x * -3.0); elseif (z <= 5e-176) tmp = Float64(y * 4.0); elseif (z <= 3.6e-39) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif ((z <= 8.5e+97) || !(z <= 4e+245)) tmp = Float64(-6.0 * Float64(y * z)); else tmp = Float64(x * Float64(z * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.34) tmp = 6.0 * (x * z); elseif (z <= -3e-181) tmp = y * 4.0; elseif (z <= -3.4e-234) tmp = x * -3.0; elseif (z <= -4e-299) tmp = y * 4.0; elseif (z <= 6e-229) tmp = x * -3.0; elseif (z <= 5e-176) tmp = y * 4.0; elseif (z <= 3.6e-39) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif ((z <= 8.5e+97) || ~((z <= 4e+245))) tmp = -6.0 * (y * z); else tmp = x * (z * 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.34], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e-181], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.4e-234], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4e-299], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5e-176], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.6e-39], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[Or[LessEqual[z, 8.5e+97], N[Not[LessEqual[z, 4e+245]], $MachinePrecision]], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.34:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-181}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-234}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-299}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-176}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-39}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+97} \lor \neg \left(z \leq 4 \cdot 10^{+245}\right):\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\end{array}
\end{array}
if z < -0.340000000000000024Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 59.4%
sub-neg59.4%
distribute-rgt-in59.4%
metadata-eval59.4%
distribute-lft-neg-in59.4%
associate-+r+59.4%
metadata-eval59.4%
*-commutative59.4%
distribute-lft-neg-in59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in z around inf 58.1%
*-commutative58.1%
Simplified58.1%
if -0.340000000000000024 < z < -2.99999999999999974e-181 or -3.39999999999999986e-234 < z < -3.99999999999999997e-299 or 6.00000000000000005e-229 < z < 5e-176 or 3.6000000000000001e-39 < z < 0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 96.2%
distribute-rgt-in96.2%
associate-+r+96.2%
*-commutative96.2%
associate-*r*96.3%
metadata-eval96.3%
distribute-rgt1-in96.3%
metadata-eval96.3%
*-commutative96.3%
*-commutative96.3%
associate-*l*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
if -2.99999999999999974e-181 < z < -3.39999999999999986e-234 or -3.99999999999999997e-299 < z < 6.00000000000000005e-229 or 5e-176 < z < 3.6000000000000001e-39Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 67.7%
sub-neg67.7%
distribute-rgt-in67.7%
metadata-eval67.7%
distribute-lft-neg-in67.7%
associate-+r+67.7%
metadata-eval67.7%
*-commutative67.7%
distribute-lft-neg-in67.7%
metadata-eval67.7%
Simplified67.7%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if 0.650000000000000022 < z < 8.4999999999999993e97 or 4.00000000000000018e245 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 89.7%
Taylor expanded in y around inf 74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in z around inf 70.3%
if 8.4999999999999993e97 < z < 4.00000000000000018e245Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 59.5%
sub-neg59.5%
distribute-rgt-in59.5%
metadata-eval59.5%
distribute-lft-neg-in59.5%
associate-+r+59.5%
metadata-eval59.5%
*-commutative59.5%
distribute-lft-neg-in59.5%
metadata-eval59.5%
Simplified59.5%
Taylor expanded in z around inf 59.5%
Final simplification65.4%
(FPCore (x y z)
:precision binary64
(if (<= z -0.15)
(* 6.0 (* x z))
(if (<= z -7.5e-181)
(* y 4.0)
(if (<= z -2e-233)
(* x -3.0)
(if (<= z -1.1e-300)
(* y 4.0)
(if (<= z 1.1e-229)
(* x -3.0)
(if (<= z 4.8e-176)
(* y 4.0)
(if (<= z 4.3e-38)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (<= z 1.75e+99)
(* -6.0 (* y z))
(if (<= z 7.8e+244)
(* x (* z 6.0))
(* y (* z -6.0)))))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.15) {
tmp = 6.0 * (x * z);
} else if (z <= -7.5e-181) {
tmp = y * 4.0;
} else if (z <= -2e-233) {
tmp = x * -3.0;
} else if (z <= -1.1e-300) {
tmp = y * 4.0;
} else if (z <= 1.1e-229) {
tmp = x * -3.0;
} else if (z <= 4.8e-176) {
tmp = y * 4.0;
} else if (z <= 4.3e-38) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 1.75e+99) {
tmp = -6.0 * (y * z);
} else if (z <= 7.8e+244) {
tmp = x * (z * 6.0);
} else {
tmp = y * (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 (z <= (-0.15d0)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-7.5d-181)) then
tmp = y * 4.0d0
else if (z <= (-2d-233)) then
tmp = x * (-3.0d0)
else if (z <= (-1.1d-300)) then
tmp = y * 4.0d0
else if (z <= 1.1d-229) then
tmp = x * (-3.0d0)
else if (z <= 4.8d-176) then
tmp = y * 4.0d0
else if (z <= 4.3d-38) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if (z <= 1.75d+99) then
tmp = (-6.0d0) * (y * z)
else if (z <= 7.8d+244) then
tmp = x * (z * 6.0d0)
else
tmp = y * (z * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.15) {
tmp = 6.0 * (x * z);
} else if (z <= -7.5e-181) {
tmp = y * 4.0;
} else if (z <= -2e-233) {
tmp = x * -3.0;
} else if (z <= -1.1e-300) {
tmp = y * 4.0;
} else if (z <= 1.1e-229) {
tmp = x * -3.0;
} else if (z <= 4.8e-176) {
tmp = y * 4.0;
} else if (z <= 4.3e-38) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 1.75e+99) {
tmp = -6.0 * (y * z);
} else if (z <= 7.8e+244) {
tmp = x * (z * 6.0);
} else {
tmp = y * (z * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.15: tmp = 6.0 * (x * z) elif z <= -7.5e-181: tmp = y * 4.0 elif z <= -2e-233: tmp = x * -3.0 elif z <= -1.1e-300: tmp = y * 4.0 elif z <= 1.1e-229: tmp = x * -3.0 elif z <= 4.8e-176: tmp = y * 4.0 elif z <= 4.3e-38: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif z <= 1.75e+99: tmp = -6.0 * (y * z) elif z <= 7.8e+244: tmp = x * (z * 6.0) else: tmp = y * (z * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.15) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -7.5e-181) tmp = Float64(y * 4.0); elseif (z <= -2e-233) tmp = Float64(x * -3.0); elseif (z <= -1.1e-300) tmp = Float64(y * 4.0); elseif (z <= 1.1e-229) tmp = Float64(x * -3.0); elseif (z <= 4.8e-176) tmp = Float64(y * 4.0); elseif (z <= 4.3e-38) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif (z <= 1.75e+99) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= 7.8e+244) tmp = Float64(x * Float64(z * 6.0)); else tmp = Float64(y * Float64(z * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.15) tmp = 6.0 * (x * z); elseif (z <= -7.5e-181) tmp = y * 4.0; elseif (z <= -2e-233) tmp = x * -3.0; elseif (z <= -1.1e-300) tmp = y * 4.0; elseif (z <= 1.1e-229) tmp = x * -3.0; elseif (z <= 4.8e-176) tmp = y * 4.0; elseif (z <= 4.3e-38) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif (z <= 1.75e+99) tmp = -6.0 * (y * z); elseif (z <= 7.8e+244) tmp = x * (z * 6.0); else tmp = y * (z * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.15], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-181], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2e-233], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.1e-300], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.1e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.8e-176], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.3e-38], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.75e+99], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+244], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.15:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-181}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-233}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-300}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-176}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-38}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+99}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+244}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.149999999999999994Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 59.4%
sub-neg59.4%
distribute-rgt-in59.4%
metadata-eval59.4%
distribute-lft-neg-in59.4%
associate-+r+59.4%
metadata-eval59.4%
*-commutative59.4%
distribute-lft-neg-in59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in z around inf 58.1%
*-commutative58.1%
Simplified58.1%
if -0.149999999999999994 < z < -7.5000000000000002e-181 or -1.99999999999999992e-233 < z < -1.10000000000000001e-300 or 1.0999999999999999e-229 < z < 4.80000000000000012e-176 or 4.3000000000000002e-38 < z < 0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 96.2%
distribute-rgt-in96.2%
associate-+r+96.2%
*-commutative96.2%
associate-*r*96.3%
metadata-eval96.3%
distribute-rgt1-in96.3%
metadata-eval96.3%
*-commutative96.3%
*-commutative96.3%
associate-*l*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
if -7.5000000000000002e-181 < z < -1.99999999999999992e-233 or -1.10000000000000001e-300 < z < 1.0999999999999999e-229 or 4.80000000000000012e-176 < z < 4.3000000000000002e-38Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 67.7%
sub-neg67.7%
distribute-rgt-in67.7%
metadata-eval67.7%
distribute-lft-neg-in67.7%
associate-+r+67.7%
metadata-eval67.7%
*-commutative67.7%
distribute-lft-neg-in67.7%
metadata-eval67.7%
Simplified67.7%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if 0.650000000000000022 < z < 1.7499999999999999e99Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.8%
Taylor expanded in y around inf 84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in z around inf 76.4%
if 1.7499999999999999e99 < z < 7.8000000000000001e244Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 59.5%
sub-neg59.5%
distribute-rgt-in59.5%
metadata-eval59.5%
distribute-lft-neg-in59.5%
associate-+r+59.5%
metadata-eval59.5%
*-commutative59.5%
distribute-lft-neg-in59.5%
metadata-eval59.5%
Simplified59.5%
Taylor expanded in z around inf 59.5%
if 7.8000000000000001e244 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 84.0%
Taylor expanded in y around inf 63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in z around inf 63.6%
*-commutative63.6%
associate-*r*63.7%
Simplified63.7%
Final simplification65.4%
(FPCore (x y z)
:precision binary64
(if (<= z -0.75)
(* 6.0 (* x z))
(if (<= z -6.6e-182)
(* y 4.0)
(if (<= z -2.4e-238)
(* x -3.0)
(if (<= z -3e-302)
(* y 4.0)
(if (<= z 2.4e-231)
(* x -3.0)
(if (<= z 4.5e-176)
(* y 4.0)
(if (<= z 7.6e-37)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (<= z 5.4e+97)
(* z (* y -6.0))
(if (<= z 3.5e+245)
(* x (* z 6.0))
(* y (* z -6.0)))))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.75) {
tmp = 6.0 * (x * z);
} else if (z <= -6.6e-182) {
tmp = y * 4.0;
} else if (z <= -2.4e-238) {
tmp = x * -3.0;
} else if (z <= -3e-302) {
tmp = y * 4.0;
} else if (z <= 2.4e-231) {
tmp = x * -3.0;
} else if (z <= 4.5e-176) {
tmp = y * 4.0;
} else if (z <= 7.6e-37) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 5.4e+97) {
tmp = z * (y * -6.0);
} else if (z <= 3.5e+245) {
tmp = x * (z * 6.0);
} else {
tmp = y * (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 (z <= (-0.75d0)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-6.6d-182)) then
tmp = y * 4.0d0
else if (z <= (-2.4d-238)) then
tmp = x * (-3.0d0)
else if (z <= (-3d-302)) then
tmp = y * 4.0d0
else if (z <= 2.4d-231) then
tmp = x * (-3.0d0)
else if (z <= 4.5d-176) then
tmp = y * 4.0d0
else if (z <= 7.6d-37) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if (z <= 5.4d+97) then
tmp = z * (y * (-6.0d0))
else if (z <= 3.5d+245) then
tmp = x * (z * 6.0d0)
else
tmp = y * (z * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.75) {
tmp = 6.0 * (x * z);
} else if (z <= -6.6e-182) {
tmp = y * 4.0;
} else if (z <= -2.4e-238) {
tmp = x * -3.0;
} else if (z <= -3e-302) {
tmp = y * 4.0;
} else if (z <= 2.4e-231) {
tmp = x * -3.0;
} else if (z <= 4.5e-176) {
tmp = y * 4.0;
} else if (z <= 7.6e-37) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 5.4e+97) {
tmp = z * (y * -6.0);
} else if (z <= 3.5e+245) {
tmp = x * (z * 6.0);
} else {
tmp = y * (z * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.75: tmp = 6.0 * (x * z) elif z <= -6.6e-182: tmp = y * 4.0 elif z <= -2.4e-238: tmp = x * -3.0 elif z <= -3e-302: tmp = y * 4.0 elif z <= 2.4e-231: tmp = x * -3.0 elif z <= 4.5e-176: tmp = y * 4.0 elif z <= 7.6e-37: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif z <= 5.4e+97: tmp = z * (y * -6.0) elif z <= 3.5e+245: tmp = x * (z * 6.0) else: tmp = y * (z * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.75) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -6.6e-182) tmp = Float64(y * 4.0); elseif (z <= -2.4e-238) tmp = Float64(x * -3.0); elseif (z <= -3e-302) tmp = Float64(y * 4.0); elseif (z <= 2.4e-231) tmp = Float64(x * -3.0); elseif (z <= 4.5e-176) tmp = Float64(y * 4.0); elseif (z <= 7.6e-37) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif (z <= 5.4e+97) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= 3.5e+245) tmp = Float64(x * Float64(z * 6.0)); else tmp = Float64(y * Float64(z * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.75) tmp = 6.0 * (x * z); elseif (z <= -6.6e-182) tmp = y * 4.0; elseif (z <= -2.4e-238) tmp = x * -3.0; elseif (z <= -3e-302) tmp = y * 4.0; elseif (z <= 2.4e-231) tmp = x * -3.0; elseif (z <= 4.5e-176) tmp = y * 4.0; elseif (z <= 7.6e-37) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif (z <= 5.4e+97) tmp = z * (y * -6.0); elseif (z <= 3.5e+245) tmp = x * (z * 6.0); else tmp = y * (z * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.75], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.6e-182], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.4e-238], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -3e-302], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.4e-231], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.5e-176], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.6e-37], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.4e+97], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+245], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.75:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-182}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-238}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-302}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-231}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-176}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-37}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+97}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+245}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.75Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 59.4%
sub-neg59.4%
distribute-rgt-in59.4%
metadata-eval59.4%
distribute-lft-neg-in59.4%
associate-+r+59.4%
metadata-eval59.4%
*-commutative59.4%
distribute-lft-neg-in59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in z around inf 58.1%
*-commutative58.1%
Simplified58.1%
if -0.75 < z < -6.59999999999999991e-182 or -2.3999999999999998e-238 < z < -2.99999999999999989e-302 or 2.39999999999999992e-231 < z < 4.5e-176 or 7.6000000000000008e-37 < z < 0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 96.2%
distribute-rgt-in96.2%
associate-+r+96.2%
*-commutative96.2%
associate-*r*96.3%
metadata-eval96.3%
distribute-rgt1-in96.3%
metadata-eval96.3%
*-commutative96.3%
*-commutative96.3%
associate-*l*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
if -6.59999999999999991e-182 < z < -2.3999999999999998e-238 or -2.99999999999999989e-302 < z < 2.39999999999999992e-231 or 4.5e-176 < z < 7.6000000000000008e-37Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 67.7%
sub-neg67.7%
distribute-rgt-in67.7%
metadata-eval67.7%
distribute-lft-neg-in67.7%
associate-+r+67.7%
metadata-eval67.7%
*-commutative67.7%
distribute-lft-neg-in67.7%
metadata-eval67.7%
Simplified67.7%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
if 0.650000000000000022 < z < 5.39999999999999987e97Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.8%
Taylor expanded in y around inf 84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in z around inf 76.4%
associate-*r*76.4%
*-commutative76.4%
Simplified76.4%
if 5.39999999999999987e97 < z < 3.49999999999999985e245Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 59.5%
sub-neg59.5%
distribute-rgt-in59.5%
metadata-eval59.5%
distribute-lft-neg-in59.5%
associate-+r+59.5%
metadata-eval59.5%
*-commutative59.5%
distribute-lft-neg-in59.5%
metadata-eval59.5%
Simplified59.5%
Taylor expanded in z around inf 59.5%
if 3.49999999999999985e245 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 84.0%
Taylor expanded in y around inf 63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in z around inf 63.6%
*-commutative63.6%
associate-*r*63.7%
Simplified63.7%
Final simplification65.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -25500.0)
t_0
(if (<= z -5e-184)
(* y 4.0)
(if (<= z -3.7e-233)
(* x -3.0)
(if (<= z -2.6e-304)
(* y 4.0)
(if (<= z 3.9e-231)
(* x -3.0)
(if (<= z 6.5e-177)
(* y 4.0)
(if (<= z 1.8e-40)
(* x -3.0)
(if (<= z 0.65) (* y 4.0) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -25500.0) {
tmp = t_0;
} else if (z <= -5e-184) {
tmp = y * 4.0;
} else if (z <= -3.7e-233) {
tmp = x * -3.0;
} else if (z <= -2.6e-304) {
tmp = y * 4.0;
} else if (z <= 3.9e-231) {
tmp = x * -3.0;
} else if (z <= 6.5e-177) {
tmp = y * 4.0;
} else if (z <= 1.8e-40) {
tmp = x * -3.0;
} else if (z <= 0.65) {
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 <= (-25500.0d0)) then
tmp = t_0
else if (z <= (-5d-184)) then
tmp = y * 4.0d0
else if (z <= (-3.7d-233)) then
tmp = x * (-3.0d0)
else if (z <= (-2.6d-304)) then
tmp = y * 4.0d0
else if (z <= 3.9d-231) then
tmp = x * (-3.0d0)
else if (z <= 6.5d-177) then
tmp = y * 4.0d0
else if (z <= 1.8d-40) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) 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 <= -25500.0) {
tmp = t_0;
} else if (z <= -5e-184) {
tmp = y * 4.0;
} else if (z <= -3.7e-233) {
tmp = x * -3.0;
} else if (z <= -2.6e-304) {
tmp = y * 4.0;
} else if (z <= 3.9e-231) {
tmp = x * -3.0;
} else if (z <= 6.5e-177) {
tmp = y * 4.0;
} else if (z <= 1.8e-40) {
tmp = x * -3.0;
} else if (z <= 0.65) {
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 <= -25500.0: tmp = t_0 elif z <= -5e-184: tmp = y * 4.0 elif z <= -3.7e-233: tmp = x * -3.0 elif z <= -2.6e-304: tmp = y * 4.0 elif z <= 3.9e-231: tmp = x * -3.0 elif z <= 6.5e-177: tmp = y * 4.0 elif z <= 1.8e-40: tmp = x * -3.0 elif z <= 0.65: 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 <= -25500.0) tmp = t_0; elseif (z <= -5e-184) tmp = Float64(y * 4.0); elseif (z <= -3.7e-233) tmp = Float64(x * -3.0); elseif (z <= -2.6e-304) tmp = Float64(y * 4.0); elseif (z <= 3.9e-231) tmp = Float64(x * -3.0); elseif (z <= 6.5e-177) tmp = Float64(y * 4.0); elseif (z <= 1.8e-40) tmp = Float64(x * -3.0); elseif (z <= 0.65) 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 <= -25500.0) tmp = t_0; elseif (z <= -5e-184) tmp = y * 4.0; elseif (z <= -3.7e-233) tmp = x * -3.0; elseif (z <= -2.6e-304) tmp = y * 4.0; elseif (z <= 3.9e-231) tmp = x * -3.0; elseif (z <= 6.5e-177) tmp = y * 4.0; elseif (z <= 1.8e-40) tmp = x * -3.0; elseif (z <= 0.65) 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, -25500.0], t$95$0, If[LessEqual[z, -5e-184], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.7e-233], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.6e-304], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.9e-231], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.5e-177], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.8e-40], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], 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 -25500:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-184}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-233}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-304}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-231}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-177}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-40}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -25500 or 0.650000000000000022 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 81.9%
Taylor expanded in y around inf 52.8%
*-commutative52.8%
Simplified52.8%
Taylor expanded in z around inf 51.5%
if -25500 < z < -5.00000000000000003e-184 or -3.6999999999999998e-233 < z < -2.59999999999999997e-304 or 3.8999999999999998e-231 < z < 6.4999999999999998e-177 or 1.8e-40 < z < 0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 95.1%
distribute-rgt-in95.1%
associate-+r+95.1%
*-commutative95.1%
associate-*r*95.2%
metadata-eval95.2%
distribute-rgt1-in95.2%
metadata-eval95.2%
*-commutative95.2%
*-commutative95.2%
associate-*l*95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in x around 0 68.6%
*-commutative68.6%
Simplified68.6%
if -5.00000000000000003e-184 < z < -3.6999999999999998e-233 or -2.59999999999999997e-304 < z < 3.8999999999999998e-231 or 6.4999999999999998e-177 < z < 1.8e-40Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 67.7%
sub-neg67.7%
distribute-rgt-in67.7%
metadata-eval67.7%
distribute-lft-neg-in67.7%
associate-+r+67.7%
metadata-eval67.7%
*-commutative67.7%
distribute-lft-neg-in67.7%
metadata-eval67.7%
Simplified67.7%
Taylor expanded in z around 0 67.7%
*-commutative67.7%
Simplified67.7%
Final simplification60.1%
(FPCore (x y z)
:precision binary64
(if (<= x -4.4e+247)
(* x -3.0)
(if (<= x -3.2e+200)
(* 6.0 (* x z))
(if (or (<= x -1.3e+77) (not (<= x 2.2e+35)))
(* x -3.0)
(* 6.0 (* y (- 0.6666666666666666 z)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.4e+247) {
tmp = x * -3.0;
} else if (x <= -3.2e+200) {
tmp = 6.0 * (x * z);
} else if ((x <= -1.3e+77) || !(x <= 2.2e+35)) {
tmp = x * -3.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 <= (-4.4d+247)) then
tmp = x * (-3.0d0)
else if (x <= (-3.2d+200)) then
tmp = 6.0d0 * (x * z)
else if ((x <= (-1.3d+77)) .or. (.not. (x <= 2.2d+35))) then
tmp = x * (-3.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 <= -4.4e+247) {
tmp = x * -3.0;
} else if (x <= -3.2e+200) {
tmp = 6.0 * (x * z);
} else if ((x <= -1.3e+77) || !(x <= 2.2e+35)) {
tmp = x * -3.0;
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.4e+247: tmp = x * -3.0 elif x <= -3.2e+200: tmp = 6.0 * (x * z) elif (x <= -1.3e+77) or not (x <= 2.2e+35): tmp = x * -3.0 else: tmp = 6.0 * (y * (0.6666666666666666 - z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.4e+247) tmp = Float64(x * -3.0); elseif (x <= -3.2e+200) tmp = Float64(6.0 * Float64(x * z)); elseif ((x <= -1.3e+77) || !(x <= 2.2e+35)) tmp = Float64(x * -3.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 <= -4.4e+247) tmp = x * -3.0; elseif (x <= -3.2e+200) tmp = 6.0 * (x * z); elseif ((x <= -1.3e+77) || ~((x <= 2.2e+35))) tmp = x * -3.0; else tmp = 6.0 * (y * (0.6666666666666666 - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.4e+247], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, -3.2e+200], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.3e+77], N[Not[LessEqual[x, 2.2e+35]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+247}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{+200}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{+77} \lor \neg \left(x \leq 2.2 \cdot 10^{+35}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\end{array}
\end{array}
if x < -4.40000000000000022e247 or -3.20000000000000031e200 < x < -1.3000000000000001e77 or 2.1999999999999999e35 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 84.1%
sub-neg84.1%
distribute-rgt-in84.1%
metadata-eval84.1%
distribute-lft-neg-in84.1%
associate-+r+84.1%
metadata-eval84.1%
*-commutative84.1%
distribute-lft-neg-in84.1%
metadata-eval84.1%
Simplified84.1%
Taylor expanded in z around 0 50.7%
*-commutative50.7%
Simplified50.7%
if -4.40000000000000022e247 < x < -3.20000000000000031e200Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 93.2%
sub-neg93.2%
distribute-rgt-in93.2%
metadata-eval93.2%
distribute-lft-neg-in93.2%
associate-+r+93.2%
metadata-eval93.2%
*-commutative93.2%
distribute-lft-neg-in93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around inf 83.5%
*-commutative83.5%
Simplified83.5%
if -1.3000000000000001e77 < x < 2.1999999999999999e35Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 95.5%
Taylor expanded in y around inf 75.4%
*-commutative75.4%
Simplified75.4%
Final simplification67.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.6) (not (<= z 0.52))) (* z (+ (* y -6.0) (* x 6.0))) (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.52)) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.6d0)) .or. (.not. (z <= 0.52d0))) then
tmp = z * ((y * (-6.0d0)) + (x * 6.0d0))
else
tmp = (x * (-3.0d0)) + (y * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.52)) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.6) or not (z <= 0.52): tmp = z * ((y * -6.0) + (x * 6.0)) else: tmp = (x * -3.0) + (y * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.6) || !(z <= 0.52)) tmp = Float64(z * Float64(Float64(y * -6.0) + Float64(x * 6.0))); else tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.6) || ~((z <= 0.52))) tmp = z * ((y * -6.0) + (x * 6.0)); else tmp = (x * -3.0) + (y * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.6], N[Not[LessEqual[z, 0.52]], $MachinePrecision]], N[(z * N[(N[(y * -6.0), $MachinePrecision] + N[(x * 6.0), $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.6 \lor \neg \left(z \leq 0.52\right):\\
\;\;\;\;z \cdot \left(y \cdot -6 + x \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\end{array}
\end{array}
if z < -0.599999999999999978 or 0.52000000000000002 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
Taylor expanded in z around inf 97.6%
mul-1-neg97.6%
fma-define97.6%
distribute-rgt-neg-in97.6%
fma-define97.6%
+-commutative97.6%
distribute-neg-in97.6%
distribute-lft-neg-in97.6%
metadata-eval97.6%
distribute-rgt-neg-in97.6%
mul-1-neg97.6%
distribute-lft-in97.6%
mul-1-neg97.6%
sub-neg97.6%
Simplified97.6%
Taylor expanded in y around 0 97.6%
Taylor expanded in z around inf 97.7%
if -0.599999999999999978 < z < 0.52000000000000002Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 97.6%
distribute-rgt-in97.6%
associate-+r+97.6%
*-commutative97.6%
associate-*r*97.8%
metadata-eval97.8%
distribute-rgt1-in97.8%
metadata-eval97.8%
*-commutative97.8%
*-commutative97.8%
associate-*l*98.0%
metadata-eval98.0%
Simplified98.0%
Final simplification97.8%
(FPCore (x y z) :precision binary64 (if (<= z -0.65) (+ x (* -6.0 (* (- y x) z))) (if (<= z 0.65) (+ (* x -3.0) (* y 4.0)) (* z (+ (* y -6.0) (* x 6.0))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.65) {
tmp = x + (-6.0 * ((y - x) * z));
} else if (z <= 0.65) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y * -6.0) + (x * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.65d0)) then
tmp = x + ((-6.0d0) * ((y - x) * z))
else if (z <= 0.65d0) then
tmp = (x * (-3.0d0)) + (y * 4.0d0)
else
tmp = z * ((y * (-6.0d0)) + (x * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.65) {
tmp = x + (-6.0 * ((y - x) * z));
} else if (z <= 0.65) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y * -6.0) + (x * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.65: tmp = x + (-6.0 * ((y - x) * z)) elif z <= 0.65: tmp = (x * -3.0) + (y * 4.0) else: tmp = z * ((y * -6.0) + (x * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.65) tmp = Float64(x + Float64(-6.0 * Float64(Float64(y - x) * z))); elseif (z <= 0.65) tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); else tmp = Float64(z * Float64(Float64(y * -6.0) + Float64(x * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.65) tmp = x + (-6.0 * ((y - x) * z)); elseif (z <= 0.65) tmp = (x * -3.0) + (y * 4.0); else tmp = z * ((y * -6.0) + (x * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.65], N[(x + N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.65], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y * -6.0), $MachinePrecision] + N[(x * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.65:\\
\;\;\;\;x + -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot -6 + x \cdot 6\right)\\
\end{array}
\end{array}
if z < -0.650000000000000022Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 98.2%
if -0.650000000000000022 < z < 0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 97.6%
distribute-rgt-in97.6%
associate-+r+97.6%
*-commutative97.6%
associate-*r*97.8%
metadata-eval97.8%
distribute-rgt1-in97.8%
metadata-eval97.8%
*-commutative97.8%
*-commutative97.8%
associate-*l*98.0%
metadata-eval98.0%
Simplified98.0%
if 0.650000000000000022 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
Taylor expanded in z around inf 97.1%
mul-1-neg97.1%
fma-define97.1%
distribute-rgt-neg-in97.1%
fma-define97.1%
+-commutative97.1%
distribute-neg-in97.1%
distribute-lft-neg-in97.1%
metadata-eval97.1%
distribute-rgt-neg-in97.1%
mul-1-neg97.1%
distribute-lft-in97.1%
mul-1-neg97.1%
sub-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 97.1%
Taylor expanded in z around inf 97.1%
Final simplification97.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -310000000000.0) (not (<= x 3e+32))) (* x (+ -3.0 (* z 6.0))) (* 6.0 (* y (- 0.6666666666666666 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -310000000000.0) || !(x <= 3e+32)) {
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 <= (-310000000000.0d0)) .or. (.not. (x <= 3d+32))) 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 <= -310000000000.0) || !(x <= 3e+32)) {
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 <= -310000000000.0) or not (x <= 3e+32): 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 <= -310000000000.0) || !(x <= 3e+32)) 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 <= -310000000000.0) || ~((x <= 3e+32))) 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, -310000000000.0], N[Not[LessEqual[x, 3e+32]], $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 -310000000000 \lor \neg \left(x \leq 3 \cdot 10^{+32}\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.1e11 or 3e32 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 81.9%
sub-neg81.9%
distribute-rgt-in81.9%
metadata-eval81.9%
distribute-lft-neg-in81.9%
associate-+r+81.9%
metadata-eval81.9%
*-commutative81.9%
distribute-lft-neg-in81.9%
metadata-eval81.9%
Simplified81.9%
if -3.1e11 < x < 3e32Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 97.7%
Taylor expanded in y around inf 78.9%
*-commutative78.9%
Simplified78.9%
Final simplification80.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -310000000000.0) (not (<= x 9.8e+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 <= -310000000000.0) || !(x <= 9.8e+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 <= (-310000000000.0d0)) .or. (.not. (x <= 9.8d+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 <= -310000000000.0) || !(x <= 9.8e+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 <= -310000000000.0) or not (x <= 9.8e+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 <= -310000000000.0) || !(x <= 9.8e+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 <= -310000000000.0) || ~((x <= 9.8e+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, -310000000000.0], N[Not[LessEqual[x, 9.8e+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 -310000000000 \lor \neg \left(x \leq 9.8 \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 < -3.1e11 or 9.8000000000000003e27 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 81.9%
sub-neg81.9%
distribute-rgt-in81.9%
metadata-eval81.9%
distribute-lft-neg-in81.9%
associate-+r+81.9%
metadata-eval81.9%
*-commutative81.9%
distribute-lft-neg-in81.9%
metadata-eval81.9%
Simplified81.9%
if -3.1e11 < x < 9.8000000000000003e27Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 79.2%
Final simplification80.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -310000000000.0) (not (<= x 2e+35))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -310000000000.0) || !(x <= 2e+35)) {
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 <= (-310000000000.0d0)) .or. (.not. (x <= 2d+35))) 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 <= -310000000000.0) || !(x <= 2e+35)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -310000000000.0) or not (x <= 2e+35): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -310000000000.0) || !(x <= 2e+35)) 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 <= -310000000000.0) || ~((x <= 2e+35))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -310000000000.0], N[Not[LessEqual[x, 2e+35]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -310000000000 \lor \neg \left(x \leq 2 \cdot 10^{+35}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -3.1e11 or 1.9999999999999999e35 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 81.8%
sub-neg81.8%
distribute-rgt-in81.8%
metadata-eval81.8%
distribute-lft-neg-in81.8%
associate-+r+81.8%
metadata-eval81.8%
*-commutative81.8%
distribute-lft-neg-in81.8%
metadata-eval81.8%
Simplified81.8%
Taylor expanded in z around 0 44.7%
*-commutative44.7%
Simplified44.7%
if -3.1e11 < x < 1.9999999999999999e35Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
Taylor expanded in z around 0 48.4%
distribute-rgt-in48.4%
associate-+r+48.4%
*-commutative48.4%
associate-*r*48.4%
metadata-eval48.4%
distribute-rgt1-in48.4%
metadata-eval48.4%
*-commutative48.4%
*-commutative48.4%
associate-*l*48.6%
metadata-eval48.6%
Simplified48.6%
Taylor expanded in x around 0 40.7%
*-commutative40.7%
Simplified40.7%
Final simplification42.4%
(FPCore (x y z) :precision binary64 (+ x (* (+ (* x -6.0) (* y 6.0)) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((x * -6.0) + (y * 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 + (((x * (-6.0d0)) + (y * 6.0d0)) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((x * -6.0) + (y * 6.0)) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((x * -6.0) + (y * 6.0)) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(x * -6.0) + Float64(y * 6.0)) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((x * -6.0) + (y * 6.0)) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(x * -6.0), $MachinePrecision] + N[(y * 6.0), $MachinePrecision]), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(x \cdot -6 + y \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
Final simplification99.6%
(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 (* 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 47.9%
sub-neg47.9%
distribute-rgt-in47.9%
metadata-eval47.9%
distribute-lft-neg-in47.9%
associate-+r+47.9%
metadata-eval47.9%
*-commutative47.9%
distribute-lft-neg-in47.9%
metadata-eval47.9%
Simplified47.9%
Taylor expanded in z around 0 25.3%
*-commutative25.3%
Simplified25.3%
Final simplification25.3%
(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 0 99.6%
Taylor expanded in z around inf 49.4%
mul-1-neg49.4%
fma-define49.4%
distribute-rgt-neg-in49.4%
fma-define49.4%
+-commutative49.4%
distribute-neg-in49.4%
distribute-lft-neg-in49.4%
metadata-eval49.4%
distribute-rgt-neg-in49.4%
mul-1-neg49.4%
distribute-lft-in49.4%
mul-1-neg49.4%
sub-neg49.4%
Simplified49.4%
Taylor expanded in z around 0 2.4%
Final simplification2.4%
herbie shell --seed 2024067
(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))))