
(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 15 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) (* 6.0 (- 0.6666666666666666 z)) x))
double code(double x, double y, double z) {
return fma((y - x), (6.0 * (0.6666666666666666 - z)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(6.0 * Float64(0.6666666666666666 - z)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(6.0 * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 6 \cdot \left(0.6666666666666666 - z\right), x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-def99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))) (t_1 (* -6.0 (* y z))))
(if (<= z -2.25e+195)
t_0
(if (<= z -1.9e+53)
t_1
(if (<= z -32.0)
t_0
(if (<= z -7.0)
t_1
(if (<= z -6e-294)
(* x -3.0)
(if (<= z 1.55e-103)
(* y 4.0)
(if (<= z 1.2e-72)
(* x -3.0)
(if (<= z 0.68)
(* y 4.0)
(if (<= z 4.2e+90) t_1 t_0)))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -2.25e+195) {
tmp = t_0;
} else if (z <= -1.9e+53) {
tmp = t_1;
} else if (z <= -32.0) {
tmp = t_0;
} else if (z <= -7.0) {
tmp = t_1;
} else if (z <= -6e-294) {
tmp = x * -3.0;
} else if (z <= 1.55e-103) {
tmp = y * 4.0;
} else if (z <= 1.2e-72) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 4.2e+90) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * (x * z)
t_1 = (-6.0d0) * (y * z)
if (z <= (-2.25d+195)) then
tmp = t_0
else if (z <= (-1.9d+53)) then
tmp = t_1
else if (z <= (-32.0d0)) then
tmp = t_0
else if (z <= (-7.0d0)) then
tmp = t_1
else if (z <= (-6d-294)) then
tmp = x * (-3.0d0)
else if (z <= 1.55d-103) then
tmp = y * 4.0d0
else if (z <= 1.2d-72) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else if (z <= 4.2d+90) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -2.25e+195) {
tmp = t_0;
} else if (z <= -1.9e+53) {
tmp = t_1;
} else if (z <= -32.0) {
tmp = t_0;
} else if (z <= -7.0) {
tmp = t_1;
} else if (z <= -6e-294) {
tmp = x * -3.0;
} else if (z <= 1.55e-103) {
tmp = y * 4.0;
} else if (z <= 1.2e-72) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 4.2e+90) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) t_1 = -6.0 * (y * z) tmp = 0 if z <= -2.25e+195: tmp = t_0 elif z <= -1.9e+53: tmp = t_1 elif z <= -32.0: tmp = t_0 elif z <= -7.0: tmp = t_1 elif z <= -6e-294: tmp = x * -3.0 elif z <= 1.55e-103: tmp = y * 4.0 elif z <= 1.2e-72: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 elif z <= 4.2e+90: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -2.25e+195) tmp = t_0; elseif (z <= -1.9e+53) tmp = t_1; elseif (z <= -32.0) tmp = t_0; elseif (z <= -7.0) tmp = t_1; elseif (z <= -6e-294) tmp = Float64(x * -3.0); elseif (z <= 1.55e-103) tmp = Float64(y * 4.0); elseif (z <= 1.2e-72) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); elseif (z <= 4.2e+90) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -2.25e+195) tmp = t_0; elseif (z <= -1.9e+53) tmp = t_1; elseif (z <= -32.0) tmp = t_0; elseif (z <= -7.0) tmp = t_1; elseif (z <= -6e-294) tmp = x * -3.0; elseif (z <= 1.55e-103) tmp = y * 4.0; elseif (z <= 1.2e-72) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; elseif (z <= 4.2e+90) tmp = t_1; 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]}, Block[{t$95$1 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e+195], t$95$0, If[LessEqual[z, -1.9e+53], t$95$1, If[LessEqual[z, -32.0], t$95$0, If[LessEqual[z, -7.0], t$95$1, If[LessEqual[z, -6e-294], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.55e-103], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.2e-72], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.2e+90], t$95$1, t$95$0]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+195}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -32:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-294}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-103}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-72}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.25000000000000005e195 or -1.89999999999999999e53 < z < -32 or 4.19999999999999961e90 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 68.0%
sub-neg68.0%
distribute-rgt-in68.0%
metadata-eval68.0%
metadata-eval68.0%
neg-mul-168.0%
associate-*r*68.0%
*-commutative68.0%
associate-+r+68.0%
metadata-eval68.0%
metadata-eval68.0%
associate-*r*68.0%
metadata-eval68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in z around inf 66.9%
*-commutative66.9%
Simplified66.9%
if -2.25000000000000005e195 < z < -1.89999999999999999e53 or -32 < z < -7 or 0.680000000000000049 < z < 4.19999999999999961e90Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 97.7%
Taylor expanded in z around inf 97.7%
Taylor expanded in y around inf 69.4%
if -7 < z < -5.9999999999999998e-294 or 1.5500000000000001e-103 < z < 1.2e-72Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
neg-mul-164.4%
associate-*r*64.4%
*-commutative64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
associate-*r*64.4%
metadata-eval64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -5.9999999999999998e-294 < z < 1.5500000000000001e-103 or 1.2e-72 < z < 0.680000000000000049Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add-cbrt-cube47.0%
pow346.9%
+-commutative46.9%
associate-*l*47.0%
fma-udef47.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 66.3%
*-commutative66.3%
Simplified66.3%
Final simplification66.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* 6.0 z))) (t_1 (* -6.0 (* y z))))
(if (<= z -4.6e+193)
t_0
(if (<= z -2.7e+51)
t_1
(if (<= z -820.0)
t_0
(if (<= z -3.5)
t_1
(if (<= z -2.8e-294)
(* x -3.0)
(if (<= z 2.35e-104)
(* y 4.0)
(if (<= z 3e-73)
(* x -3.0)
(if (<= z 0.68)
(* y 4.0)
(if (<= z 2.9e+86) t_1 (* 6.0 (* x z)))))))))))))
double code(double x, double y, double z) {
double t_0 = x * (6.0 * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -4.6e+193) {
tmp = t_0;
} else if (z <= -2.7e+51) {
tmp = t_1;
} else if (z <= -820.0) {
tmp = t_0;
} else if (z <= -3.5) {
tmp = t_1;
} else if (z <= -2.8e-294) {
tmp = x * -3.0;
} else if (z <= 2.35e-104) {
tmp = y * 4.0;
} else if (z <= 3e-73) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 2.9e+86) {
tmp = t_1;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * (6.0d0 * z)
t_1 = (-6.0d0) * (y * z)
if (z <= (-4.6d+193)) then
tmp = t_0
else if (z <= (-2.7d+51)) then
tmp = t_1
else if (z <= (-820.0d0)) then
tmp = t_0
else if (z <= (-3.5d0)) then
tmp = t_1
else if (z <= (-2.8d-294)) then
tmp = x * (-3.0d0)
else if (z <= 2.35d-104) then
tmp = y * 4.0d0
else if (z <= 3d-73) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else if (z <= 2.9d+86) then
tmp = t_1
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (6.0 * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -4.6e+193) {
tmp = t_0;
} else if (z <= -2.7e+51) {
tmp = t_1;
} else if (z <= -820.0) {
tmp = t_0;
} else if (z <= -3.5) {
tmp = t_1;
} else if (z <= -2.8e-294) {
tmp = x * -3.0;
} else if (z <= 2.35e-104) {
tmp = y * 4.0;
} else if (z <= 3e-73) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 2.9e+86) {
tmp = t_1;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (6.0 * z) t_1 = -6.0 * (y * z) tmp = 0 if z <= -4.6e+193: tmp = t_0 elif z <= -2.7e+51: tmp = t_1 elif z <= -820.0: tmp = t_0 elif z <= -3.5: tmp = t_1 elif z <= -2.8e-294: tmp = x * -3.0 elif z <= 2.35e-104: tmp = y * 4.0 elif z <= 3e-73: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 elif z <= 2.9e+86: tmp = t_1 else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(6.0 * z)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -4.6e+193) tmp = t_0; elseif (z <= -2.7e+51) tmp = t_1; elseif (z <= -820.0) tmp = t_0; elseif (z <= -3.5) tmp = t_1; elseif (z <= -2.8e-294) tmp = Float64(x * -3.0); elseif (z <= 2.35e-104) tmp = Float64(y * 4.0); elseif (z <= 3e-73) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); elseif (z <= 2.9e+86) tmp = t_1; else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (6.0 * z); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -4.6e+193) tmp = t_0; elseif (z <= -2.7e+51) tmp = t_1; elseif (z <= -820.0) tmp = t_0; elseif (z <= -3.5) tmp = t_1; elseif (z <= -2.8e-294) tmp = x * -3.0; elseif (z <= 2.35e-104) tmp = y * 4.0; elseif (z <= 3e-73) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; elseif (z <= 2.9e+86) tmp = t_1; else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+193], t$95$0, If[LessEqual[z, -2.7e+51], t$95$1, If[LessEqual[z, -820.0], t$95$0, If[LessEqual[z, -3.5], t$95$1, If[LessEqual[z, -2.8e-294], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.35e-104], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3e-73], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.9e+86], t$95$1, N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(6 \cdot z\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+193}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -820:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.5:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-294}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-104}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-73}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -4.60000000000000026e193 or -2.69999999999999992e51 < z < -820Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 70.3%
sub-neg70.3%
distribute-rgt-in70.2%
metadata-eval70.2%
metadata-eval70.2%
neg-mul-170.2%
associate-*r*70.2%
*-commutative70.2%
associate-+r+70.2%
metadata-eval70.2%
metadata-eval70.2%
associate-*r*70.2%
metadata-eval70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in z around inf 66.9%
if -4.60000000000000026e193 < z < -2.69999999999999992e51 or -820 < z < -3.5 or 0.680000000000000049 < z < 2.8999999999999999e86Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 97.7%
Taylor expanded in z around inf 97.7%
Taylor expanded in y around inf 69.4%
if -3.5 < z < -2.79999999999999991e-294 or 2.35e-104 < z < 3e-73Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
neg-mul-164.4%
associate-*r*64.4%
*-commutative64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
associate-*r*64.4%
metadata-eval64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -2.79999999999999991e-294 < z < 2.35e-104 or 3e-73 < z < 0.680000000000000049Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add-cbrt-cube47.0%
pow346.9%
+-commutative46.9%
associate-*l*47.0%
fma-udef47.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 66.3%
*-commutative66.3%
Simplified66.3%
if 2.8999999999999999e86 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 66.9%
sub-neg66.9%
distribute-rgt-in66.9%
metadata-eval66.9%
metadata-eval66.9%
neg-mul-166.9%
associate-*r*66.9%
*-commutative66.9%
associate-+r+66.9%
metadata-eval66.9%
metadata-eval66.9%
associate-*r*66.9%
metadata-eval66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in z around inf 66.9%
*-commutative66.9%
Simplified66.9%
Final simplification66.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -1.9e+52)
(* y (* z -6.0))
(if (<= z -64.0)
(* x (* 6.0 z))
(if (<= z -1.3)
t_0
(if (<= z -7.6e-295)
(* x -3.0)
(if (<= z 3.65e-100)
(* y 4.0)
(if (<= z 6.5e-73)
(* x -3.0)
(if (<= z 0.68)
(* y 4.0)
(if (<= z 8e+86) t_0 (* 6.0 (* x z))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -1.9e+52) {
tmp = y * (z * -6.0);
} else if (z <= -64.0) {
tmp = x * (6.0 * z);
} else if (z <= -1.3) {
tmp = t_0;
} else if (z <= -7.6e-295) {
tmp = x * -3.0;
} else if (z <= 3.65e-100) {
tmp = y * 4.0;
} else if (z <= 6.5e-73) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 8e+86) {
tmp = t_0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-1.9d+52)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-64.0d0)) then
tmp = x * (6.0d0 * z)
else if (z <= (-1.3d0)) then
tmp = t_0
else if (z <= (-7.6d-295)) then
tmp = x * (-3.0d0)
else if (z <= 3.65d-100) then
tmp = y * 4.0d0
else if (z <= 6.5d-73) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else if (z <= 8d+86) then
tmp = t_0
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -1.9e+52) {
tmp = y * (z * -6.0);
} else if (z <= -64.0) {
tmp = x * (6.0 * z);
} else if (z <= -1.3) {
tmp = t_0;
} else if (z <= -7.6e-295) {
tmp = x * -3.0;
} else if (z <= 3.65e-100) {
tmp = y * 4.0;
} else if (z <= 6.5e-73) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else if (z <= 8e+86) {
tmp = t_0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -1.9e+52: tmp = y * (z * -6.0) elif z <= -64.0: tmp = x * (6.0 * z) elif z <= -1.3: tmp = t_0 elif z <= -7.6e-295: tmp = x * -3.0 elif z <= 3.65e-100: tmp = y * 4.0 elif z <= 6.5e-73: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 elif z <= 8e+86: tmp = t_0 else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -1.9e+52) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -64.0) tmp = Float64(x * Float64(6.0 * z)); elseif (z <= -1.3) tmp = t_0; elseif (z <= -7.6e-295) tmp = Float64(x * -3.0); elseif (z <= 3.65e-100) tmp = Float64(y * 4.0); elseif (z <= 6.5e-73) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); elseif (z <= 8e+86) tmp = t_0; else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -1.9e+52) tmp = y * (z * -6.0); elseif (z <= -64.0) tmp = x * (6.0 * z); elseif (z <= -1.3) tmp = t_0; elseif (z <= -7.6e-295) tmp = x * -3.0; elseif (z <= 3.65e-100) tmp = y * 4.0; elseif (z <= 6.5e-73) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; elseif (z <= 8e+86) tmp = t_0; else tmp = 6.0 * (x * z); 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.9e+52], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -64.0], N[(x * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3], t$95$0, If[LessEqual[z, -7.6e-295], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.65e-100], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.5e-73], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8e+86], t$95$0, N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+52}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -64:\\
\;\;\;\;x \cdot \left(6 \cdot z\right)\\
\mathbf{elif}\;z \leq -1.3:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-295}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.65 \cdot 10^{-100}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-73}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+86}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -1.9e52Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in y around inf 59.2%
*-commutative59.2%
associate-*l*61.1%
Simplified61.1%
if -1.9e52 < z < -64Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 82.3%
sub-neg82.3%
distribute-rgt-in82.0%
metadata-eval82.0%
metadata-eval82.0%
neg-mul-182.0%
associate-*r*82.0%
*-commutative82.0%
associate-+r+82.0%
metadata-eval82.0%
metadata-eval82.0%
associate-*r*82.0%
metadata-eval82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in z around inf 70.7%
if -64 < z < -1.30000000000000004 or 0.680000000000000049 < z < 8.0000000000000001e86Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 92.6%
Taylor expanded in z around inf 92.6%
Taylor expanded in y around inf 69.9%
if -1.30000000000000004 < z < -7.60000000000000037e-295 or 3.6499999999999998e-100 < z < 6.4999999999999999e-73Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
neg-mul-164.4%
associate-*r*64.4%
*-commutative64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
associate-*r*64.4%
metadata-eval64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -7.60000000000000037e-295 < z < 3.6499999999999998e-100 or 6.4999999999999999e-73 < z < 0.680000000000000049Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add-cbrt-cube47.0%
pow346.9%
+-commutative46.9%
associate-*l*47.0%
fma-udef47.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 66.3%
*-commutative66.3%
Simplified66.3%
if 8.0000000000000001e86 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 66.9%
sub-neg66.9%
distribute-rgt-in66.9%
metadata-eval66.9%
metadata-eval66.9%
neg-mul-166.9%
associate-*r*66.9%
*-commutative66.9%
associate-+r+66.9%
metadata-eval66.9%
metadata-eval66.9%
associate-*r*66.9%
metadata-eval66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in z around inf 66.9%
*-commutative66.9%
Simplified66.9%
Final simplification64.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.12)
t_0
(if (<= z -7.6e-295)
(* x -3.0)
(if (<= z 8.9e-104)
(* y 4.0)
(if (<= z 1.05e-73) (* x -3.0) (if (<= z 0.62) (* y 4.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.12) {
tmp = t_0;
} else if (z <= -7.6e-295) {
tmp = x * -3.0;
} else if (z <= 8.9e-104) {
tmp = y * 4.0;
} else if (z <= 1.05e-73) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.12d0)) then
tmp = t_0
else if (z <= (-7.6d-295)) then
tmp = x * (-3.0d0)
else if (z <= 8.9d-104) then
tmp = y * 4.0d0
else if (z <= 1.05d-73) then
tmp = x * (-3.0d0)
else if (z <= 0.62d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.12) {
tmp = t_0;
} else if (z <= -7.6e-295) {
tmp = x * -3.0;
} else if (z <= 8.9e-104) {
tmp = y * 4.0;
} else if (z <= 1.05e-73) {
tmp = x * -3.0;
} else if (z <= 0.62) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.12: tmp = t_0 elif z <= -7.6e-295: tmp = x * -3.0 elif z <= 8.9e-104: tmp = y * 4.0 elif z <= 1.05e-73: tmp = x * -3.0 elif z <= 0.62: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.12) tmp = t_0; elseif (z <= -7.6e-295) tmp = Float64(x * -3.0); elseif (z <= 8.9e-104) tmp = Float64(y * 4.0); elseif (z <= 1.05e-73) tmp = Float64(x * -3.0); elseif (z <= 0.62) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.12) tmp = t_0; elseif (z <= -7.6e-295) tmp = x * -3.0; elseif (z <= 8.9e-104) tmp = y * 4.0; elseif (z <= 1.05e-73) tmp = x * -3.0; elseif (z <= 0.62) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.12], t$95$0, If[LessEqual[z, -7.6e-295], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.9e-104], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.05e-73], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.62], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.12:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-295}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.9 \cdot 10^{-104}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-73}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.12 or 0.619999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 98.2%
Taylor expanded in z around inf 98.2%
if -0.12 < z < -7.60000000000000037e-295 or 8.9000000000000006e-104 < z < 1.0499999999999999e-73Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
neg-mul-164.4%
associate-*r*64.4%
*-commutative64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
associate-*r*64.4%
metadata-eval64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -7.60000000000000037e-295 < z < 8.9000000000000006e-104 or 1.0499999999999999e-73 < z < 0.619999999999999996Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add-cbrt-cube47.0%
pow346.9%
+-commutative46.9%
associate-*l*47.0%
fma-udef47.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 66.3%
*-commutative66.3%
Simplified66.3%
Final simplification80.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -420000000.0)
t_0
(if (<= z -2.7e-294)
(* x (+ -3.0 (* 6.0 z)))
(if (<= z 2.4e-104)
(* y 4.0)
(if (<= z 1.05e-72) (* x -3.0) (if (<= z 0.68) (* y 4.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -420000000.0) {
tmp = t_0;
} else if (z <= -2.7e-294) {
tmp = x * (-3.0 + (6.0 * z));
} else if (z <= 2.4e-104) {
tmp = y * 4.0;
} else if (z <= 1.05e-72) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-420000000.0d0)) then
tmp = t_0
else if (z <= (-2.7d-294)) then
tmp = x * ((-3.0d0) + (6.0d0 * z))
else if (z <= 2.4d-104) then
tmp = y * 4.0d0
else if (z <= 1.05d-72) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -420000000.0) {
tmp = t_0;
} else if (z <= -2.7e-294) {
tmp = x * (-3.0 + (6.0 * z));
} else if (z <= 2.4e-104) {
tmp = y * 4.0;
} else if (z <= 1.05e-72) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -420000000.0: tmp = t_0 elif z <= -2.7e-294: tmp = x * (-3.0 + (6.0 * z)) elif z <= 2.4e-104: tmp = y * 4.0 elif z <= 1.05e-72: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -420000000.0) tmp = t_0; elseif (z <= -2.7e-294) tmp = Float64(x * Float64(-3.0 + Float64(6.0 * z))); elseif (z <= 2.4e-104) tmp = Float64(y * 4.0); elseif (z <= 1.05e-72) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -420000000.0) tmp = t_0; elseif (z <= -2.7e-294) tmp = x * (-3.0 + (6.0 * z)); elseif (z <= 2.4e-104) tmp = y * 4.0; elseif (z <= 1.05e-72) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -420000000.0], t$95$0, If[LessEqual[z, -2.7e-294], N[(x * N[(-3.0 + N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-104], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.05e-72], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -420000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-294}:\\
\;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-104}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-72}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -4.2e8 or 0.680000000000000049 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.5%
Taylor expanded in z around inf 99.5%
if -4.2e8 < z < -2.7000000000000001e-294Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 62.9%
sub-neg62.9%
distribute-rgt-in62.9%
metadata-eval62.9%
metadata-eval62.9%
neg-mul-162.9%
associate-*r*62.9%
*-commutative62.9%
associate-+r+62.9%
metadata-eval62.9%
metadata-eval62.9%
associate-*r*62.9%
metadata-eval62.9%
*-commutative62.9%
Simplified62.9%
if -2.7000000000000001e-294 < z < 2.4000000000000001e-104 or 1.05e-72 < z < 0.680000000000000049Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add-cbrt-cube47.0%
pow346.9%
+-commutative46.9%
associate-*l*47.0%
fma-udef47.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 66.3%
*-commutative66.3%
Simplified66.3%
if 2.4000000000000001e-104 < z < 1.05e-72Initial program 99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around inf 78.3%
sub-neg78.3%
distribute-rgt-in78.3%
metadata-eval78.3%
metadata-eval78.3%
neg-mul-178.3%
associate-*r*78.3%
*-commutative78.3%
associate-+r+78.3%
metadata-eval78.3%
metadata-eval78.3%
associate-*r*78.3%
metadata-eval78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around 0 78.3%
*-commutative78.3%
Simplified78.3%
Final simplification80.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -530000000.0)
t_0
(if (<= z -1.9e-295)
(* x (+ -3.0 (* 6.0 z)))
(if (<= z 9.6e-104)
(* y 4.0)
(if (<= z 6.5e-72)
(* x -3.0)
(if (<= z 4.2e+15) (* y (+ 4.0 (* z -6.0))) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -530000000.0) {
tmp = t_0;
} else if (z <= -1.9e-295) {
tmp = x * (-3.0 + (6.0 * z));
} else if (z <= 9.6e-104) {
tmp = y * 4.0;
} else if (z <= 6.5e-72) {
tmp = x * -3.0;
} else if (z <= 4.2e+15) {
tmp = y * (4.0 + (z * -6.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 <= (-530000000.0d0)) then
tmp = t_0
else if (z <= (-1.9d-295)) then
tmp = x * ((-3.0d0) + (6.0d0 * z))
else if (z <= 9.6d-104) then
tmp = y * 4.0d0
else if (z <= 6.5d-72) then
tmp = x * (-3.0d0)
else if (z <= 4.2d+15) then
tmp = y * (4.0d0 + (z * (-6.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 <= -530000000.0) {
tmp = t_0;
} else if (z <= -1.9e-295) {
tmp = x * (-3.0 + (6.0 * z));
} else if (z <= 9.6e-104) {
tmp = y * 4.0;
} else if (z <= 6.5e-72) {
tmp = x * -3.0;
} else if (z <= 4.2e+15) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -530000000.0: tmp = t_0 elif z <= -1.9e-295: tmp = x * (-3.0 + (6.0 * z)) elif z <= 9.6e-104: tmp = y * 4.0 elif z <= 6.5e-72: tmp = x * -3.0 elif z <= 4.2e+15: tmp = y * (4.0 + (z * -6.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 <= -530000000.0) tmp = t_0; elseif (z <= -1.9e-295) tmp = Float64(x * Float64(-3.0 + Float64(6.0 * z))); elseif (z <= 9.6e-104) tmp = Float64(y * 4.0); elseif (z <= 6.5e-72) tmp = Float64(x * -3.0); elseif (z <= 4.2e+15) tmp = Float64(y * Float64(4.0 + Float64(z * -6.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 <= -530000000.0) tmp = t_0; elseif (z <= -1.9e-295) tmp = x * (-3.0 + (6.0 * z)); elseif (z <= 9.6e-104) tmp = y * 4.0; elseif (z <= 6.5e-72) tmp = x * -3.0; elseif (z <= 4.2e+15) tmp = y * (4.0 + (z * -6.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, -530000000.0], t$95$0, If[LessEqual[z, -1.9e-295], N[(x * N[(-3.0 + N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e-104], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.5e-72], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.2e+15], N[(y * N[(4.0 + N[(z * -6.0), $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 -530000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-295}:\\
\;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-104}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-72}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+15}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -5.3e8 or 4.2e15 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 99.7%
if -5.3e8 < z < -1.90000000000000009e-295Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 62.9%
sub-neg62.9%
distribute-rgt-in62.9%
metadata-eval62.9%
metadata-eval62.9%
neg-mul-162.9%
associate-*r*62.9%
*-commutative62.9%
associate-+r+62.9%
metadata-eval62.9%
metadata-eval62.9%
associate-*r*62.9%
metadata-eval62.9%
*-commutative62.9%
Simplified62.9%
if -1.90000000000000009e-295 < z < 9.6000000000000003e-104Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
add-cbrt-cube46.1%
pow345.9%
+-commutative45.9%
associate-*l*46.1%
fma-udef46.1%
Applied egg-rr46.1%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 66.2%
*-commutative66.2%
Simplified66.2%
if 9.6000000000000003e-104 < z < 6.4999999999999997e-72Initial program 99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around inf 78.3%
sub-neg78.3%
distribute-rgt-in78.3%
metadata-eval78.3%
metadata-eval78.3%
neg-mul-178.3%
associate-*r*78.3%
*-commutative78.3%
associate-+r+78.3%
metadata-eval78.3%
metadata-eval78.3%
associate-*r*78.3%
metadata-eval78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around 0 78.3%
*-commutative78.3%
Simplified78.3%
if 6.4999999999999997e-72 < z < 4.2e15Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in99.9%
distribute-rgt-neg-out99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 74.0%
Final simplification81.0%
(FPCore (x y z)
:precision binary64
(if (<= z -420000000.0)
(* z (* (- y x) -6.0))
(if (<= z -1.55e-295)
(* x (+ -3.0 (* 6.0 z)))
(if (<= z 2.7e-103)
(* y 4.0)
(if (<= z 8.4e-72)
(* x -3.0)
(if (<= z 4.2e+15)
(* y (+ 4.0 (* z -6.0)))
(* -6.0 (* (- y x) z))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -420000000.0) {
tmp = z * ((y - x) * -6.0);
} else if (z <= -1.55e-295) {
tmp = x * (-3.0 + (6.0 * z));
} else if (z <= 2.7e-103) {
tmp = y * 4.0;
} else if (z <= 8.4e-72) {
tmp = x * -3.0;
} else if (z <= 4.2e+15) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-420000000.0d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= (-1.55d-295)) then
tmp = x * ((-3.0d0) + (6.0d0 * z))
else if (z <= 2.7d-103) then
tmp = y * 4.0d0
else if (z <= 8.4d-72) then
tmp = x * (-3.0d0)
else if (z <= 4.2d+15) then
tmp = y * (4.0d0 + (z * (-6.0d0)))
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -420000000.0) {
tmp = z * ((y - x) * -6.0);
} else if (z <= -1.55e-295) {
tmp = x * (-3.0 + (6.0 * z));
} else if (z <= 2.7e-103) {
tmp = y * 4.0;
} else if (z <= 8.4e-72) {
tmp = x * -3.0;
} else if (z <= 4.2e+15) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -420000000.0: tmp = z * ((y - x) * -6.0) elif z <= -1.55e-295: tmp = x * (-3.0 + (6.0 * z)) elif z <= 2.7e-103: tmp = y * 4.0 elif z <= 8.4e-72: tmp = x * -3.0 elif z <= 4.2e+15: tmp = y * (4.0 + (z * -6.0)) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -420000000.0) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= -1.55e-295) tmp = Float64(x * Float64(-3.0 + Float64(6.0 * z))); elseif (z <= 2.7e-103) tmp = Float64(y * 4.0); elseif (z <= 8.4e-72) tmp = Float64(x * -3.0); elseif (z <= 4.2e+15) tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -420000000.0) tmp = z * ((y - x) * -6.0); elseif (z <= -1.55e-295) tmp = x * (-3.0 + (6.0 * z)); elseif (z <= 2.7e-103) tmp = y * 4.0; elseif (z <= 8.4e-72) tmp = x * -3.0; elseif (z <= 4.2e+15) tmp = y * (4.0 + (z * -6.0)); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -420000000.0], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e-295], N[(x * N[(-3.0 + N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-103], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.4e-72], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.2e+15], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -420000000:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-295}:\\
\;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-103}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-72}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+15}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -4.2e8Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.6%
Taylor expanded in z around inf 99.6%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.8%
Simplified99.8%
if -4.2e8 < z < -1.5500000000000001e-295Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 62.9%
sub-neg62.9%
distribute-rgt-in62.9%
metadata-eval62.9%
metadata-eval62.9%
neg-mul-162.9%
associate-*r*62.9%
*-commutative62.9%
associate-+r+62.9%
metadata-eval62.9%
metadata-eval62.9%
associate-*r*62.9%
metadata-eval62.9%
*-commutative62.9%
Simplified62.9%
if -1.5500000000000001e-295 < z < 2.7000000000000001e-103Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
add-cbrt-cube46.1%
pow345.9%
+-commutative45.9%
associate-*l*46.1%
fma-udef46.1%
Applied egg-rr46.1%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 66.2%
*-commutative66.2%
Simplified66.2%
if 2.7000000000000001e-103 < z < 8.4e-72Initial program 99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around inf 78.3%
sub-neg78.3%
distribute-rgt-in78.3%
metadata-eval78.3%
metadata-eval78.3%
neg-mul-178.3%
associate-*r*78.3%
*-commutative78.3%
associate-+r+78.3%
metadata-eval78.3%
metadata-eval78.3%
associate-*r*78.3%
metadata-eval78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in z around 0 78.3%
*-commutative78.3%
Simplified78.3%
if 8.4e-72 < z < 4.2e15Initial program 99.5%
+-commutative99.5%
associate-*l*99.9%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in99.9%
distribute-rgt-neg-out99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 74.0%
if 4.2e15 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in z around inf 99.8%
Final simplification81.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.36)
t_0
(if (<= z -2.5e-295)
(* x -3.0)
(if (<= z 8e-101)
(* y 4.0)
(if (<= z 8.8e-72) (* x -3.0) (if (<= z 0.68) (* y 4.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -0.36) {
tmp = t_0;
} else if (z <= -2.5e-295) {
tmp = x * -3.0;
} else if (z <= 8e-101) {
tmp = y * 4.0;
} else if (z <= 8.8e-72) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-0.36d0)) then
tmp = t_0
else if (z <= (-2.5d-295)) then
tmp = x * (-3.0d0)
else if (z <= 8d-101) then
tmp = y * 4.0d0
else if (z <= 8.8d-72) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -0.36) {
tmp = t_0;
} else if (z <= -2.5e-295) {
tmp = x * -3.0;
} else if (z <= 8e-101) {
tmp = y * 4.0;
} else if (z <= 8.8e-72) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -0.36: tmp = t_0 elif z <= -2.5e-295: tmp = x * -3.0 elif z <= 8e-101: tmp = y * 4.0 elif z <= 8.8e-72: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -0.36) tmp = t_0; elseif (z <= -2.5e-295) tmp = Float64(x * -3.0); elseif (z <= 8e-101) tmp = Float64(y * 4.0); elseif (z <= 8.8e-72) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -0.36) tmp = t_0; elseif (z <= -2.5e-295) tmp = x * -3.0; elseif (z <= 8e-101) tmp = y * 4.0; elseif (z <= 8.8e-72) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.36], t$95$0, If[LessEqual[z, -2.5e-295], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8e-101], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.8e-72], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -0.36:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-295}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-101}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-72}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.35999999999999999 or 0.680000000000000049 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 98.2%
Taylor expanded in z around inf 98.2%
Taylor expanded in y around inf 49.3%
if -0.35999999999999999 < z < -2.50000000000000004e-295 or 8.00000000000000041e-101 < z < 8.8000000000000001e-72Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
metadata-eval64.4%
neg-mul-164.4%
associate-*r*64.4%
*-commutative64.4%
associate-+r+64.4%
metadata-eval64.4%
metadata-eval64.4%
associate-*r*64.4%
metadata-eval64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -2.50000000000000004e-295 < z < 8.00000000000000041e-101 or 8.8000000000000001e-72 < z < 0.680000000000000049Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
add-cbrt-cube47.0%
pow346.9%
+-commutative46.9%
associate-*l*47.0%
fma-udef47.0%
Applied egg-rr47.0%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 66.3%
*-commutative66.3%
Simplified66.3%
Final simplification57.4%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* z (* (- y x) -6.0)) (if (<= z 0.5) (+ x (* (- y x) 4.0)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.5) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.6d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.5d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.5) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = z * ((y - x) * -6.0) elif z <= 0.5: tmp = x + ((y - x) * 4.0) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.5) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = z * ((y - x) * -6.0); elseif (z <= 0.5) tmp = x + ((y - x) * 4.0); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.5], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 97.1%
Taylor expanded in z around inf 97.1%
associate-*r*97.1%
*-commutative97.1%
associate-*l*97.2%
Simplified97.2%
if -0.599999999999999978 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 98.5%
if 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.4%
Taylor expanded in z around inf 99.4%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* z (* (- y x) -6.0)) (if (<= z 0.55) (+ (* y 4.0) (* x -3.0)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.55) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.55d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.55d0) then
tmp = (y * 4.0d0) + (x * (-3.0d0))
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.55) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = z * ((y - x) * -6.0) elif z <= 0.55: tmp = (y * 4.0) + (x * -3.0) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.55) tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = z * ((y - x) * -6.0); elseif (z <= 0.55) tmp = (y * 4.0) + (x * -3.0); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.55], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 97.1%
Taylor expanded in z around inf 97.1%
associate-*r*97.1%
*-commutative97.1%
associate-*l*97.2%
Simplified97.2%
if -0.55000000000000004 < z < 0.55000000000000004Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
add-cbrt-cube42.6%
pow342.5%
+-commutative42.5%
associate-*l*42.6%
fma-udef42.7%
Applied egg-rr42.7%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in x around 0 98.6%
if 0.55000000000000004 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.4%
Taylor expanded in z around inf 99.4%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (* (- y x) 6.0))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((0.6666666666666666d0 - z) * ((y - x) * 6.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((y - x) * 6.0))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(y - x) * 6.0))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((y - x) * 6.0)); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(\left(y - x\right) \cdot 6\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (<= y -4.5e+19) (* y 4.0) (if (<= y 3.4e+31) (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -4.5e+19) {
tmp = y * 4.0;
} else if (y <= 3.4e+31) {
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 (y <= (-4.5d+19)) then
tmp = y * 4.0d0
else if (y <= 3.4d+31) 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 (y <= -4.5e+19) {
tmp = y * 4.0;
} else if (y <= 3.4e+31) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -4.5e+19: tmp = y * 4.0 elif y <= 3.4e+31: tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -4.5e+19) tmp = Float64(y * 4.0); elseif (y <= 3.4e+31) 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 (y <= -4.5e+19) tmp = y * 4.0; elseif (y <= 3.4e+31) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -4.5e+19], N[(y * 4.0), $MachinePrecision], If[LessEqual[y, 3.4e+31], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+19}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+31}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if y < -4.5e19 or 3.3999999999999998e31 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-cbrt-cube48.5%
pow348.4%
+-commutative48.4%
associate-*l*48.5%
fma-udef48.5%
Applied egg-rr48.5%
Taylor expanded in z around 0 56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in x around 0 44.7%
*-commutative44.7%
Simplified44.7%
if -4.5e19 < y < 3.3999999999999998e31Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 74.9%
sub-neg74.9%
distribute-rgt-in74.9%
metadata-eval74.9%
metadata-eval74.9%
neg-mul-174.9%
associate-*r*74.9%
*-commutative74.9%
associate-+r+74.9%
metadata-eval74.9%
metadata-eval74.9%
associate-*r*74.9%
metadata-eval74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in z around 0 41.3%
*-commutative41.3%
Simplified41.3%
Final simplification42.8%
(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.2%
sub-neg54.2%
distribute-rgt-in54.2%
metadata-eval54.2%
metadata-eval54.2%
neg-mul-154.2%
associate-*r*54.2%
*-commutative54.2%
associate-+r+54.2%
metadata-eval54.2%
metadata-eval54.2%
associate-*r*54.2%
metadata-eval54.2%
*-commutative54.2%
Simplified54.2%
Taylor expanded in z around 0 29.0%
*-commutative29.0%
Simplified29.0%
Final simplification29.0%
(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 z around inf 46.9%
Taylor expanded in z around 0 2.5%
Final simplification2.5%
herbie shell --seed 2023279
(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))))