
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)
\end{array}
Initial program 99.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%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -5.1e+197)
t_0
(if (<= z -1.05e+97)
t_1
(if (<= z -2.6e-11)
t_0
(if (<= z -9.5e-67)
(* x -3.0)
(if (<= z -1.75e-167)
(* y 4.0)
(if (<= z 2e-307)
(* x -3.0)
(if (<= z 5.4e-217)
(* y 4.0)
(if (<= z 3.6e-151)
(* x -3.0)
(if (<= z 1.1e-116)
(* y 4.0)
(if (<= z 4.4e-74)
(* x -3.0)
(if (<= z 0.5) (* y 4.0) t_1)))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -5.1e+197) {
tmp = t_0;
} else if (z <= -1.05e+97) {
tmp = t_1;
} else if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= -9.5e-67) {
tmp = x * -3.0;
} else if (z <= -1.75e-167) {
tmp = y * 4.0;
} else if (z <= 2e-307) {
tmp = x * -3.0;
} else if (z <= 5.4e-217) {
tmp = y * 4.0;
} else if (z <= 3.6e-151) {
tmp = x * -3.0;
} else if (z <= 1.1e-116) {
tmp = y * 4.0;
} else if (z <= 4.4e-74) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.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 = 6.0d0 * (x * z)
if (z <= (-5.1d+197)) then
tmp = t_0
else if (z <= (-1.05d+97)) then
tmp = t_1
else if (z <= (-2.6d-11)) then
tmp = t_0
else if (z <= (-9.5d-67)) then
tmp = x * (-3.0d0)
else if (z <= (-1.75d-167)) then
tmp = y * 4.0d0
else if (z <= 2d-307) then
tmp = x * (-3.0d0)
else if (z <= 5.4d-217) then
tmp = y * 4.0d0
else if (z <= 3.6d-151) then
tmp = x * (-3.0d0)
else if (z <= 1.1d-116) then
tmp = y * 4.0d0
else if (z <= 4.4d-74) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
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 = 6.0 * (x * z);
double tmp;
if (z <= -5.1e+197) {
tmp = t_0;
} else if (z <= -1.05e+97) {
tmp = t_1;
} else if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= -9.5e-67) {
tmp = x * -3.0;
} else if (z <= -1.75e-167) {
tmp = y * 4.0;
} else if (z <= 2e-307) {
tmp = x * -3.0;
} else if (z <= 5.4e-217) {
tmp = y * 4.0;
} else if (z <= 3.6e-151) {
tmp = x * -3.0;
} else if (z <= 1.1e-116) {
tmp = y * 4.0;
} else if (z <= 4.4e-74) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -5.1e+197: tmp = t_0 elif z <= -1.05e+97: tmp = t_1 elif z <= -2.6e-11: tmp = t_0 elif z <= -9.5e-67: tmp = x * -3.0 elif z <= -1.75e-167: tmp = y * 4.0 elif z <= 2e-307: tmp = x * -3.0 elif z <= 5.4e-217: tmp = y * 4.0 elif z <= 3.6e-151: tmp = x * -3.0 elif z <= 1.1e-116: tmp = y * 4.0 elif z <= 4.4e-74: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -5.1e+197) tmp = t_0; elseif (z <= -1.05e+97) tmp = t_1; elseif (z <= -2.6e-11) tmp = t_0; elseif (z <= -9.5e-67) tmp = Float64(x * -3.0); elseif (z <= -1.75e-167) tmp = Float64(y * 4.0); elseif (z <= 2e-307) tmp = Float64(x * -3.0); elseif (z <= 5.4e-217) tmp = Float64(y * 4.0); elseif (z <= 3.6e-151) tmp = Float64(x * -3.0); elseif (z <= 1.1e-116) tmp = Float64(y * 4.0); elseif (z <= 4.4e-74) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -5.1e+197) tmp = t_0; elseif (z <= -1.05e+97) tmp = t_1; elseif (z <= -2.6e-11) tmp = t_0; elseif (z <= -9.5e-67) tmp = x * -3.0; elseif (z <= -1.75e-167) tmp = y * 4.0; elseif (z <= 2e-307) tmp = x * -3.0; elseif (z <= 5.4e-217) tmp = y * 4.0; elseif (z <= 3.6e-151) tmp = x * -3.0; elseif (z <= 1.1e-116) tmp = y * 4.0; elseif (z <= 4.4e-74) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.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[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e+197], t$95$0, If[LessEqual[z, -1.05e+97], t$95$1, If[LessEqual[z, -2.6e-11], t$95$0, If[LessEqual[z, -9.5e-67], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.75e-167], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.4e-217], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.6e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.1e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.4e-74], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], t$95$1]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{+197}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-67}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-167}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-217}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-74}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.09999999999999992e197 or -1.05000000000000006e97 < z < -2.6000000000000001e-11Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 69.7%
associate-*r*69.6%
Simplified69.6%
Taylor expanded in z around inf 61.8%
*-commutative61.8%
Simplified61.8%
if -5.09999999999999992e197 < z < -1.05000000000000006e97 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 67.1%
sub-neg67.1%
distribute-rgt-in67.1%
metadata-eval67.1%
neg-mul-167.1%
associate-*r*67.1%
*-commutative67.1%
associate-+r+67.1%
metadata-eval67.1%
associate-*r*67.1%
metadata-eval67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in z around inf 67.0%
if -2.6000000000000001e-11 < z < -9.4999999999999994e-67 or -1.75e-167 < z < 1.99999999999999982e-307 or 5.40000000000000032e-217 < z < 3.60000000000000032e-151 or 1.10000000000000005e-116 < z < 4.40000000000000021e-74Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 71.4%
sub-neg71.4%
distribute-rgt-in71.4%
metadata-eval71.4%
neg-mul-171.4%
associate-*r*71.4%
*-commutative71.4%
associate-+r+71.4%
metadata-eval71.4%
associate-*r*71.4%
metadata-eval71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around 0 70.8%
*-commutative70.8%
Simplified70.8%
if -9.4999999999999994e-67 < z < -1.75e-167 or 1.99999999999999982e-307 < z < 5.40000000000000032e-217 or 3.60000000000000032e-151 < z < 1.10000000000000005e-116 or 4.40000000000000021e-74 < z < 0.5Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.4%
fma-def99.4%
pow299.4%
associate-*l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 68.6%
associate-*r*68.9%
Simplified68.9%
Taylor expanded in z around 0 67.8%
*-commutative67.8%
Simplified67.8%
Final simplification67.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -3.3e+198)
t_0
(if (<= z -5.2e+97)
t_1
(if (<= z -2.6e-11)
t_0
(if (<= z -1.75e-66)
(* x -3.0)
(if (<= z -7.5e-167)
(* y 4.0)
(if (<= z 4.7e-307)
(* x -3.0)
(if (<= z 1.15e-222)
(* y 4.0)
(if (<= z 4e-151)
(* x -3.0)
(if (<= z 5.2e-115)
(* y 4.0)
(if (<= z 6.5e-69)
(* x -3.0)
(if (<= z 0.66) (* y 4.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+198) {
tmp = t_0;
} else if (z <= -5.2e+97) {
tmp = t_1;
} else if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= -1.75e-66) {
tmp = x * -3.0;
} else if (z <= -7.5e-167) {
tmp = y * 4.0;
} else if (z <= 4.7e-307) {
tmp = x * -3.0;
} else if (z <= 1.15e-222) {
tmp = y * 4.0;
} else if (z <= 4e-151) {
tmp = x * -3.0;
} else if (z <= 5.2e-115) {
tmp = y * 4.0;
} else if (z <= 6.5e-69) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.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+198)) then
tmp = t_0
else if (z <= (-5.2d+97)) then
tmp = t_1
else if (z <= (-2.6d-11)) then
tmp = t_0
else if (z <= (-1.75d-66)) then
tmp = x * (-3.0d0)
else if (z <= (-7.5d-167)) then
tmp = y * 4.0d0
else if (z <= 4.7d-307) then
tmp = x * (-3.0d0)
else if (z <= 1.15d-222) then
tmp = y * 4.0d0
else if (z <= 4d-151) then
tmp = x * (-3.0d0)
else if (z <= 5.2d-115) then
tmp = y * 4.0d0
else if (z <= 6.5d-69) then
tmp = x * (-3.0d0)
else if (z <= 0.66d0) then
tmp = y * 4.0d0
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+198) {
tmp = t_0;
} else if (z <= -5.2e+97) {
tmp = t_1;
} else if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= -1.75e-66) {
tmp = x * -3.0;
} else if (z <= -7.5e-167) {
tmp = y * 4.0;
} else if (z <= 4.7e-307) {
tmp = x * -3.0;
} else if (z <= 1.15e-222) {
tmp = y * 4.0;
} else if (z <= 4e-151) {
tmp = x * -3.0;
} else if (z <= 5.2e-115) {
tmp = y * 4.0;
} else if (z <= 6.5e-69) {
tmp = x * -3.0;
} else if (z <= 0.66) {
tmp = y * 4.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+198: tmp = t_0 elif z <= -5.2e+97: tmp = t_1 elif z <= -2.6e-11: tmp = t_0 elif z <= -1.75e-66: tmp = x * -3.0 elif z <= -7.5e-167: tmp = y * 4.0 elif z <= 4.7e-307: tmp = x * -3.0 elif z <= 1.15e-222: tmp = y * 4.0 elif z <= 4e-151: tmp = x * -3.0 elif z <= 5.2e-115: tmp = y * 4.0 elif z <= 6.5e-69: tmp = x * -3.0 elif z <= 0.66: tmp = y * 4.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+198) tmp = t_0; elseif (z <= -5.2e+97) tmp = t_1; elseif (z <= -2.6e-11) tmp = t_0; elseif (z <= -1.75e-66) tmp = Float64(x * -3.0); elseif (z <= -7.5e-167) tmp = Float64(y * 4.0); elseif (z <= 4.7e-307) tmp = Float64(x * -3.0); elseif (z <= 1.15e-222) tmp = Float64(y * 4.0); elseif (z <= 4e-151) tmp = Float64(x * -3.0); elseif (z <= 5.2e-115) tmp = Float64(y * 4.0); elseif (z <= 6.5e-69) tmp = Float64(x * -3.0); elseif (z <= 0.66) tmp = Float64(y * 4.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+198) tmp = t_0; elseif (z <= -5.2e+97) tmp = t_1; elseif (z <= -2.6e-11) tmp = t_0; elseif (z <= -1.75e-66) tmp = x * -3.0; elseif (z <= -7.5e-167) tmp = y * 4.0; elseif (z <= 4.7e-307) tmp = x * -3.0; elseif (z <= 1.15e-222) tmp = y * 4.0; elseif (z <= 4e-151) tmp = x * -3.0; elseif (z <= 5.2e-115) tmp = y * 4.0; elseif (z <= 6.5e-69) tmp = x * -3.0; elseif (z <= 0.66) tmp = y * 4.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+198], t$95$0, If[LessEqual[z, -5.2e+97], t$95$1, If[LessEqual[z, -2.6e-11], t$95$0, If[LessEqual[z, -1.75e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7.5e-167], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.7e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.15e-222], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.2e-115], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.5e-69], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], 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^{+198}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-167}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-222}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-115}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-69}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.66:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.29999999999999994e198 or -5.2e97 < z < -2.6000000000000001e-11Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 69.7%
associate-*r*69.6%
Simplified69.6%
Taylor expanded in z around inf 61.8%
*-commutative61.8%
Simplified61.8%
if -3.29999999999999994e198 < z < -5.2e97 or 0.660000000000000031 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 67.1%
sub-neg67.1%
distribute-rgt-in67.1%
metadata-eval67.1%
neg-mul-167.1%
associate-*r*67.1%
*-commutative67.1%
associate-+r+67.1%
metadata-eval67.1%
associate-*r*67.1%
metadata-eval67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in z around inf 67.0%
*-commutative67.0%
associate-*r*67.1%
Simplified67.1%
if -2.6000000000000001e-11 < z < -1.75e-66 or -7.5000000000000007e-167 < z < 4.69999999999999967e-307 or 1.1500000000000001e-222 < z < 3.9999999999999998e-151 or 5.20000000000000008e-115 < z < 6.49999999999999951e-69Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 71.4%
sub-neg71.4%
distribute-rgt-in71.4%
metadata-eval71.4%
neg-mul-171.4%
associate-*r*71.4%
*-commutative71.4%
associate-+r+71.4%
metadata-eval71.4%
associate-*r*71.4%
metadata-eval71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around 0 70.8%
*-commutative70.8%
Simplified70.8%
if -1.75e-66 < z < -7.5000000000000007e-167 or 4.69999999999999967e-307 < z < 1.1500000000000001e-222 or 3.9999999999999998e-151 < z < 5.20000000000000008e-115 or 6.49999999999999951e-69 < z < 0.660000000000000031Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.4%
fma-def99.4%
pow299.4%
associate-*l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 68.6%
associate-*r*68.9%
Simplified68.9%
Taylor expanded in z around 0 67.8%
*-commutative67.8%
Simplified67.8%
Final simplification67.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -1.95e+197)
t_0
(if (<= z -1.85e+96)
(* x (* z 6.0))
(if (<= z -2.6e-11)
t_0
(if (<= z -4.8e-67)
(* x -3.0)
(if (<= z -5.4e-172)
(* y 4.0)
(if (<= z 1.6e-307)
(* x -3.0)
(if (<= z 2.3e-222)
(* y 4.0)
(if (<= z 3.8e-151)
(* x -3.0)
(if (<= z 3.65e-116)
(* y 4.0)
(if (<= z 5.2e-70)
(* x -3.0)
(if (<= z 0.5) (* y 4.0) (* z (* x 6.0)))))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -1.95e+197) {
tmp = t_0;
} else if (z <= -1.85e+96) {
tmp = x * (z * 6.0);
} else if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= -4.8e-67) {
tmp = x * -3.0;
} else if (z <= -5.4e-172) {
tmp = y * 4.0;
} else if (z <= 1.6e-307) {
tmp = x * -3.0;
} else if (z <= 2.3e-222) {
tmp = y * 4.0;
} else if (z <= 3.8e-151) {
tmp = x * -3.0;
} else if (z <= 3.65e-116) {
tmp = y * 4.0;
} else if (z <= 5.2e-70) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = z * (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) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-1.95d+197)) then
tmp = t_0
else if (z <= (-1.85d+96)) then
tmp = x * (z * 6.0d0)
else if (z <= (-2.6d-11)) then
tmp = t_0
else if (z <= (-4.8d-67)) then
tmp = x * (-3.0d0)
else if (z <= (-5.4d-172)) then
tmp = y * 4.0d0
else if (z <= 1.6d-307) then
tmp = x * (-3.0d0)
else if (z <= 2.3d-222) then
tmp = y * 4.0d0
else if (z <= 3.8d-151) then
tmp = x * (-3.0d0)
else if (z <= 3.65d-116) then
tmp = y * 4.0d0
else if (z <= 5.2d-70) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
else
tmp = z * (x * 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -1.95e+197) {
tmp = t_0;
} else if (z <= -1.85e+96) {
tmp = x * (z * 6.0);
} else if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= -4.8e-67) {
tmp = x * -3.0;
} else if (z <= -5.4e-172) {
tmp = y * 4.0;
} else if (z <= 1.6e-307) {
tmp = x * -3.0;
} else if (z <= 2.3e-222) {
tmp = y * 4.0;
} else if (z <= 3.8e-151) {
tmp = x * -3.0;
} else if (z <= 3.65e-116) {
tmp = y * 4.0;
} else if (z <= 5.2e-70) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = z * (x * 6.0);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -1.95e+197: tmp = t_0 elif z <= -1.85e+96: tmp = x * (z * 6.0) elif z <= -2.6e-11: tmp = t_0 elif z <= -4.8e-67: tmp = x * -3.0 elif z <= -5.4e-172: tmp = y * 4.0 elif z <= 1.6e-307: tmp = x * -3.0 elif z <= 2.3e-222: tmp = y * 4.0 elif z <= 3.8e-151: tmp = x * -3.0 elif z <= 3.65e-116: tmp = y * 4.0 elif z <= 5.2e-70: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 else: tmp = z * (x * 6.0) return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -1.95e+197) tmp = t_0; elseif (z <= -1.85e+96) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -2.6e-11) tmp = t_0; elseif (z <= -4.8e-67) tmp = Float64(x * -3.0); elseif (z <= -5.4e-172) tmp = Float64(y * 4.0); elseif (z <= 1.6e-307) tmp = Float64(x * -3.0); elseif (z <= 2.3e-222) tmp = Float64(y * 4.0); elseif (z <= 3.8e-151) tmp = Float64(x * -3.0); elseif (z <= 3.65e-116) tmp = Float64(y * 4.0); elseif (z <= 5.2e-70) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); else tmp = Float64(z * Float64(x * 6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -1.95e+197) tmp = t_0; elseif (z <= -1.85e+96) tmp = x * (z * 6.0); elseif (z <= -2.6e-11) tmp = t_0; elseif (z <= -4.8e-67) tmp = x * -3.0; elseif (z <= -5.4e-172) tmp = y * 4.0; elseif (z <= 1.6e-307) tmp = x * -3.0; elseif (z <= 2.3e-222) tmp = y * 4.0; elseif (z <= 3.8e-151) tmp = x * -3.0; elseif (z <= 3.65e-116) tmp = y * 4.0; elseif (z <= 5.2e-70) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; else tmp = z * (x * 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+197], t$95$0, If[LessEqual[z, -1.85e+96], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-11], t$95$0, If[LessEqual[z, -4.8e-67], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.4e-172], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.6e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.3e-222], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.8e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.65e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.2e-70], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+197}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+96}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-67}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-172}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-222}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.65 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-70}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\end{array}
\end{array}
if z < -1.95e197 or -1.84999999999999996e96 < z < -2.6000000000000001e-11Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 69.7%
associate-*r*69.6%
Simplified69.6%
Taylor expanded in z around inf 61.8%
*-commutative61.8%
Simplified61.8%
if -1.95e197 < z < -1.84999999999999996e96Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 69.9%
sub-neg69.9%
distribute-rgt-in69.9%
metadata-eval69.9%
neg-mul-169.9%
associate-*r*69.9%
*-commutative69.9%
associate-+r+69.9%
metadata-eval69.9%
associate-*r*69.9%
metadata-eval69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in z around inf 69.7%
*-commutative69.7%
associate-*r*69.9%
Simplified69.9%
if -2.6000000000000001e-11 < z < -4.8e-67 or -5.40000000000000051e-172 < z < 1.60000000000000005e-307 or 2.3000000000000001e-222 < z < 3.7999999999999997e-151 or 3.6500000000000003e-116 < z < 5.20000000000000004e-70Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 71.4%
sub-neg71.4%
distribute-rgt-in71.4%
metadata-eval71.4%
neg-mul-171.4%
associate-*r*71.4%
*-commutative71.4%
associate-+r+71.4%
metadata-eval71.4%
associate-*r*71.4%
metadata-eval71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around 0 70.8%
*-commutative70.8%
Simplified70.8%
if -4.8e-67 < z < -5.40000000000000051e-172 or 1.60000000000000005e-307 < z < 2.3000000000000001e-222 or 3.7999999999999997e-151 < z < 3.6500000000000003e-116 or 5.20000000000000004e-70 < z < 0.5Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.4%
fma-def99.4%
pow299.4%
associate-*l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 68.6%
associate-*r*68.9%
Simplified68.9%
Taylor expanded in z around 0 67.8%
*-commutative67.8%
Simplified67.8%
if 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 66.1%
sub-neg66.1%
distribute-rgt-in66.1%
metadata-eval66.1%
neg-mul-166.1%
associate-*r*66.1%
*-commutative66.1%
associate-+r+66.1%
metadata-eval66.1%
associate-*r*66.1%
metadata-eval66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in z around inf 66.1%
*-commutative66.1%
associate-*l*66.1%
*-commutative66.1%
associate-*l*66.3%
Simplified66.3%
Final simplification67.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -2.6e-11)
t_0
(if (<= z -1.95e-69)
(* x -3.0)
(if (<= z -8e-178)
(* y 4.0)
(if (<= z 1.45e-306)
(* x -3.0)
(if (<= z 5.8e-219)
(* y 4.0)
(if (<= z 2.25e-151)
(* x -3.0)
(if (<= z 2.25e-116)
(* y 4.0)
(if (<= z 2.5e-68)
(* x -3.0)
(if (<= z 0.6) (* 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 <= -2.6e-11) {
tmp = t_0;
} else if (z <= -1.95e-69) {
tmp = x * -3.0;
} else if (z <= -8e-178) {
tmp = y * 4.0;
} else if (z <= 1.45e-306) {
tmp = x * -3.0;
} else if (z <= 5.8e-219) {
tmp = y * 4.0;
} else if (z <= 2.25e-151) {
tmp = x * -3.0;
} else if (z <= 2.25e-116) {
tmp = y * 4.0;
} else if (z <= 2.5e-68) {
tmp = x * -3.0;
} else if (z <= 0.6) {
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 <= (-2.6d-11)) then
tmp = t_0
else if (z <= (-1.95d-69)) then
tmp = x * (-3.0d0)
else if (z <= (-8d-178)) then
tmp = y * 4.0d0
else if (z <= 1.45d-306) then
tmp = x * (-3.0d0)
else if (z <= 5.8d-219) then
tmp = y * 4.0d0
else if (z <= 2.25d-151) then
tmp = x * (-3.0d0)
else if (z <= 2.25d-116) then
tmp = y * 4.0d0
else if (z <= 2.5d-68) then
tmp = x * (-3.0d0)
else if (z <= 0.6d0) 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 <= -2.6e-11) {
tmp = t_0;
} else if (z <= -1.95e-69) {
tmp = x * -3.0;
} else if (z <= -8e-178) {
tmp = y * 4.0;
} else if (z <= 1.45e-306) {
tmp = x * -3.0;
} else if (z <= 5.8e-219) {
tmp = y * 4.0;
} else if (z <= 2.25e-151) {
tmp = x * -3.0;
} else if (z <= 2.25e-116) {
tmp = y * 4.0;
} else if (z <= 2.5e-68) {
tmp = x * -3.0;
} else if (z <= 0.6) {
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 <= -2.6e-11: tmp = t_0 elif z <= -1.95e-69: tmp = x * -3.0 elif z <= -8e-178: tmp = y * 4.0 elif z <= 1.45e-306: tmp = x * -3.0 elif z <= 5.8e-219: tmp = y * 4.0 elif z <= 2.25e-151: tmp = x * -3.0 elif z <= 2.25e-116: tmp = y * 4.0 elif z <= 2.5e-68: tmp = x * -3.0 elif z <= 0.6: 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 <= -2.6e-11) tmp = t_0; elseif (z <= -1.95e-69) tmp = Float64(x * -3.0); elseif (z <= -8e-178) tmp = Float64(y * 4.0); elseif (z <= 1.45e-306) tmp = Float64(x * -3.0); elseif (z <= 5.8e-219) tmp = Float64(y * 4.0); elseif (z <= 2.25e-151) tmp = Float64(x * -3.0); elseif (z <= 2.25e-116) tmp = Float64(y * 4.0); elseif (z <= 2.5e-68) tmp = Float64(x * -3.0); elseif (z <= 0.6) 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 <= -2.6e-11) tmp = t_0; elseif (z <= -1.95e-69) tmp = x * -3.0; elseif (z <= -8e-178) tmp = y * 4.0; elseif (z <= 1.45e-306) tmp = x * -3.0; elseif (z <= 5.8e-219) tmp = y * 4.0; elseif (z <= 2.25e-151) tmp = x * -3.0; elseif (z <= 2.25e-116) tmp = y * 4.0; elseif (z <= 2.5e-68) tmp = x * -3.0; elseif (z <= 0.6) 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, -2.6e-11], t$95$0, If[LessEqual[z, -1.95e-69], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8e-178], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.45e-306], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.8e-219], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.25e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.25e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.5e-68], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.6], 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 -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-69}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-178}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-306}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-219}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-68}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.6000000000000001e-11 or 0.599999999999999978 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 95.8%
if -2.6000000000000001e-11 < z < -1.9499999999999999e-69 or -7.9999999999999996e-178 < z < 1.4499999999999999e-306 or 5.79999999999999968e-219 < z < 2.2500000000000001e-151 or 2.25000000000000006e-116 < z < 2.49999999999999986e-68Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 71.4%
sub-neg71.4%
distribute-rgt-in71.4%
metadata-eval71.4%
neg-mul-171.4%
associate-*r*71.4%
*-commutative71.4%
associate-+r+71.4%
metadata-eval71.4%
associate-*r*71.4%
metadata-eval71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around 0 70.8%
*-commutative70.8%
Simplified70.8%
if -1.9499999999999999e-69 < z < -7.9999999999999996e-178 or 1.4499999999999999e-306 < z < 5.79999999999999968e-219 or 2.2500000000000001e-151 < z < 2.25000000000000006e-116 or 2.49999999999999986e-68 < z < 0.599999999999999978Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.4%
fma-def99.4%
pow299.4%
associate-*l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 68.6%
associate-*r*68.9%
Simplified68.9%
Taylor expanded in z around 0 67.8%
*-commutative67.8%
Simplified67.8%
Final simplification83.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -2.6e-11)
t_0
(if (<= z -1.16e-67)
(* x -3.0)
(if (<= z -5.5e-173)
(* y 4.0)
(if (<= z 1e-306)
(* x -3.0)
(if (<= z 1.05e-220)
(* y 4.0)
(if (<= z 7.5e-151)
(* x -3.0)
(if (<= z 2.55e-115)
(* y 4.0)
(if (<= z 2.1e-64)
(* x -3.0)
(if (<= z 0.048) (* y 4.0) t_0)))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= -1.16e-67) {
tmp = x * -3.0;
} else if (z <= -5.5e-173) {
tmp = y * 4.0;
} else if (z <= 1e-306) {
tmp = x * -3.0;
} else if (z <= 1.05e-220) {
tmp = y * 4.0;
} else if (z <= 7.5e-151) {
tmp = x * -3.0;
} else if (z <= 2.55e-115) {
tmp = y * 4.0;
} else if (z <= 2.1e-64) {
tmp = x * -3.0;
} else if (z <= 0.048) {
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 <= (-2.6d-11)) then
tmp = t_0
else if (z <= (-1.16d-67)) then
tmp = x * (-3.0d0)
else if (z <= (-5.5d-173)) then
tmp = y * 4.0d0
else if (z <= 1d-306) then
tmp = x * (-3.0d0)
else if (z <= 1.05d-220) then
tmp = y * 4.0d0
else if (z <= 7.5d-151) then
tmp = x * (-3.0d0)
else if (z <= 2.55d-115) then
tmp = y * 4.0d0
else if (z <= 2.1d-64) then
tmp = x * (-3.0d0)
else if (z <= 0.048d0) 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 <= -2.6e-11) {
tmp = t_0;
} else if (z <= -1.16e-67) {
tmp = x * -3.0;
} else if (z <= -5.5e-173) {
tmp = y * 4.0;
} else if (z <= 1e-306) {
tmp = x * -3.0;
} else if (z <= 1.05e-220) {
tmp = y * 4.0;
} else if (z <= 7.5e-151) {
tmp = x * -3.0;
} else if (z <= 2.55e-115) {
tmp = y * 4.0;
} else if (z <= 2.1e-64) {
tmp = x * -3.0;
} else if (z <= 0.048) {
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 <= -2.6e-11: tmp = t_0 elif z <= -1.16e-67: tmp = x * -3.0 elif z <= -5.5e-173: tmp = y * 4.0 elif z <= 1e-306: tmp = x * -3.0 elif z <= 1.05e-220: tmp = y * 4.0 elif z <= 7.5e-151: tmp = x * -3.0 elif z <= 2.55e-115: tmp = y * 4.0 elif z <= 2.1e-64: tmp = x * -3.0 elif z <= 0.048: 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 <= -2.6e-11) tmp = t_0; elseif (z <= -1.16e-67) tmp = Float64(x * -3.0); elseif (z <= -5.5e-173) tmp = Float64(y * 4.0); elseif (z <= 1e-306) tmp = Float64(x * -3.0); elseif (z <= 1.05e-220) tmp = Float64(y * 4.0); elseif (z <= 7.5e-151) tmp = Float64(x * -3.0); elseif (z <= 2.55e-115) tmp = Float64(y * 4.0); elseif (z <= 2.1e-64) tmp = Float64(x * -3.0); elseif (z <= 0.048) 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 <= -2.6e-11) tmp = t_0; elseif (z <= -1.16e-67) tmp = x * -3.0; elseif (z <= -5.5e-173) tmp = y * 4.0; elseif (z <= 1e-306) tmp = x * -3.0; elseif (z <= 1.05e-220) tmp = y * 4.0; elseif (z <= 7.5e-151) tmp = x * -3.0; elseif (z <= 2.55e-115) tmp = y * 4.0; elseif (z <= 2.1e-64) tmp = x * -3.0; elseif (z <= 0.048) 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, -2.6e-11], t$95$0, If[LessEqual[z, -1.16e-67], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.5e-173], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1e-306], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e-220], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.5e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.55e-115], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.1e-64], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.048], 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 -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.16 \cdot 10^{-67}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-173}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 10^{-306}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-220}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-115}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-64}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.048:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.6000000000000001e-11 or 0.048000000000000001 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 51.5%
associate-*r*51.5%
Simplified51.5%
Taylor expanded in z around inf 47.7%
*-commutative47.7%
Simplified47.7%
if -2.6000000000000001e-11 < z < -1.16e-67 or -5.50000000000000022e-173 < z < 1.00000000000000003e-306 or 1.04999999999999996e-220 < z < 7.5000000000000004e-151 or 2.5499999999999999e-115 < z < 2.10000000000000011e-64Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 71.4%
sub-neg71.4%
distribute-rgt-in71.4%
metadata-eval71.4%
neg-mul-171.4%
associate-*r*71.4%
*-commutative71.4%
associate-+r+71.4%
metadata-eval71.4%
associate-*r*71.4%
metadata-eval71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around 0 70.8%
*-commutative70.8%
Simplified70.8%
if -1.16e-67 < z < -5.50000000000000022e-173 or 1.00000000000000003e-306 < z < 1.04999999999999996e-220 or 7.5000000000000004e-151 < z < 2.5499999999999999e-115 or 2.10000000000000011e-64 < z < 0.048000000000000001Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.4%
fma-def99.4%
pow299.4%
associate-*l*99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 69.8%
associate-*r*70.0%
Simplified70.0%
Taylor expanded in z around 0 69.0%
*-commutative69.0%
Simplified69.0%
Final simplification58.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -2.6e-11)
t_0
(if (<= z 3.2e-307)
(* x -3.0)
(if (<= z 1.7e-218)
(* y 4.0)
(if (<= z 1.4e-152)
(* x -3.0)
(if (<= z 1.95e-116)
(* y 4.0)
(if (<= z 3.3e-60)
(* x -3.0)
(if (<= z 112000.0)
(* 6.0 (* y (- 0.6666666666666666 z)))
t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= 3.2e-307) {
tmp = x * -3.0;
} else if (z <= 1.7e-218) {
tmp = y * 4.0;
} else if (z <= 1.4e-152) {
tmp = x * -3.0;
} else if (z <= 1.95e-116) {
tmp = y * 4.0;
} else if (z <= 3.3e-60) {
tmp = x * -3.0;
} else if (z <= 112000.0) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-2.6d-11)) then
tmp = t_0
else if (z <= 3.2d-307) then
tmp = x * (-3.0d0)
else if (z <= 1.7d-218) then
tmp = y * 4.0d0
else if (z <= 1.4d-152) then
tmp = x * (-3.0d0)
else if (z <= 1.95d-116) then
tmp = y * 4.0d0
else if (z <= 3.3d-60) then
tmp = x * (-3.0d0)
else if (z <= 112000.0d0) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -2.6e-11) {
tmp = t_0;
} else if (z <= 3.2e-307) {
tmp = x * -3.0;
} else if (z <= 1.7e-218) {
tmp = y * 4.0;
} else if (z <= 1.4e-152) {
tmp = x * -3.0;
} else if (z <= 1.95e-116) {
tmp = y * 4.0;
} else if (z <= 3.3e-60) {
tmp = x * -3.0;
} else if (z <= 112000.0) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -2.6e-11: tmp = t_0 elif z <= 3.2e-307: tmp = x * -3.0 elif z <= 1.7e-218: tmp = y * 4.0 elif z <= 1.4e-152: tmp = x * -3.0 elif z <= 1.95e-116: tmp = y * 4.0 elif z <= 3.3e-60: tmp = x * -3.0 elif z <= 112000.0: tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -2.6e-11) tmp = t_0; elseif (z <= 3.2e-307) tmp = Float64(x * -3.0); elseif (z <= 1.7e-218) tmp = Float64(y * 4.0); elseif (z <= 1.4e-152) tmp = Float64(x * -3.0); elseif (z <= 1.95e-116) tmp = Float64(y * 4.0); elseif (z <= 3.3e-60) tmp = Float64(x * -3.0); elseif (z <= 112000.0) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -2.6e-11) tmp = t_0; elseif (z <= 3.2e-307) tmp = x * -3.0; elseif (z <= 1.7e-218) tmp = y * 4.0; elseif (z <= 1.4e-152) tmp = x * -3.0; elseif (z <= 1.95e-116) tmp = y * 4.0; elseif (z <= 3.3e-60) tmp = x * -3.0; elseif (z <= 112000.0) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e-11], t$95$0, If[LessEqual[z, 3.2e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.7e-218], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-152], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.95e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.3e-60], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 112000.0], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-218}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-152}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-60}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 112000:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.6000000000000001e-11 or 112000 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 96.7%
if -2.6000000000000001e-11 < z < 3.20000000000000011e-307 or 1.69999999999999993e-218 < z < 1.39999999999999992e-152 or 1.95e-116 < z < 3.2999999999999998e-60Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 64.5%
sub-neg64.5%
distribute-rgt-in64.5%
metadata-eval64.5%
neg-mul-164.5%
associate-*r*64.5%
*-commutative64.5%
associate-+r+64.6%
metadata-eval64.6%
associate-*r*64.6%
metadata-eval64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in z around 0 64.0%
*-commutative64.0%
Simplified64.0%
if 3.20000000000000011e-307 < z < 1.69999999999999993e-218 or 1.39999999999999992e-152 < z < 1.95e-116Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add-cube-cbrt99.4%
fma-def99.3%
pow299.3%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 72.1%
associate-*r*72.3%
Simplified72.3%
Taylor expanded in z around 0 72.6%
*-commutative72.6%
Simplified72.6%
if 3.2999999999999998e-60 < z < 112000Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.3%
fma-def99.3%
pow299.3%
associate-*l*99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 63.8%
Final simplification81.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -8.5e-74) (not (<= y 2200000000000.0))) (* 6.0 (* y (- 0.6666666666666666 z))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -8.5e-74) || !(y <= 2200000000000.0)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-8.5d-74)) .or. (.not. (y <= 2200000000000.0d0))) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -8.5e-74) || !(y <= 2200000000000.0)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -8.5e-74) or not (y <= 2200000000000.0): tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -8.5e-74) || !(y <= 2200000000000.0)) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -8.5e-74) || ~((y <= 2200000000000.0))) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -8.5e-74], N[Not[LessEqual[y, 2200000000000.0]], $MachinePrecision]], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-74} \lor \neg \left(y \leq 2200000000000\right):\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -8.50000000000000052e-74 or 2.2e12 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.6%
fma-def99.6%
pow299.6%
associate-*l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 76.9%
if -8.50000000000000052e-74 < y < 2.2e12Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 84.9%
sub-neg84.9%
distribute-rgt-in84.9%
metadata-eval84.9%
neg-mul-184.9%
associate-*r*84.9%
*-commutative84.9%
associate-+r+84.9%
metadata-eval84.9%
associate-*r*84.9%
metadata-eval84.9%
*-commutative84.9%
Simplified84.9%
Final simplification80.5%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.8e-73) (not (<= y 2.65e-5))) (* y (+ 4.0 (* z -6.0))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.8e-73) || !(y <= 2.65e-5)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-2.8d-73)) .or. (.not. (y <= 2.65d-5))) then
tmp = y * (4.0d0 + (z * (-6.0d0)))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.8e-73) || !(y <= 2.65e-5)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.8e-73) or not (y <= 2.65e-5): tmp = y * (4.0 + (z * -6.0)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.8e-73) || !(y <= 2.65e-5)) tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.8e-73) || ~((y <= 2.65e-5))) tmp = y * (4.0 + (z * -6.0)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.8e-73], N[Not[LessEqual[y, 2.65e-5]], $MachinePrecision]], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-73} \lor \neg \left(y \leq 2.65 \cdot 10^{-5}\right):\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -2.80000000000000012e-73 or 2.65e-5 < y 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%
Taylor expanded in y around inf 76.7%
if -2.80000000000000012e-73 < y < 2.65e-5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 85.5%
sub-neg85.5%
distribute-rgt-in85.5%
metadata-eval85.5%
neg-mul-185.5%
associate-*r*85.5%
*-commutative85.5%
associate-+r+85.5%
metadata-eval85.5%
associate-*r*85.5%
metadata-eval85.5%
*-commutative85.5%
Simplified85.5%
Final simplification80.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.65))) (* -6.0 (* (- y x) z)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.65)) {
tmp = -6.0 * ((y - x) * z);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.58d0)) .or. (.not. (z <= 0.65d0))) then
tmp = (-6.0d0) * ((y - x) * z)
else
tmp = x + ((y - x) * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.65)) {
tmp = -6.0 * ((y - x) * z);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.65): tmp = -6.0 * ((y - x) * z) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.65)) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); else tmp = Float64(x + Float64(Float64(y - x) * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.65))) tmp = -6.0 * ((y - x) * z); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.65]], $MachinePrecision]], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.65\right):\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.650000000000000022 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.8%
if -0.57999999999999996 < z < 0.650000000000000022Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 96.9%
Final simplification97.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.58))) (* -6.0 (* (- y x) z)) (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.58)) {
tmp = -6.0 * ((y - x) * z);
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.58d0)) .or. (.not. (z <= 0.58d0))) then
tmp = (-6.0d0) * ((y - x) * z)
else
tmp = (x * (-3.0d0)) + (y * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.58)) {
tmp = -6.0 * ((y - x) * z);
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.58): tmp = -6.0 * ((y - x) * z) else: tmp = (x * -3.0) + (y * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.58)) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); else tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.58))) tmp = -6.0 * ((y - x) * z); else tmp = (x * -3.0) + (y * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.58]], $MachinePrecision]], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.58\right):\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.57999999999999996 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-cube-cbrt99.7%
fma-def99.7%
pow299.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.8%
if -0.57999999999999996 < z < 0.57999999999999996Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 96.9%
Taylor expanded in x around 0 96.9%
Final simplification97.3%
(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 (if (<= x -9.6e+27) (* x -3.0) (if (<= x 1.9e+116) (* y 4.0) (* x -3.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= -9.6e+27) {
tmp = x * -3.0;
} else if (x <= 1.9e+116) {
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 (x <= (-9.6d+27)) then
tmp = x * (-3.0d0)
else if (x <= 1.9d+116) 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 (x <= -9.6e+27) {
tmp = x * -3.0;
} else if (x <= 1.9e+116) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -9.6e+27: tmp = x * -3.0 elif x <= 1.9e+116: tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -9.6e+27) tmp = Float64(x * -3.0); elseif (x <= 1.9e+116) 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 (x <= -9.6e+27) tmp = x * -3.0; elseif (x <= 1.9e+116) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -9.6e+27], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 1.9e+116], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{+27}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+116}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if x < -9.59999999999999991e27 or 1.8999999999999999e116 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 83.3%
sub-neg83.3%
distribute-rgt-in83.3%
metadata-eval83.3%
neg-mul-183.3%
associate-*r*83.3%
*-commutative83.3%
associate-+r+83.3%
metadata-eval83.3%
associate-*r*83.3%
metadata-eval83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in z around 0 43.1%
*-commutative43.1%
Simplified43.1%
if -9.59999999999999991e27 < x < 1.8999999999999999e116Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cube-cbrt99.5%
fma-def99.5%
pow299.5%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 68.6%
associate-*r*68.6%
Simplified68.6%
Taylor expanded in z around 0 37.9%
*-commutative37.9%
Simplified37.9%
Final simplification40.1%
(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 54.7%
sub-neg54.7%
distribute-rgt-in54.7%
metadata-eval54.7%
neg-mul-154.7%
associate-*r*54.7%
*-commutative54.7%
associate-+r+54.7%
metadata-eval54.7%
associate-*r*54.7%
metadata-eval54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in z around 0 26.4%
*-commutative26.4%
Simplified26.4%
Final simplification26.4%
herbie shell --seed 2023297
(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))))