
(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 16 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.5%
+-commutative99.5%
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 -1.12e+231)
t_0
(if (<= z -4e+183)
t_1
(if (<= z -2.05e+128)
t_0
(if (<= z -1e+57)
t_1
(if (<= z -0.65)
t_0
(if (<= z -2.5e-82)
(* y 4.0)
(if (<= z -2.6e-111)
(* x -3.0)
(if (<= z -5.2e-145)
(* y 4.0)
(if (<= z -6.4e-307)
(* x -3.0)
(if (<= z 2e-176)
(* y 4.0)
(if (<= z 6e-77)
(* x -3.0)
(if (<= z 2550.0)
(* y 4.0)
(if (<= z 1.5e+104) t_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 <= -1.12e+231) {
tmp = t_0;
} else if (z <= -4e+183) {
tmp = t_1;
} else if (z <= -2.05e+128) {
tmp = t_0;
} else if (z <= -1e+57) {
tmp = t_1;
} else if (z <= -0.65) {
tmp = t_0;
} else if (z <= -2.5e-82) {
tmp = y * 4.0;
} else if (z <= -2.6e-111) {
tmp = x * -3.0;
} else if (z <= -5.2e-145) {
tmp = y * 4.0;
} else if (z <= -6.4e-307) {
tmp = x * -3.0;
} else if (z <= 2e-176) {
tmp = y * 4.0;
} else if (z <= 6e-77) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 1.5e+104) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-1.12d+231)) then
tmp = t_0
else if (z <= (-4d+183)) then
tmp = t_1
else if (z <= (-2.05d+128)) then
tmp = t_0
else if (z <= (-1d+57)) then
tmp = t_1
else if (z <= (-0.65d0)) then
tmp = t_0
else if (z <= (-2.5d-82)) then
tmp = y * 4.0d0
else if (z <= (-2.6d-111)) then
tmp = x * (-3.0d0)
else if (z <= (-5.2d-145)) then
tmp = y * 4.0d0
else if (z <= (-6.4d-307)) then
tmp = x * (-3.0d0)
else if (z <= 2d-176) then
tmp = y * 4.0d0
else if (z <= 6d-77) then
tmp = x * (-3.0d0)
else if (z <= 2550.0d0) then
tmp = y * 4.0d0
else if (z <= 1.5d+104) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.12e+231) {
tmp = t_0;
} else if (z <= -4e+183) {
tmp = t_1;
} else if (z <= -2.05e+128) {
tmp = t_0;
} else if (z <= -1e+57) {
tmp = t_1;
} else if (z <= -0.65) {
tmp = t_0;
} else if (z <= -2.5e-82) {
tmp = y * 4.0;
} else if (z <= -2.6e-111) {
tmp = x * -3.0;
} else if (z <= -5.2e-145) {
tmp = y * 4.0;
} else if (z <= -6.4e-307) {
tmp = x * -3.0;
} else if (z <= 2e-176) {
tmp = y * 4.0;
} else if (z <= 6e-77) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 1.5e+104) {
tmp = t_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 <= -1.12e+231: tmp = t_0 elif z <= -4e+183: tmp = t_1 elif z <= -2.05e+128: tmp = t_0 elif z <= -1e+57: tmp = t_1 elif z <= -0.65: tmp = t_0 elif z <= -2.5e-82: tmp = y * 4.0 elif z <= -2.6e-111: tmp = x * -3.0 elif z <= -5.2e-145: tmp = y * 4.0 elif z <= -6.4e-307: tmp = x * -3.0 elif z <= 2e-176: tmp = y * 4.0 elif z <= 6e-77: tmp = x * -3.0 elif z <= 2550.0: tmp = y * 4.0 elif z <= 1.5e+104: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.12e+231) tmp = t_0; elseif (z <= -4e+183) tmp = t_1; elseif (z <= -2.05e+128) tmp = t_0; elseif (z <= -1e+57) tmp = t_1; elseif (z <= -0.65) tmp = t_0; elseif (z <= -2.5e-82) tmp = Float64(y * 4.0); elseif (z <= -2.6e-111) tmp = Float64(x * -3.0); elseif (z <= -5.2e-145) tmp = Float64(y * 4.0); elseif (z <= -6.4e-307) tmp = Float64(x * -3.0); elseif (z <= 2e-176) tmp = Float64(y * 4.0); elseif (z <= 6e-77) tmp = Float64(x * -3.0); elseif (z <= 2550.0) tmp = Float64(y * 4.0); elseif (z <= 1.5e+104) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.12e+231) tmp = t_0; elseif (z <= -4e+183) tmp = t_1; elseif (z <= -2.05e+128) tmp = t_0; elseif (z <= -1e+57) tmp = t_1; elseif (z <= -0.65) tmp = t_0; elseif (z <= -2.5e-82) tmp = y * 4.0; elseif (z <= -2.6e-111) tmp = x * -3.0; elseif (z <= -5.2e-145) tmp = y * 4.0; elseif (z <= -6.4e-307) tmp = x * -3.0; elseif (z <= 2e-176) tmp = y * 4.0; elseif (z <= 6e-77) tmp = x * -3.0; elseif (z <= 2550.0) tmp = y * 4.0; elseif (z <= 1.5e+104) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e+231], t$95$0, If[LessEqual[z, -4e+183], t$95$1, If[LessEqual[z, -2.05e+128], t$95$0, If[LessEqual[z, -1e+57], t$95$1, If[LessEqual[z, -0.65], t$95$0, If[LessEqual[z, -2.5e-82], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.6e-111], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.2e-145], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -6.4e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2e-176], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6e-77], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2550.0], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.5e+104], t$95$0, 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 -1.12 \cdot 10^{+231}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{+128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -0.65:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-82}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-111}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-145}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-176}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2550:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+104}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1200000000000001e231 or -3.99999999999999979e183 < z < -2.05000000000000006e128 or -1.00000000000000005e57 < z < -0.650000000000000022 or 2550 < z < 1.49999999999999984e104Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 98.2%
Taylor expanded in y around inf 69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in z around inf 68.0%
if -1.1200000000000001e231 < z < -3.99999999999999979e183 or -2.05000000000000006e128 < z < -1.00000000000000005e57 or 1.49999999999999984e104 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 67.5%
sub-neg67.5%
distribute-rgt-in67.5%
metadata-eval67.5%
metadata-eval67.5%
neg-mul-167.5%
associate-*r*67.5%
*-commutative67.5%
associate-+r+67.5%
metadata-eval67.5%
metadata-eval67.5%
associate-*r*67.5%
metadata-eval67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in z around inf 67.6%
if -0.650000000000000022 < z < -2.4999999999999999e-82 or -2.59999999999999982e-111 < z < -5.1999999999999999e-145 or -6.40000000000000021e-307 < z < 2e-176 or 6.00000000000000033e-77 < z < 2550Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 93.6%
Taylor expanded in x around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -2.4999999999999999e-82 < z < -2.59999999999999982e-111 or -5.1999999999999999e-145 < z < -6.40000000000000021e-307 or 2e-176 < z < 6.00000000000000033e-77Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification66.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -2.4e+60)
(* x (* z 6.0))
(if (<= z -0.65)
t_0
(if (<= z -3.5e-81)
(* y 4.0)
(if (<= z -3.3e-110)
(* x -3.0)
(if (<= z -2.8e-145)
(* y 4.0)
(if (<= z -9.6e-307)
(* x -3.0)
(if (<= z 5.8e-176)
(* y 4.0)
(if (<= z 1.15e-77)
(* x -3.0)
(if (<= z 2550.0)
(* y 4.0)
(if (<= z 4.5e+106) 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 <= -2.4e+60) {
tmp = x * (z * 6.0);
} else if (z <= -0.65) {
tmp = t_0;
} else if (z <= -3.5e-81) {
tmp = y * 4.0;
} else if (z <= -3.3e-110) {
tmp = x * -3.0;
} else if (z <= -2.8e-145) {
tmp = y * 4.0;
} else if (z <= -9.6e-307) {
tmp = x * -3.0;
} else if (z <= 5.8e-176) {
tmp = y * 4.0;
} else if (z <= 1.15e-77) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 4.5e+106) {
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 <= (-2.4d+60)) then
tmp = x * (z * 6.0d0)
else if (z <= (-0.65d0)) then
tmp = t_0
else if (z <= (-3.5d-81)) then
tmp = y * 4.0d0
else if (z <= (-3.3d-110)) then
tmp = x * (-3.0d0)
else if (z <= (-2.8d-145)) then
tmp = y * 4.0d0
else if (z <= (-9.6d-307)) then
tmp = x * (-3.0d0)
else if (z <= 5.8d-176) then
tmp = y * 4.0d0
else if (z <= 1.15d-77) then
tmp = x * (-3.0d0)
else if (z <= 2550.0d0) then
tmp = y * 4.0d0
else if (z <= 4.5d+106) 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 <= -2.4e+60) {
tmp = x * (z * 6.0);
} else if (z <= -0.65) {
tmp = t_0;
} else if (z <= -3.5e-81) {
tmp = y * 4.0;
} else if (z <= -3.3e-110) {
tmp = x * -3.0;
} else if (z <= -2.8e-145) {
tmp = y * 4.0;
} else if (z <= -9.6e-307) {
tmp = x * -3.0;
} else if (z <= 5.8e-176) {
tmp = y * 4.0;
} else if (z <= 1.15e-77) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 4.5e+106) {
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 <= -2.4e+60: tmp = x * (z * 6.0) elif z <= -0.65: tmp = t_0 elif z <= -3.5e-81: tmp = y * 4.0 elif z <= -3.3e-110: tmp = x * -3.0 elif z <= -2.8e-145: tmp = y * 4.0 elif z <= -9.6e-307: tmp = x * -3.0 elif z <= 5.8e-176: tmp = y * 4.0 elif z <= 1.15e-77: tmp = x * -3.0 elif z <= 2550.0: tmp = y * 4.0 elif z <= 4.5e+106: 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 <= -2.4e+60) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -0.65) tmp = t_0; elseif (z <= -3.5e-81) tmp = Float64(y * 4.0); elseif (z <= -3.3e-110) tmp = Float64(x * -3.0); elseif (z <= -2.8e-145) tmp = Float64(y * 4.0); elseif (z <= -9.6e-307) tmp = Float64(x * -3.0); elseif (z <= 5.8e-176) tmp = Float64(y * 4.0); elseif (z <= 1.15e-77) tmp = Float64(x * -3.0); elseif (z <= 2550.0) tmp = Float64(y * 4.0); elseif (z <= 4.5e+106) 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 <= -2.4e+60) tmp = x * (z * 6.0); elseif (z <= -0.65) tmp = t_0; elseif (z <= -3.5e-81) tmp = y * 4.0; elseif (z <= -3.3e-110) tmp = x * -3.0; elseif (z <= -2.8e-145) tmp = y * 4.0; elseif (z <= -9.6e-307) tmp = x * -3.0; elseif (z <= 5.8e-176) tmp = y * 4.0; elseif (z <= 1.15e-77) tmp = x * -3.0; elseif (z <= 2550.0) tmp = y * 4.0; elseif (z <= 4.5e+106) 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, -2.4e+60], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.65], t$95$0, If[LessEqual[z, -3.5e-81], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.3e-110], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.8e-145], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -9.6e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.8e-176], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.15e-77], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2550.0], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.5e+106], 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 -2.4 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -0.65:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-81}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-110}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-145}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-176}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-77}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2550:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+106}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -2.4e60Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 57.9%
sub-neg57.9%
distribute-rgt-in57.9%
metadata-eval57.9%
metadata-eval57.9%
neg-mul-157.9%
associate-*r*57.9%
*-commutative57.9%
associate-+r+57.9%
metadata-eval57.9%
metadata-eval57.9%
associate-*r*57.9%
metadata-eval57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in z around inf 57.8%
associate-*r*57.9%
*-commutative57.9%
associate-*l*57.9%
*-commutative57.9%
Simplified57.9%
if -2.4e60 < z < -0.650000000000000022 or 2550 < z < 4.4999999999999997e106Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in z around inf 64.4%
if -0.650000000000000022 < z < -3.49999999999999986e-81 or -3.2999999999999999e-110 < z < -2.8000000000000001e-145 or -9.60000000000000071e-307 < z < 5.80000000000000012e-176 or 1.14999999999999999e-77 < z < 2550Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 93.6%
Taylor expanded in x around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -3.49999999999999986e-81 < z < -3.2999999999999999e-110 or -2.8000000000000001e-145 < z < -9.60000000000000071e-307 or 5.80000000000000012e-176 < z < 1.14999999999999999e-77Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 4.4999999999999997e106 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 64.2%
sub-neg64.2%
distribute-rgt-in64.2%
metadata-eval64.2%
metadata-eval64.2%
neg-mul-164.2%
associate-*r*64.2%
*-commutative64.2%
associate-+r+64.2%
metadata-eval64.2%
metadata-eval64.2%
associate-*r*64.2%
metadata-eval64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in z around inf 64.4%
Final simplification63.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* x 6.0))) (t_1 (* -6.0 (* y z))))
(if (<= z -6.2e+61)
t_0
(if (<= z -0.65)
t_1
(if (<= z -7.2e-81)
(* y 4.0)
(if (<= z -1.4e-113)
(* x -3.0)
(if (<= z -7.2e-145)
(* y 4.0)
(if (<= z -5e-306)
(* x -3.0)
(if (<= z 3.1e-175)
(* y 4.0)
(if (<= z 5.1e-77)
(* x -3.0)
(if (<= z 2550.0)
(* y 4.0)
(if (<= z 1.42e+105) t_1 t_0))))))))))))
double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -6.2e+61) {
tmp = t_0;
} else if (z <= -0.65) {
tmp = t_1;
} else if (z <= -7.2e-81) {
tmp = y * 4.0;
} else if (z <= -1.4e-113) {
tmp = x * -3.0;
} else if (z <= -7.2e-145) {
tmp = y * 4.0;
} else if (z <= -5e-306) {
tmp = x * -3.0;
} else if (z <= 3.1e-175) {
tmp = y * 4.0;
} else if (z <= 5.1e-77) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 1.42e+105) {
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 = z * (x * 6.0d0)
t_1 = (-6.0d0) * (y * z)
if (z <= (-6.2d+61)) then
tmp = t_0
else if (z <= (-0.65d0)) then
tmp = t_1
else if (z <= (-7.2d-81)) then
tmp = y * 4.0d0
else if (z <= (-1.4d-113)) then
tmp = x * (-3.0d0)
else if (z <= (-7.2d-145)) then
tmp = y * 4.0d0
else if (z <= (-5d-306)) then
tmp = x * (-3.0d0)
else if (z <= 3.1d-175) then
tmp = y * 4.0d0
else if (z <= 5.1d-77) then
tmp = x * (-3.0d0)
else if (z <= 2550.0d0) then
tmp = y * 4.0d0
else if (z <= 1.42d+105) 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 = z * (x * 6.0);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -6.2e+61) {
tmp = t_0;
} else if (z <= -0.65) {
tmp = t_1;
} else if (z <= -7.2e-81) {
tmp = y * 4.0;
} else if (z <= -1.4e-113) {
tmp = x * -3.0;
} else if (z <= -7.2e-145) {
tmp = y * 4.0;
} else if (z <= -5e-306) {
tmp = x * -3.0;
} else if (z <= 3.1e-175) {
tmp = y * 4.0;
} else if (z <= 5.1e-77) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 1.42e+105) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (x * 6.0) t_1 = -6.0 * (y * z) tmp = 0 if z <= -6.2e+61: tmp = t_0 elif z <= -0.65: tmp = t_1 elif z <= -7.2e-81: tmp = y * 4.0 elif z <= -1.4e-113: tmp = x * -3.0 elif z <= -7.2e-145: tmp = y * 4.0 elif z <= -5e-306: tmp = x * -3.0 elif z <= 3.1e-175: tmp = y * 4.0 elif z <= 5.1e-77: tmp = x * -3.0 elif z <= 2550.0: tmp = y * 4.0 elif z <= 1.42e+105: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(x * 6.0)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -6.2e+61) tmp = t_0; elseif (z <= -0.65) tmp = t_1; elseif (z <= -7.2e-81) tmp = Float64(y * 4.0); elseif (z <= -1.4e-113) tmp = Float64(x * -3.0); elseif (z <= -7.2e-145) tmp = Float64(y * 4.0); elseif (z <= -5e-306) tmp = Float64(x * -3.0); elseif (z <= 3.1e-175) tmp = Float64(y * 4.0); elseif (z <= 5.1e-77) tmp = Float64(x * -3.0); elseif (z <= 2550.0) tmp = Float64(y * 4.0); elseif (z <= 1.42e+105) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (x * 6.0); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -6.2e+61) tmp = t_0; elseif (z <= -0.65) tmp = t_1; elseif (z <= -7.2e-81) tmp = y * 4.0; elseif (z <= -1.4e-113) tmp = x * -3.0; elseif (z <= -7.2e-145) tmp = y * 4.0; elseif (z <= -5e-306) tmp = x * -3.0; elseif (z <= 3.1e-175) tmp = y * 4.0; elseif (z <= 5.1e-77) tmp = x * -3.0; elseif (z <= 2550.0) tmp = y * 4.0; elseif (z <= 1.42e+105) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+61], t$95$0, If[LessEqual[z, -0.65], t$95$1, If[LessEqual[z, -7.2e-81], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.4e-113], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7.2e-145], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -5e-306], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.1e-175], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.1e-77], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2550.0], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.42e+105], t$95$1, t$95$0]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(x \cdot 6\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+61}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -0.65:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-81}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-113}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-145}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-306}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-175}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-77}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2550:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -6.1999999999999998e61 or 1.41999999999999991e105 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 96.5%
fma-def96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around 0 60.3%
if -6.1999999999999998e61 < z < -0.650000000000000022 or 2550 < z < 1.41999999999999991e105Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in z around inf 64.4%
if -0.650000000000000022 < z < -7.1999999999999997e-81 or -1.4e-113 < z < -7.2000000000000001e-145 or -4.99999999999999998e-306 < z < 3.09999999999999999e-175 or 5.10000000000000032e-77 < z < 2550Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 93.6%
Taylor expanded in x around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -7.1999999999999997e-81 < z < -1.4e-113 or -7.2000000000000001e-145 < z < -4.99999999999999998e-306 or 3.09999999999999999e-175 < z < 5.10000000000000032e-77Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification63.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* x 6.0))))
(if (<= z -1.95e+62)
t_0
(if (<= z -0.65)
(* z (* y -6.0))
(if (<= z -2.55e-83)
(* y 4.0)
(if (<= z -2.1e-110)
(* x -3.0)
(if (<= z -2.95e-145)
(* y 4.0)
(if (<= z -1.65e-305)
(* x -3.0)
(if (<= z 4.5e-175)
(* y 4.0)
(if (<= z 1.95e-82)
(* x -3.0)
(if (<= z 2550.0)
(* y 4.0)
(if (<= z 3.15e+105) (* -6.0 (* y z)) t_0))))))))))))
double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -1.95e+62) {
tmp = t_0;
} else if (z <= -0.65) {
tmp = z * (y * -6.0);
} else if (z <= -2.55e-83) {
tmp = y * 4.0;
} else if (z <= -2.1e-110) {
tmp = x * -3.0;
} else if (z <= -2.95e-145) {
tmp = y * 4.0;
} else if (z <= -1.65e-305) {
tmp = x * -3.0;
} else if (z <= 4.5e-175) {
tmp = y * 4.0;
} else if (z <= 1.95e-82) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 3.15e+105) {
tmp = -6.0 * (y * z);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * (x * 6.0d0)
if (z <= (-1.95d+62)) then
tmp = t_0
else if (z <= (-0.65d0)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-2.55d-83)) then
tmp = y * 4.0d0
else if (z <= (-2.1d-110)) then
tmp = x * (-3.0d0)
else if (z <= (-2.95d-145)) then
tmp = y * 4.0d0
else if (z <= (-1.65d-305)) then
tmp = x * (-3.0d0)
else if (z <= 4.5d-175) then
tmp = y * 4.0d0
else if (z <= 1.95d-82) then
tmp = x * (-3.0d0)
else if (z <= 2550.0d0) then
tmp = y * 4.0d0
else if (z <= 3.15d+105) then
tmp = (-6.0d0) * (y * z)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -1.95e+62) {
tmp = t_0;
} else if (z <= -0.65) {
tmp = z * (y * -6.0);
} else if (z <= -2.55e-83) {
tmp = y * 4.0;
} else if (z <= -2.1e-110) {
tmp = x * -3.0;
} else if (z <= -2.95e-145) {
tmp = y * 4.0;
} else if (z <= -1.65e-305) {
tmp = x * -3.0;
} else if (z <= 4.5e-175) {
tmp = y * 4.0;
} else if (z <= 1.95e-82) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
tmp = y * 4.0;
} else if (z <= 3.15e+105) {
tmp = -6.0 * (y * z);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (x * 6.0) tmp = 0 if z <= -1.95e+62: tmp = t_0 elif z <= -0.65: tmp = z * (y * -6.0) elif z <= -2.55e-83: tmp = y * 4.0 elif z <= -2.1e-110: tmp = x * -3.0 elif z <= -2.95e-145: tmp = y * 4.0 elif z <= -1.65e-305: tmp = x * -3.0 elif z <= 4.5e-175: tmp = y * 4.0 elif z <= 1.95e-82: tmp = x * -3.0 elif z <= 2550.0: tmp = y * 4.0 elif z <= 3.15e+105: tmp = -6.0 * (y * z) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -1.95e+62) tmp = t_0; elseif (z <= -0.65) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -2.55e-83) tmp = Float64(y * 4.0); elseif (z <= -2.1e-110) tmp = Float64(x * -3.0); elseif (z <= -2.95e-145) tmp = Float64(y * 4.0); elseif (z <= -1.65e-305) tmp = Float64(x * -3.0); elseif (z <= 4.5e-175) tmp = Float64(y * 4.0); elseif (z <= 1.95e-82) tmp = Float64(x * -3.0); elseif (z <= 2550.0) tmp = Float64(y * 4.0); elseif (z <= 3.15e+105) tmp = Float64(-6.0 * Float64(y * z)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (x * 6.0); tmp = 0.0; if (z <= -1.95e+62) tmp = t_0; elseif (z <= -0.65) tmp = z * (y * -6.0); elseif (z <= -2.55e-83) tmp = y * 4.0; elseif (z <= -2.1e-110) tmp = x * -3.0; elseif (z <= -2.95e-145) tmp = y * 4.0; elseif (z <= -1.65e-305) tmp = x * -3.0; elseif (z <= 4.5e-175) tmp = y * 4.0; elseif (z <= 1.95e-82) tmp = x * -3.0; elseif (z <= 2550.0) tmp = y * 4.0; elseif (z <= 3.15e+105) tmp = -6.0 * (y * z); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+62], t$95$0, If[LessEqual[z, -0.65], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.55e-83], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.1e-110], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.95e-145], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.65e-305], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.5e-175], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.95e-82], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2550.0], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.15e+105], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+62}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -0.65:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-83}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-110}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.95 \cdot 10^{-145}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-305}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-175}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-82}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2550:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.15 \cdot 10^{+105}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.95e62 or 3.14999999999999977e105 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 96.5%
fma-def96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around 0 60.3%
if -1.95e62 < z < -0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in z around inf 66.9%
*-commutative66.9%
*-commutative66.9%
associate-*r*67.1%
Simplified67.1%
if -0.650000000000000022 < z < -2.55000000000000018e-83 or -2.10000000000000002e-110 < z < -2.9499999999999999e-145 or -1.64999999999999991e-305 < z < 4.49999999999999998e-175 or 1.94999999999999987e-82 < z < 2550Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 93.6%
Taylor expanded in x around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -2.55000000000000018e-83 < z < -2.10000000000000002e-110 or -2.9499999999999999e-145 < z < -1.64999999999999991e-305 or 4.49999999999999998e-175 < z < 1.94999999999999987e-82Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 2550 < z < 3.14999999999999977e105Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in z around inf 63.2%
Final simplification63.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* x 6.0))))
(if (<= z -8.5e+60)
t_0
(if (<= z -0.65)
(* z (* y -6.0))
(if (<= z -4.4e-80)
(* y 4.0)
(if (<= z -7.2e-109)
(* x -3.0)
(if (<= z -5.6e-145)
(* y 4.0)
(if (<= z -5.2e-306)
(* x -3.0)
(if (<= z 7e-175)
(* y 4.0)
(if (<= z 4.3e-79)
(* x -3.0)
(if (<= z 2800.0)
(+ x (* y 4.0))
(if (<= z 1.9e+105) (* -6.0 (* y z)) t_0))))))))))))
double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -8.5e+60) {
tmp = t_0;
} else if (z <= -0.65) {
tmp = z * (y * -6.0);
} else if (z <= -4.4e-80) {
tmp = y * 4.0;
} else if (z <= -7.2e-109) {
tmp = x * -3.0;
} else if (z <= -5.6e-145) {
tmp = y * 4.0;
} else if (z <= -5.2e-306) {
tmp = x * -3.0;
} else if (z <= 7e-175) {
tmp = y * 4.0;
} else if (z <= 4.3e-79) {
tmp = x * -3.0;
} else if (z <= 2800.0) {
tmp = x + (y * 4.0);
} else if (z <= 1.9e+105) {
tmp = -6.0 * (y * z);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * (x * 6.0d0)
if (z <= (-8.5d+60)) then
tmp = t_0
else if (z <= (-0.65d0)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-4.4d-80)) then
tmp = y * 4.0d0
else if (z <= (-7.2d-109)) then
tmp = x * (-3.0d0)
else if (z <= (-5.6d-145)) then
tmp = y * 4.0d0
else if (z <= (-5.2d-306)) then
tmp = x * (-3.0d0)
else if (z <= 7d-175) then
tmp = y * 4.0d0
else if (z <= 4.3d-79) then
tmp = x * (-3.0d0)
else if (z <= 2800.0d0) then
tmp = x + (y * 4.0d0)
else if (z <= 1.9d+105) then
tmp = (-6.0d0) * (y * z)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -8.5e+60) {
tmp = t_0;
} else if (z <= -0.65) {
tmp = z * (y * -6.0);
} else if (z <= -4.4e-80) {
tmp = y * 4.0;
} else if (z <= -7.2e-109) {
tmp = x * -3.0;
} else if (z <= -5.6e-145) {
tmp = y * 4.0;
} else if (z <= -5.2e-306) {
tmp = x * -3.0;
} else if (z <= 7e-175) {
tmp = y * 4.0;
} else if (z <= 4.3e-79) {
tmp = x * -3.0;
} else if (z <= 2800.0) {
tmp = x + (y * 4.0);
} else if (z <= 1.9e+105) {
tmp = -6.0 * (y * z);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (x * 6.0) tmp = 0 if z <= -8.5e+60: tmp = t_0 elif z <= -0.65: tmp = z * (y * -6.0) elif z <= -4.4e-80: tmp = y * 4.0 elif z <= -7.2e-109: tmp = x * -3.0 elif z <= -5.6e-145: tmp = y * 4.0 elif z <= -5.2e-306: tmp = x * -3.0 elif z <= 7e-175: tmp = y * 4.0 elif z <= 4.3e-79: tmp = x * -3.0 elif z <= 2800.0: tmp = x + (y * 4.0) elif z <= 1.9e+105: tmp = -6.0 * (y * z) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -8.5e+60) tmp = t_0; elseif (z <= -0.65) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -4.4e-80) tmp = Float64(y * 4.0); elseif (z <= -7.2e-109) tmp = Float64(x * -3.0); elseif (z <= -5.6e-145) tmp = Float64(y * 4.0); elseif (z <= -5.2e-306) tmp = Float64(x * -3.0); elseif (z <= 7e-175) tmp = Float64(y * 4.0); elseif (z <= 4.3e-79) tmp = Float64(x * -3.0); elseif (z <= 2800.0) tmp = Float64(x + Float64(y * 4.0)); elseif (z <= 1.9e+105) tmp = Float64(-6.0 * Float64(y * z)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (x * 6.0); tmp = 0.0; if (z <= -8.5e+60) tmp = t_0; elseif (z <= -0.65) tmp = z * (y * -6.0); elseif (z <= -4.4e-80) tmp = y * 4.0; elseif (z <= -7.2e-109) tmp = x * -3.0; elseif (z <= -5.6e-145) tmp = y * 4.0; elseif (z <= -5.2e-306) tmp = x * -3.0; elseif (z <= 7e-175) tmp = y * 4.0; elseif (z <= 4.3e-79) tmp = x * -3.0; elseif (z <= 2800.0) tmp = x + (y * 4.0); elseif (z <= 1.9e+105) tmp = -6.0 * (y * z); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+60], t$95$0, If[LessEqual[z, -0.65], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-80], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -7.2e-109], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.6e-145], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -5.2e-306], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7e-175], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.3e-79], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2800.0], N[(x + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+105], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+60}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -0.65:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-80}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-109}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-145}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-306}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-175}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-79}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2800:\\
\;\;\;\;x + y \cdot 4\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+105}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -8.50000000000000064e60 or 1.9e105 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 96.5%
fma-def96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around 0 60.3%
if -8.50000000000000064e60 < z < -0.650000000000000022Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in z around inf 66.9%
*-commutative66.9%
*-commutative66.9%
associate-*r*67.1%
Simplified67.1%
if -0.650000000000000022 < z < -4.4000000000000002e-80 or -7.2000000000000001e-109 < z < -5.6000000000000002e-145 or -5.2000000000000001e-306 < z < 6.99999999999999997e-175Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.6%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 97.3%
Taylor expanded in x around 0 68.8%
*-commutative68.8%
Simplified68.8%
if -4.4000000000000002e-80 < z < -7.2000000000000001e-109 or -5.6000000000000002e-145 < z < -5.2000000000000001e-306 or 6.99999999999999997e-175 < z < 4.29999999999999982e-79Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 4.29999999999999982e-79 < z < 2800Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 51.1%
Taylor expanded in z around 0 50.8%
*-commutative50.8%
Simplified50.8%
if 2800 < z < 1.9e105Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in z around inf 63.2%
Final simplification63.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.65)
t_0
(if (<= z -1.5e-82)
(* y 4.0)
(if (<= z -1.1e-110)
(* x -3.0)
(if (<= z -6.1e-145)
(* y 4.0)
(if (<= z -6.8e-306)
(* x -3.0)
(if (<= z 2.3e-175)
(* y 4.0)
(if (<= z 7.8e-80)
(* x -3.0)
(if (<= z 2550.0) (* 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.65) {
tmp = t_0;
} else if (z <= -1.5e-82) {
tmp = y * 4.0;
} else if (z <= -1.1e-110) {
tmp = x * -3.0;
} else if (z <= -6.1e-145) {
tmp = y * 4.0;
} else if (z <= -6.8e-306) {
tmp = x * -3.0;
} else if (z <= 2.3e-175) {
tmp = y * 4.0;
} else if (z <= 7.8e-80) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
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.65d0)) then
tmp = t_0
else if (z <= (-1.5d-82)) then
tmp = y * 4.0d0
else if (z <= (-1.1d-110)) then
tmp = x * (-3.0d0)
else if (z <= (-6.1d-145)) then
tmp = y * 4.0d0
else if (z <= (-6.8d-306)) then
tmp = x * (-3.0d0)
else if (z <= 2.3d-175) then
tmp = y * 4.0d0
else if (z <= 7.8d-80) then
tmp = x * (-3.0d0)
else if (z <= 2550.0d0) 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.65) {
tmp = t_0;
} else if (z <= -1.5e-82) {
tmp = y * 4.0;
} else if (z <= -1.1e-110) {
tmp = x * -3.0;
} else if (z <= -6.1e-145) {
tmp = y * 4.0;
} else if (z <= -6.8e-306) {
tmp = x * -3.0;
} else if (z <= 2.3e-175) {
tmp = y * 4.0;
} else if (z <= 7.8e-80) {
tmp = x * -3.0;
} else if (z <= 2550.0) {
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.65: tmp = t_0 elif z <= -1.5e-82: tmp = y * 4.0 elif z <= -1.1e-110: tmp = x * -3.0 elif z <= -6.1e-145: tmp = y * 4.0 elif z <= -6.8e-306: tmp = x * -3.0 elif z <= 2.3e-175: tmp = y * 4.0 elif z <= 7.8e-80: tmp = x * -3.0 elif z <= 2550.0: 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.65) tmp = t_0; elseif (z <= -1.5e-82) tmp = Float64(y * 4.0); elseif (z <= -1.1e-110) tmp = Float64(x * -3.0); elseif (z <= -6.1e-145) tmp = Float64(y * 4.0); elseif (z <= -6.8e-306) tmp = Float64(x * -3.0); elseif (z <= 2.3e-175) tmp = Float64(y * 4.0); elseif (z <= 7.8e-80) tmp = Float64(x * -3.0); elseif (z <= 2550.0) 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.65) tmp = t_0; elseif (z <= -1.5e-82) tmp = y * 4.0; elseif (z <= -1.1e-110) tmp = x * -3.0; elseif (z <= -6.1e-145) tmp = y * 4.0; elseif (z <= -6.8e-306) tmp = x * -3.0; elseif (z <= 2.3e-175) tmp = y * 4.0; elseif (z <= 7.8e-80) tmp = x * -3.0; elseif (z <= 2550.0) 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.65], t$95$0, If[LessEqual[z, -1.5e-82], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.1e-110], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -6.1e-145], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -6.8e-306], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.3e-175], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.8e-80], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2550.0], 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.65:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-82}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-110}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -6.1 \cdot 10^{-145}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-306}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-175}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-80}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2550:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.650000000000000022 or 2550 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 97.4%
Taylor expanded in y around inf 51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in z around inf 50.2%
if -0.650000000000000022 < z < -1.4999999999999999e-82 or -1.1e-110 < z < -6.1e-145 or -6.7999999999999996e-306 < z < 2.3e-175 or 7.7999999999999995e-80 < z < 2550Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 93.6%
Taylor expanded in x around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -1.4999999999999999e-82 < z < -1.1e-110 or -6.1e-145 < z < -6.7999999999999996e-306 or 2.3e-175 < z < 7.7999999999999995e-80Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 67.2%
sub-neg67.2%
distribute-rgt-in67.2%
metadata-eval67.2%
metadata-eval67.2%
neg-mul-167.2%
associate-*r*67.2%
*-commutative67.2%
associate-+r+67.2%
metadata-eval67.2%
metadata-eval67.2%
associate-*r*67.2%
metadata-eval67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification57.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.65))) (* z (+ (* y -6.0) (* x 6.0))) (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.65)) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.58d0)) .or. (.not. (z <= 0.65d0))) then
tmp = z * ((y * (-6.0d0)) + (x * 6.0d0))
else
tmp = (x * (-3.0d0)) + (y * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.65)) {
tmp = z * ((y * -6.0) + (x * 6.0));
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.65): tmp = z * ((y * -6.0) + (x * 6.0)) else: tmp = (x * -3.0) + (y * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.65)) tmp = Float64(z * Float64(Float64(y * -6.0) + Float64(x * 6.0))); else tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.65))) tmp = z * ((y * -6.0) + (x * 6.0)); else tmp = (x * -3.0) + (y * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.65]], $MachinePrecision]], N[(z * N[(N[(y * -6.0), $MachinePrecision] + N[(x * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.65\right):\\
\;\;\;\;z \cdot \left(y \cdot -6 + x \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.650000000000000022 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 97.4%
fma-def97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in z around inf 97.2%
if -0.57999999999999996 < z < 0.650000000000000022Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.6%
fma-def99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 98.0%
Final simplification97.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.9e+69) (not (<= x 6.5e-39))) (* x (+ -3.0 (* z 6.0))) (* 6.0 (* y (- 0.6666666666666666 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.9e+69) || !(x <= 6.5e-39)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-5.9d+69)) .or. (.not. (x <= 6.5d-39))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.9e+69) || !(x <= 6.5e-39)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = 6.0 * (y * (0.6666666666666666 - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.9e+69) or not (x <= 6.5e-39): tmp = x * (-3.0 + (z * 6.0)) else: tmp = 6.0 * (y * (0.6666666666666666 - z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.9e+69) || !(x <= 6.5e-39)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.9e+69) || ~((x <= 6.5e-39))) tmp = x * (-3.0 + (z * 6.0)); else tmp = 6.0 * (y * (0.6666666666666666 - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.9e+69], N[Not[LessEqual[x, 6.5e-39]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{+69} \lor \neg \left(x \leq 6.5 \cdot 10^{-39}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\end{array}
\end{array}
if x < -5.90000000000000004e69 or 6.50000000000000027e-39 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 79.8%
sub-neg79.8%
distribute-rgt-in79.8%
metadata-eval79.8%
metadata-eval79.8%
neg-mul-179.8%
associate-*r*79.8%
*-commutative79.8%
associate-+r+79.8%
metadata-eval79.8%
metadata-eval79.8%
associate-*r*79.8%
metadata-eval79.8%
*-commutative79.8%
Simplified79.8%
if -5.90000000000000004e69 < x < 6.50000000000000027e-39Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 74.8%
*-commutative74.8%
Simplified74.8%
Final simplification77.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.55e+69) (not (<= x 2.9e-40))) (* x (+ -3.0 (* z 6.0))) (* y (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e+69) || !(x <= 2.9e-40)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-2.55d+69)) .or. (.not. (x <= 2.9d-40))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = y * (4.0d0 + (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e+69) || !(x <= 2.9e-40)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.55e+69) or not (x <= 2.9e-40): tmp = x * (-3.0 + (z * 6.0)) else: tmp = y * (4.0 + (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.55e+69) || !(x <= 2.9e-40)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.55e+69) || ~((x <= 2.9e-40))) tmp = x * (-3.0 + (z * 6.0)); else tmp = y * (4.0 + (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.55e+69], N[Not[LessEqual[x, 2.9e-40]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{+69} \lor \neg \left(x \leq 2.9 \cdot 10^{-40}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\end{array}
\end{array}
if x < -2.54999999999999999e69 or 2.8999999999999999e-40 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 79.8%
sub-neg79.8%
distribute-rgt-in79.8%
metadata-eval79.8%
metadata-eval79.8%
neg-mul-179.8%
associate-*r*79.8%
*-commutative79.8%
associate-+r+79.8%
metadata-eval79.8%
metadata-eval79.8%
associate-*r*79.8%
metadata-eval79.8%
*-commutative79.8%
Simplified79.8%
if -2.54999999999999999e69 < x < 2.8999999999999999e-40Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 75.1%
Final simplification77.4%
(FPCore (x y z)
:precision binary64
(if (<= x -1.22e+135)
(* x -3.0)
(if (<= x 1.05e+153)
(* 6.0 (* y (- 0.6666666666666666 z)))
(* 6.0 (* x z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.22e+135) {
tmp = x * -3.0;
} else if (x <= 1.05e+153) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} 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) :: tmp
if (x <= (-1.22d+135)) then
tmp = x * (-3.0d0)
else if (x <= 1.05d+153) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.22e+135) {
tmp = x * -3.0;
} else if (x <= 1.05e+153) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.22e+135: tmp = x * -3.0 elif x <= 1.05e+153: tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.22e+135) tmp = Float64(x * -3.0); elseif (x <= 1.05e+153) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.22e+135) tmp = x * -3.0; elseif (x <= 1.05e+153) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.22e+135], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 1.05e+153], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+135}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+153}:\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if x < -1.21999999999999996e135Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 91.2%
sub-neg91.2%
distribute-rgt-in91.2%
metadata-eval91.2%
metadata-eval91.2%
neg-mul-191.2%
associate-*r*91.2%
*-commutative91.2%
associate-+r+91.2%
metadata-eval91.2%
metadata-eval91.2%
associate-*r*91.2%
metadata-eval91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in z around 0 53.7%
*-commutative53.7%
Simplified53.7%
if -1.21999999999999996e135 < x < 1.05000000000000008e153Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 64.3%
*-commutative64.3%
Simplified64.3%
if 1.05000000000000008e153 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 93.7%
sub-neg93.7%
distribute-rgt-in93.7%
metadata-eval93.7%
metadata-eval93.7%
neg-mul-193.7%
associate-*r*93.7%
*-commutative93.7%
associate-+r+93.7%
metadata-eval93.7%
metadata-eval93.7%
associate-*r*93.7%
metadata-eval93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in z around inf 58.0%
Final simplification62.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.7e+76) (not (<= x 6e-27))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.7e+76) || !(x <= 6e-27)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.7d+76)) .or. (.not. (x <= 6d-27))) then
tmp = x * (-3.0d0)
else
tmp = y * 4.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.7e+76) || !(x <= 6e-27)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.7e+76) or not (x <= 6e-27): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.7e+76) || !(x <= 6e-27)) tmp = Float64(x * -3.0); else tmp = Float64(y * 4.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.7e+76) || ~((x <= 6e-27))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.7e+76], N[Not[LessEqual[x, 6e-27]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+76} \lor \neg \left(x \leq 6 \cdot 10^{-27}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -1.6999999999999999e76 or 6.0000000000000002e-27 < x Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 80.4%
sub-neg80.4%
distribute-rgt-in80.5%
metadata-eval80.5%
metadata-eval80.5%
neg-mul-180.5%
associate-*r*80.5%
*-commutative80.5%
associate-+r+80.5%
metadata-eval80.5%
metadata-eval80.5%
associate-*r*80.5%
metadata-eval80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in z around 0 42.1%
*-commutative42.1%
Simplified42.1%
if -1.6999999999999999e76 < x < 6.0000000000000002e-27Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 46.5%
Taylor expanded in x around 0 38.5%
*-commutative38.5%
Simplified38.5%
Final simplification40.2%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (* (- y x) 6.0))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((0.6666666666666666d0 - z) * ((y - x) * 6.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((y - x) * 6.0))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(y - x) * 6.0))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((y - x) * 6.0)); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(\left(y - x\right) \cdot 6\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(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(y - x) * Float64(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[(y - x), $MachinePrecision] * N[(6.0 * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)
\end{array}
Initial program 99.5%
+-commutative99.5%
associate-*l*99.7%
fma-def99.7%
metadata-eval99.7%
Simplified99.7%
fma-udef99.7%
Applied egg-rr99.7%
Final simplification99.7%
(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.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 51.5%
sub-neg51.5%
distribute-rgt-in51.5%
metadata-eval51.5%
metadata-eval51.5%
neg-mul-151.5%
associate-*r*51.5%
*-commutative51.5%
associate-+r+51.5%
metadata-eval51.5%
metadata-eval51.5%
associate-*r*51.5%
metadata-eval51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in z around 0 25.0%
*-commutative25.0%
Simplified25.0%
Final simplification25.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.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 50.6%
Taylor expanded in x around inf 2.6%
Final simplification2.6%
herbie shell --seed 2024036
(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))))