
(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.3%
+-commutative99.3%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -3.3e+90)
(* z (* y -6.0))
(if (<= z -4.2)
t_0
(if (<= z -7.2e-129)
(* y 4.0)
(if (<= z -3.4e-268)
(* x -3.0)
(if (<= z 3.1e-264)
(* y 4.0)
(if (<= z 3.9e-119)
(* x -3.0)
(if (<= z 0.56) (* y 4.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -3.3e+90) {
tmp = z * (y * -6.0);
} else if (z <= -4.2) {
tmp = t_0;
} else if (z <= -7.2e-129) {
tmp = y * 4.0;
} else if (z <= -3.4e-268) {
tmp = x * -3.0;
} else if (z <= 3.1e-264) {
tmp = y * 4.0;
} else if (z <= 3.9e-119) {
tmp = x * -3.0;
} else if (z <= 0.56) {
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 = x * (z * 6.0d0)
if (z <= (-3.3d+90)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-4.2d0)) then
tmp = t_0
else if (z <= (-7.2d-129)) then
tmp = y * 4.0d0
else if (z <= (-3.4d-268)) then
tmp = x * (-3.0d0)
else if (z <= 3.1d-264) then
tmp = y * 4.0d0
else if (z <= 3.9d-119) then
tmp = x * (-3.0d0)
else if (z <= 0.56d0) 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 = x * (z * 6.0);
double tmp;
if (z <= -3.3e+90) {
tmp = z * (y * -6.0);
} else if (z <= -4.2) {
tmp = t_0;
} else if (z <= -7.2e-129) {
tmp = y * 4.0;
} else if (z <= -3.4e-268) {
tmp = x * -3.0;
} else if (z <= 3.1e-264) {
tmp = y * 4.0;
} else if (z <= 3.9e-119) {
tmp = x * -3.0;
} else if (z <= 0.56) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -3.3e+90: tmp = z * (y * -6.0) elif z <= -4.2: tmp = t_0 elif z <= -7.2e-129: tmp = y * 4.0 elif z <= -3.4e-268: tmp = x * -3.0 elif z <= 3.1e-264: tmp = y * 4.0 elif z <= 3.9e-119: tmp = x * -3.0 elif z <= 0.56: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -3.3e+90) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -4.2) tmp = t_0; elseif (z <= -7.2e-129) tmp = Float64(y * 4.0); elseif (z <= -3.4e-268) tmp = Float64(x * -3.0); elseif (z <= 3.1e-264) tmp = Float64(y * 4.0); elseif (z <= 3.9e-119) tmp = Float64(x * -3.0); elseif (z <= 0.56) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -3.3e+90) tmp = z * (y * -6.0); elseif (z <= -4.2) tmp = t_0; elseif (z <= -7.2e-129) tmp = y * 4.0; elseif (z <= -3.4e-268) tmp = x * -3.0; elseif (z <= 3.1e-264) tmp = y * 4.0; elseif (z <= 3.9e-119) tmp = x * -3.0; elseif (z <= 0.56) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+90], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2], t$95$0, If[LessEqual[z, -7.2e-129], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.4e-268], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.1e-264], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.9e-119], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.56], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+90}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -4.2:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-129}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-268}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-264}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-119}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.56:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.30000000000000008e90Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 66.3%
*-commutative66.3%
*-commutative66.3%
associate-*r*66.4%
*-commutative66.4%
Simplified66.4%
if -3.30000000000000008e90 < z < -4.20000000000000018 or 0.56000000000000005 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 61.4%
+-commutative61.4%
+-commutative61.4%
metadata-eval61.4%
cancel-sign-sub-inv61.4%
*-commutative61.4%
cancel-sign-sub-inv61.4%
distribute-lft-neg-in61.4%
*-commutative61.4%
distribute-lft-neg-in61.4%
metadata-eval61.4%
sub-neg61.4%
distribute-lft-in61.4%
metadata-eval61.4%
neg-mul-161.4%
*-commutative61.4%
associate-*l*61.4%
associate-+r+61.4%
metadata-eval61.4%
*-commutative61.4%
associate-*l*61.4%
metadata-eval61.4%
Simplified61.4%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
Simplified59.8%
if -4.20000000000000018 < z < -7.2e-129 or -3.4e-268 < z < 3.1000000000000002e-264 or 3.8999999999999999e-119 < z < 0.56000000000000005Initial program 98.2%
+-commutative98.2%
associate-*l*99.9%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 66.9%
if -7.2e-129 < z < -3.4e-268 or 3.1000000000000002e-264 < z < 3.8999999999999999e-119Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 77.7%
+-commutative77.7%
+-commutative77.7%
metadata-eval77.7%
cancel-sign-sub-inv77.7%
*-commutative77.7%
cancel-sign-sub-inv77.7%
distribute-lft-neg-in77.7%
*-commutative77.7%
distribute-lft-neg-in77.7%
metadata-eval77.7%
sub-neg77.7%
distribute-lft-in77.7%
metadata-eval77.7%
neg-mul-177.7%
*-commutative77.7%
associate-*l*77.7%
associate-+r+77.7%
metadata-eval77.7%
*-commutative77.7%
associate-*l*77.7%
metadata-eval77.7%
Simplified77.7%
Taylor expanded in z around 0 77.7%
*-commutative77.7%
Simplified77.7%
Final simplification65.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -3.6e+90)
(* y (* z -6.0))
(if (<= z -5.0)
t_0
(if (<= z -3.6e-137)
(* y 4.0)
(if (<= z -5.8e-260)
(* x -3.0)
(if (<= z 1.25e-267)
(* y 4.0)
(if (<= z 1.6e-120)
(* x -3.0)
(if (<= z 0.5) (* y 4.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -3.6e+90) {
tmp = y * (z * -6.0);
} else if (z <= -5.0) {
tmp = t_0;
} else if (z <= -3.6e-137) {
tmp = y * 4.0;
} else if (z <= -5.8e-260) {
tmp = x * -3.0;
} else if (z <= 1.25e-267) {
tmp = y * 4.0;
} else if (z <= 1.6e-120) {
tmp = x * -3.0;
} else if (z <= 0.5) {
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 = x * (z * 6.0d0)
if (z <= (-3.6d+90)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-5.0d0)) then
tmp = t_0
else if (z <= (-3.6d-137)) then
tmp = y * 4.0d0
else if (z <= (-5.8d-260)) then
tmp = x * (-3.0d0)
else if (z <= 1.25d-267) then
tmp = y * 4.0d0
else if (z <= 1.6d-120) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) 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 = x * (z * 6.0);
double tmp;
if (z <= -3.6e+90) {
tmp = y * (z * -6.0);
} else if (z <= -5.0) {
tmp = t_0;
} else if (z <= -3.6e-137) {
tmp = y * 4.0;
} else if (z <= -5.8e-260) {
tmp = x * -3.0;
} else if (z <= 1.25e-267) {
tmp = y * 4.0;
} else if (z <= 1.6e-120) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -3.6e+90: tmp = y * (z * -6.0) elif z <= -5.0: tmp = t_0 elif z <= -3.6e-137: tmp = y * 4.0 elif z <= -5.8e-260: tmp = x * -3.0 elif z <= 1.25e-267: tmp = y * 4.0 elif z <= 1.6e-120: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -3.6e+90) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -5.0) tmp = t_0; elseif (z <= -3.6e-137) tmp = Float64(y * 4.0); elseif (z <= -5.8e-260) tmp = Float64(x * -3.0); elseif (z <= 1.25e-267) tmp = Float64(y * 4.0); elseif (z <= 1.6e-120) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -3.6e+90) tmp = y * (z * -6.0); elseif (z <= -5.0) tmp = t_0; elseif (z <= -3.6e-137) tmp = y * 4.0; elseif (z <= -5.8e-260) tmp = x * -3.0; elseif (z <= 1.25e-267) tmp = y * 4.0; elseif (z <= 1.6e-120) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+90], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.0], t$95$0, If[LessEqual[z, -3.6e-137], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -5.8e-260], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.25e-267], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.6e-120], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+90}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-137}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-260}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-267}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-120}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.6e90Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 66.4%
Taylor expanded in z around inf 66.4%
if -3.6e90 < z < -5 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 61.4%
+-commutative61.4%
+-commutative61.4%
metadata-eval61.4%
cancel-sign-sub-inv61.4%
*-commutative61.4%
cancel-sign-sub-inv61.4%
distribute-lft-neg-in61.4%
*-commutative61.4%
distribute-lft-neg-in61.4%
metadata-eval61.4%
sub-neg61.4%
distribute-lft-in61.4%
metadata-eval61.4%
neg-mul-161.4%
*-commutative61.4%
associate-*l*61.4%
associate-+r+61.4%
metadata-eval61.4%
*-commutative61.4%
associate-*l*61.4%
metadata-eval61.4%
Simplified61.4%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
Simplified59.8%
if -5 < z < -3.60000000000000006e-137 or -5.7999999999999999e-260 < z < 1.25e-267 or 1.6e-120 < z < 0.5Initial program 98.2%
+-commutative98.2%
associate-*l*99.9%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 66.9%
if -3.60000000000000006e-137 < z < -5.7999999999999999e-260 or 1.25e-267 < z < 1.6e-120Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 77.7%
+-commutative77.7%
+-commutative77.7%
metadata-eval77.7%
cancel-sign-sub-inv77.7%
*-commutative77.7%
cancel-sign-sub-inv77.7%
distribute-lft-neg-in77.7%
*-commutative77.7%
distribute-lft-neg-in77.7%
metadata-eval77.7%
sub-neg77.7%
distribute-lft-in77.7%
metadata-eval77.7%
neg-mul-177.7%
*-commutative77.7%
associate-*l*77.7%
associate-+r+77.7%
metadata-eval77.7%
*-commutative77.7%
associate-*l*77.7%
metadata-eval77.7%
Simplified77.7%
Taylor expanded in z around 0 77.7%
*-commutative77.7%
Simplified77.7%
Final simplification65.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -3.5e+90)
(* -6.0 (* y z))
(if (<= z -0.39)
t_0
(if (<= z -5e-137)
(* y 4.0)
(if (<= z -9.2e-261)
(* x -3.0)
(if (<= z 3e-266)
(* y 4.0)
(if (<= z 1.15e-115)
(* x -3.0)
(if (<= z 0.65) (* y 4.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -3.5e+90) {
tmp = -6.0 * (y * z);
} else if (z <= -0.39) {
tmp = t_0;
} else if (z <= -5e-137) {
tmp = y * 4.0;
} else if (z <= -9.2e-261) {
tmp = x * -3.0;
} else if (z <= 3e-266) {
tmp = y * 4.0;
} else if (z <= 1.15e-115) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (z * 6.0d0)
if (z <= (-3.5d+90)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-0.39d0)) then
tmp = t_0
else if (z <= (-5d-137)) then
tmp = y * 4.0d0
else if (z <= (-9.2d-261)) then
tmp = x * (-3.0d0)
else if (z <= 3d-266) then
tmp = y * 4.0d0
else if (z <= 1.15d-115) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -3.5e+90) {
tmp = -6.0 * (y * z);
} else if (z <= -0.39) {
tmp = t_0;
} else if (z <= -5e-137) {
tmp = y * 4.0;
} else if (z <= -9.2e-261) {
tmp = x * -3.0;
} else if (z <= 3e-266) {
tmp = y * 4.0;
} else if (z <= 1.15e-115) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -3.5e+90: tmp = -6.0 * (y * z) elif z <= -0.39: tmp = t_0 elif z <= -5e-137: tmp = y * 4.0 elif z <= -9.2e-261: tmp = x * -3.0 elif z <= 3e-266: tmp = y * 4.0 elif z <= 1.15e-115: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -3.5e+90) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -0.39) tmp = t_0; elseif (z <= -5e-137) tmp = Float64(y * 4.0); elseif (z <= -9.2e-261) tmp = Float64(x * -3.0); elseif (z <= 3e-266) tmp = Float64(y * 4.0); elseif (z <= 1.15e-115) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -3.5e+90) tmp = -6.0 * (y * z); elseif (z <= -0.39) tmp = t_0; elseif (z <= -5e-137) tmp = y * 4.0; elseif (z <= -9.2e-261) tmp = x * -3.0; elseif (z <= 3e-266) tmp = y * 4.0; elseif (z <= 1.15e-115) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+90], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.39], t$95$0, If[LessEqual[z, -5e-137], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -9.2e-261], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3e-266], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.15e-115], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -0.39:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-137}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-261}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-266}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-115}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.4999999999999998e90Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 66.4%
Taylor expanded in z around inf 66.3%
if -3.4999999999999998e90 < z < -0.39000000000000001 or 0.650000000000000022 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 61.4%
+-commutative61.4%
+-commutative61.4%
metadata-eval61.4%
cancel-sign-sub-inv61.4%
*-commutative61.4%
cancel-sign-sub-inv61.4%
distribute-lft-neg-in61.4%
*-commutative61.4%
distribute-lft-neg-in61.4%
metadata-eval61.4%
sub-neg61.4%
distribute-lft-in61.4%
metadata-eval61.4%
neg-mul-161.4%
*-commutative61.4%
associate-*l*61.4%
associate-+r+61.4%
metadata-eval61.4%
*-commutative61.4%
associate-*l*61.4%
metadata-eval61.4%
Simplified61.4%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
Simplified59.8%
if -0.39000000000000001 < z < -5.00000000000000001e-137 or -9.2e-261 < z < 3e-266 or 1.14999999999999992e-115 < z < 0.650000000000000022Initial program 98.2%
+-commutative98.2%
associate-*l*99.9%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 66.9%
if -5.00000000000000001e-137 < z < -9.2e-261 or 3e-266 < z < 1.14999999999999992e-115Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 77.7%
+-commutative77.7%
+-commutative77.7%
metadata-eval77.7%
cancel-sign-sub-inv77.7%
*-commutative77.7%
cancel-sign-sub-inv77.7%
distribute-lft-neg-in77.7%
*-commutative77.7%
distribute-lft-neg-in77.7%
metadata-eval77.7%
sub-neg77.7%
distribute-lft-in77.7%
metadata-eval77.7%
neg-mul-177.7%
*-commutative77.7%
associate-*l*77.7%
associate-+r+77.7%
metadata-eval77.7%
*-commutative77.7%
associate-*l*77.7%
metadata-eval77.7%
Simplified77.7%
Taylor expanded in z around 0 77.7%
*-commutative77.7%
Simplified77.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))))
(if (<= z -3.6e+90)
(* -6.0 (* y z))
(if (<= z -5.8)
t_0
(if (<= z -4e-127)
(* y 4.0)
(if (<= z -1e-258)
(* x -3.0)
(if (<= z 7.8e-267)
(* y 4.0)
(if (<= z 9.5e-118)
(* x -3.0)
(if (<= z 0.65) (* y 4.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -3.6e+90) {
tmp = -6.0 * (y * z);
} else if (z <= -5.8) {
tmp = t_0;
} else if (z <= -4e-127) {
tmp = y * 4.0;
} else if (z <= -1e-258) {
tmp = x * -3.0;
} else if (z <= 7.8e-267) {
tmp = y * 4.0;
} else if (z <= 9.5e-118) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (x * z)
if (z <= (-3.6d+90)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-5.8d0)) then
tmp = t_0
else if (z <= (-4d-127)) then
tmp = y * 4.0d0
else if (z <= (-1d-258)) then
tmp = x * (-3.0d0)
else if (z <= 7.8d-267) then
tmp = y * 4.0d0
else if (z <= 9.5d-118) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -3.6e+90) {
tmp = -6.0 * (y * z);
} else if (z <= -5.8) {
tmp = t_0;
} else if (z <= -4e-127) {
tmp = y * 4.0;
} else if (z <= -1e-258) {
tmp = x * -3.0;
} else if (z <= 7.8e-267) {
tmp = y * 4.0;
} else if (z <= 9.5e-118) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) tmp = 0 if z <= -3.6e+90: tmp = -6.0 * (y * z) elif z <= -5.8: tmp = t_0 elif z <= -4e-127: tmp = y * 4.0 elif z <= -1e-258: tmp = x * -3.0 elif z <= 7.8e-267: tmp = y * 4.0 elif z <= 9.5e-118: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -3.6e+90) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -5.8) tmp = t_0; elseif (z <= -4e-127) tmp = Float64(y * 4.0); elseif (z <= -1e-258) tmp = Float64(x * -3.0); elseif (z <= 7.8e-267) tmp = Float64(y * 4.0); elseif (z <= 9.5e-118) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); tmp = 0.0; if (z <= -3.6e+90) tmp = -6.0 * (y * z); elseif (z <= -5.8) tmp = t_0; elseif (z <= -4e-127) tmp = y * 4.0; elseif (z <= -1e-258) tmp = x * -3.0; elseif (z <= 7.8e-267) tmp = y * 4.0; elseif (z <= 9.5e-118) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+90], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8], t$95$0, If[LessEqual[z, -4e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1e-258], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7.8e-267], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 9.5e-118], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+90}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -5.8:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-127}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-258}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-267}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-118}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.6e90Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 66.4%
Taylor expanded in z around inf 66.3%
if -3.6e90 < z < -5.79999999999999982 or 0.650000000000000022 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in y around 0 58.8%
*-commutative58.8%
Simplified58.8%
if -5.79999999999999982 < z < -4.0000000000000001e-127 or -9.99999999999999954e-259 < z < 7.79999999999999954e-267 or 9.49999999999999931e-118 < z < 0.650000000000000022Initial program 98.2%
+-commutative98.2%
associate-*l*99.9%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 66.9%
if -4.0000000000000001e-127 < z < -9.99999999999999954e-259 or 7.79999999999999954e-267 < z < 9.49999999999999931e-118Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 77.7%
+-commutative77.7%
+-commutative77.7%
metadata-eval77.7%
cancel-sign-sub-inv77.7%
*-commutative77.7%
cancel-sign-sub-inv77.7%
distribute-lft-neg-in77.7%
*-commutative77.7%
distribute-lft-neg-in77.7%
metadata-eval77.7%
sub-neg77.7%
distribute-lft-in77.7%
metadata-eval77.7%
neg-mul-177.7%
*-commutative77.7%
associate-*l*77.7%
associate-+r+77.7%
metadata-eval77.7%
*-commutative77.7%
associate-*l*77.7%
metadata-eval77.7%
Simplified77.7%
Taylor expanded in z around 0 77.7%
*-commutative77.7%
Simplified77.7%
Final simplification65.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (+ 4.0 (* z -6.0)))) (t_1 (* (- y x) (* z -6.0))))
(if (<= z -470.0)
t_1
(if (<= z -6.5e-129)
t_0
(if (<= z -2.1e-267)
(* x (+ -3.0 (* z 6.0)))
(if (<= z 4.8e-264)
t_0
(if (<= z 4.3e-120) (* x -3.0) (if (<= z 27500.0) t_0 t_1))))))))
double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = (y - x) * (z * -6.0);
double tmp;
if (z <= -470.0) {
tmp = t_1;
} else if (z <= -6.5e-129) {
tmp = t_0;
} else if (z <= -2.1e-267) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 4.8e-264) {
tmp = t_0;
} else if (z <= 4.3e-120) {
tmp = x * -3.0;
} else if (z <= 27500.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * (4.0d0 + (z * (-6.0d0)))
t_1 = (y - x) * (z * (-6.0d0))
if (z <= (-470.0d0)) then
tmp = t_1
else if (z <= (-6.5d-129)) then
tmp = t_0
else if (z <= (-2.1d-267)) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else if (z <= 4.8d-264) then
tmp = t_0
else if (z <= 4.3d-120) then
tmp = x * (-3.0d0)
else if (z <= 27500.0d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = (y - x) * (z * -6.0);
double tmp;
if (z <= -470.0) {
tmp = t_1;
} else if (z <= -6.5e-129) {
tmp = t_0;
} else if (z <= -2.1e-267) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 4.8e-264) {
tmp = t_0;
} else if (z <= 4.3e-120) {
tmp = x * -3.0;
} else if (z <= 27500.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y * (4.0 + (z * -6.0)) t_1 = (y - x) * (z * -6.0) tmp = 0 if z <= -470.0: tmp = t_1 elif z <= -6.5e-129: tmp = t_0 elif z <= -2.1e-267: tmp = x * (-3.0 + (z * 6.0)) elif z <= 4.8e-264: tmp = t_0 elif z <= 4.3e-120: tmp = x * -3.0 elif z <= 27500.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(4.0 + Float64(z * -6.0))) t_1 = Float64(Float64(y - x) * Float64(z * -6.0)) tmp = 0.0 if (z <= -470.0) tmp = t_1; elseif (z <= -6.5e-129) tmp = t_0; elseif (z <= -2.1e-267) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); elseif (z <= 4.8e-264) tmp = t_0; elseif (z <= 4.3e-120) tmp = Float64(x * -3.0); elseif (z <= 27500.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (4.0 + (z * -6.0)); t_1 = (y - x) * (z * -6.0); tmp = 0.0; if (z <= -470.0) tmp = t_1; elseif (z <= -6.5e-129) tmp = t_0; elseif (z <= -2.1e-267) tmp = x * (-3.0 + (z * 6.0)); elseif (z <= 4.8e-264) tmp = t_0; elseif (z <= 4.3e-120) tmp = x * -3.0; elseif (z <= 27500.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -470.0], t$95$1, If[LessEqual[z, -6.5e-129], t$95$0, If[LessEqual[z, -2.1e-267], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-264], t$95$0, If[LessEqual[z, 4.3e-120], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 27500.0], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(4 + z \cdot -6\right)\\
t_1 := \left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -470:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-129}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-267}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-264}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-120}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 27500:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -470 or 27500 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in z around 0 98.6%
associate-*r*98.7%
*-commutative98.7%
Simplified98.7%
if -470 < z < -6.49999999999999952e-129 or -2.1000000000000001e-267 < z < 4.7999999999999997e-264 or 4.29999999999999982e-120 < z < 27500Initial program 98.3%
+-commutative98.3%
associate-*l*99.8%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.7%
if -6.49999999999999952e-129 < z < -2.1000000000000001e-267Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 79.3%
+-commutative79.3%
+-commutative79.3%
metadata-eval79.3%
cancel-sign-sub-inv79.3%
*-commutative79.3%
cancel-sign-sub-inv79.3%
distribute-lft-neg-in79.3%
*-commutative79.3%
distribute-lft-neg-in79.3%
metadata-eval79.3%
sub-neg79.3%
distribute-lft-in79.3%
metadata-eval79.3%
neg-mul-179.3%
*-commutative79.3%
associate-*l*79.3%
associate-+r+79.3%
metadata-eval79.3%
*-commutative79.3%
associate-*l*79.3%
metadata-eval79.3%
Simplified79.3%
if 4.7999999999999997e-264 < z < 4.29999999999999982e-120Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 75.9%
+-commutative75.9%
+-commutative75.9%
metadata-eval75.9%
cancel-sign-sub-inv75.9%
*-commutative75.9%
cancel-sign-sub-inv75.9%
distribute-lft-neg-in75.9%
*-commutative75.9%
distribute-lft-neg-in75.9%
metadata-eval75.9%
sub-neg75.9%
distribute-lft-in75.9%
metadata-eval75.9%
neg-mul-175.9%
*-commutative75.9%
associate-*l*75.9%
associate-+r+75.9%
metadata-eval75.9%
*-commutative75.9%
associate-*l*75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in z around 0 75.9%
*-commutative75.9%
Simplified75.9%
Final simplification87.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (+ 4.0 (* z -6.0)))) (t_1 (* z (* (- y x) -6.0))))
(if (<= z -470.0)
t_1
(if (<= z -1.8e-137)
t_0
(if (<= z -3.3e-255)
(* x (+ -3.0 (* z 6.0)))
(if (<= z 4.2e-264)
t_0
(if (<= z 6.2e-115) (* x -3.0) (if (<= z 170000.0) t_0 t_1))))))))
double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = z * ((y - x) * -6.0);
double tmp;
if (z <= -470.0) {
tmp = t_1;
} else if (z <= -1.8e-137) {
tmp = t_0;
} else if (z <= -3.3e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 4.2e-264) {
tmp = t_0;
} else if (z <= 6.2e-115) {
tmp = x * -3.0;
} else if (z <= 170000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * (4.0d0 + (z * (-6.0d0)))
t_1 = z * ((y - x) * (-6.0d0))
if (z <= (-470.0d0)) then
tmp = t_1
else if (z <= (-1.8d-137)) then
tmp = t_0
else if (z <= (-3.3d-255)) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else if (z <= 4.2d-264) then
tmp = t_0
else if (z <= 6.2d-115) then
tmp = x * (-3.0d0)
else if (z <= 170000.0d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = z * ((y - x) * -6.0);
double tmp;
if (z <= -470.0) {
tmp = t_1;
} else if (z <= -1.8e-137) {
tmp = t_0;
} else if (z <= -3.3e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 4.2e-264) {
tmp = t_0;
} else if (z <= 6.2e-115) {
tmp = x * -3.0;
} else if (z <= 170000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y * (4.0 + (z * -6.0)) t_1 = z * ((y - x) * -6.0) tmp = 0 if z <= -470.0: tmp = t_1 elif z <= -1.8e-137: tmp = t_0 elif z <= -3.3e-255: tmp = x * (-3.0 + (z * 6.0)) elif z <= 4.2e-264: tmp = t_0 elif z <= 6.2e-115: tmp = x * -3.0 elif z <= 170000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(4.0 + Float64(z * -6.0))) t_1 = Float64(z * Float64(Float64(y - x) * -6.0)) tmp = 0.0 if (z <= -470.0) tmp = t_1; elseif (z <= -1.8e-137) tmp = t_0; elseif (z <= -3.3e-255) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); elseif (z <= 4.2e-264) tmp = t_0; elseif (z <= 6.2e-115) tmp = Float64(x * -3.0); elseif (z <= 170000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (4.0 + (z * -6.0)); t_1 = z * ((y - x) * -6.0); tmp = 0.0; if (z <= -470.0) tmp = t_1; elseif (z <= -1.8e-137) tmp = t_0; elseif (z <= -3.3e-255) tmp = x * (-3.0 + (z * 6.0)); elseif (z <= 4.2e-264) tmp = t_0; elseif (z <= 6.2e-115) tmp = x * -3.0; elseif (z <= 170000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -470.0], t$95$1, If[LessEqual[z, -1.8e-137], t$95$0, If[LessEqual[z, -3.3e-255], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-264], t$95$0, If[LessEqual[z, 6.2e-115], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 170000.0], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(4 + z \cdot -6\right)\\
t_1 := z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{if}\;z \leq -470:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-137}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-255}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-264}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-115}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 170000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -470 or 1.7e5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
Simplified98.6%
if -470 < z < -1.80000000000000003e-137 or -3.29999999999999988e-255 < z < 4.2000000000000004e-264 or 6.20000000000000013e-115 < z < 1.7e5Initial program 98.3%
+-commutative98.3%
associate-*l*99.8%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.7%
if -1.80000000000000003e-137 < z < -3.29999999999999988e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 79.3%
+-commutative79.3%
+-commutative79.3%
metadata-eval79.3%
cancel-sign-sub-inv79.3%
*-commutative79.3%
cancel-sign-sub-inv79.3%
distribute-lft-neg-in79.3%
*-commutative79.3%
distribute-lft-neg-in79.3%
metadata-eval79.3%
sub-neg79.3%
distribute-lft-in79.3%
metadata-eval79.3%
neg-mul-179.3%
*-commutative79.3%
associate-*l*79.3%
associate-+r+79.3%
metadata-eval79.3%
*-commutative79.3%
associate-*l*79.3%
metadata-eval79.3%
Simplified79.3%
if 4.2000000000000004e-264 < z < 6.20000000000000013e-115Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 75.9%
+-commutative75.9%
+-commutative75.9%
metadata-eval75.9%
cancel-sign-sub-inv75.9%
*-commutative75.9%
cancel-sign-sub-inv75.9%
distribute-lft-neg-in75.9%
*-commutative75.9%
distribute-lft-neg-in75.9%
metadata-eval75.9%
sub-neg75.9%
distribute-lft-in75.9%
metadata-eval75.9%
neg-mul-175.9%
*-commutative75.9%
associate-*l*75.9%
associate-+r+75.9%
metadata-eval75.9%
*-commutative75.9%
associate-*l*75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in z around 0 75.9%
*-commutative75.9%
Simplified75.9%
Final simplification87.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.65)
t_0
(if (<= z -1.75e-128)
(* y 4.0)
(if (<= z -2.8e-261)
(* x -3.0)
(if (<= z 5.8e-265)
(* y 4.0)
(if (<= z 2.15e-122)
(* x -3.0)
(if (<= z 7e-7) (* 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.75e-128) {
tmp = y * 4.0;
} else if (z <= -2.8e-261) {
tmp = x * -3.0;
} else if (z <= 5.8e-265) {
tmp = y * 4.0;
} else if (z <= 2.15e-122) {
tmp = x * -3.0;
} else if (z <= 7e-7) {
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.75d-128)) then
tmp = y * 4.0d0
else if (z <= (-2.8d-261)) then
tmp = x * (-3.0d0)
else if (z <= 5.8d-265) then
tmp = y * 4.0d0
else if (z <= 2.15d-122) then
tmp = x * (-3.0d0)
else if (z <= 7d-7) 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.75e-128) {
tmp = y * 4.0;
} else if (z <= -2.8e-261) {
tmp = x * -3.0;
} else if (z <= 5.8e-265) {
tmp = y * 4.0;
} else if (z <= 2.15e-122) {
tmp = x * -3.0;
} else if (z <= 7e-7) {
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.75e-128: tmp = y * 4.0 elif z <= -2.8e-261: tmp = x * -3.0 elif z <= 5.8e-265: tmp = y * 4.0 elif z <= 2.15e-122: tmp = x * -3.0 elif z <= 7e-7: 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.75e-128) tmp = Float64(y * 4.0); elseif (z <= -2.8e-261) tmp = Float64(x * -3.0); elseif (z <= 5.8e-265) tmp = Float64(y * 4.0); elseif (z <= 2.15e-122) tmp = Float64(x * -3.0); elseif (z <= 7e-7) 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.75e-128) tmp = y * 4.0; elseif (z <= -2.8e-261) tmp = x * -3.0; elseif (z <= 5.8e-265) tmp = y * 4.0; elseif (z <= 2.15e-122) tmp = x * -3.0; elseif (z <= 7e-7) 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.75e-128], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -2.8e-261], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.8e-265], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.15e-122], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 7e-7], 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.75 \cdot 10^{-128}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-261}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-265}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-122}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-7}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.650000000000000022 or 6.99999999999999968e-7 < z Initial program 99.2%
+-commutative99.2%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 51.2%
Taylor expanded in z around inf 50.6%
if -0.650000000000000022 < z < -1.75e-128 or -2.80000000000000009e-261 < z < 5.7999999999999995e-265 or 2.15000000000000009e-122 < z < 6.99999999999999968e-7Initial program 99.4%
+-commutative99.4%
associate-*l*99.9%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 69.2%
Taylor expanded in z around 0 68.9%
if -1.75e-128 < z < -2.80000000000000009e-261 or 5.7999999999999995e-265 < z < 2.15000000000000009e-122Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 77.7%
+-commutative77.7%
+-commutative77.7%
metadata-eval77.7%
cancel-sign-sub-inv77.7%
*-commutative77.7%
cancel-sign-sub-inv77.7%
distribute-lft-neg-in77.7%
*-commutative77.7%
distribute-lft-neg-in77.7%
metadata-eval77.7%
sub-neg77.7%
distribute-lft-in77.7%
metadata-eval77.7%
neg-mul-177.7%
*-commutative77.7%
associate-*l*77.7%
associate-+r+77.7%
metadata-eval77.7%
*-commutative77.7%
associate-*l*77.7%
metadata-eval77.7%
Simplified77.7%
Taylor expanded in z around 0 77.7%
*-commutative77.7%
Simplified77.7%
(FPCore (x y z)
:precision binary64
(if (or (<= y -7e+44)
(not (or (<= y 4.8e-58) (and (not (<= y 4.2e+107)) (<= y 9.2e+128)))))
(* y (+ 4.0 (* z -6.0)))
(* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -7e+44) || !((y <= 4.8e-58) || (!(y <= 4.2e+107) && (y <= 9.2e+128)))) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-7d+44)) .or. (.not. (y <= 4.8d-58) .or. (.not. (y <= 4.2d+107)) .and. (y <= 9.2d+128))) then
tmp = y * (4.0d0 + (z * (-6.0d0)))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -7e+44) || !((y <= 4.8e-58) || (!(y <= 4.2e+107) && (y <= 9.2e+128)))) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -7e+44) or not ((y <= 4.8e-58) or (not (y <= 4.2e+107) and (y <= 9.2e+128))): tmp = y * (4.0 + (z * -6.0)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -7e+44) || !((y <= 4.8e-58) || (!(y <= 4.2e+107) && (y <= 9.2e+128)))) tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -7e+44) || ~(((y <= 4.8e-58) || (~((y <= 4.2e+107)) && (y <= 9.2e+128))))) tmp = y * (4.0 + (z * -6.0)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -7e+44], N[Not[Or[LessEqual[y, 4.8e-58], And[N[Not[LessEqual[y, 4.2e+107]], $MachinePrecision], LessEqual[y, 9.2e+128]]]], $MachinePrecision]], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+44} \lor \neg \left(y \leq 4.8 \cdot 10^{-58} \lor \neg \left(y \leq 4.2 \cdot 10^{+107}\right) \land y \leq 9.2 \cdot 10^{+128}\right):\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -6.9999999999999998e44 or 4.8000000000000001e-58 < y < 4.1999999999999999e107 or 9.19999999999999992e128 < y Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-define99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 84.3%
if -6.9999999999999998e44 < y < 4.8000000000000001e-58 or 4.1999999999999999e107 < y < 9.19999999999999992e128Initial program 99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in x around inf 77.1%
+-commutative77.1%
+-commutative77.1%
metadata-eval77.1%
cancel-sign-sub-inv77.1%
*-commutative77.1%
cancel-sign-sub-inv77.1%
distribute-lft-neg-in77.1%
*-commutative77.1%
distribute-lft-neg-in77.1%
metadata-eval77.1%
sub-neg77.1%
distribute-lft-in77.1%
metadata-eval77.1%
neg-mul-177.1%
*-commutative77.1%
associate-*l*77.1%
associate-+r+77.1%
metadata-eval77.1%
*-commutative77.1%
associate-*l*77.1%
metadata-eval77.1%
Simplified77.1%
Final simplification80.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* y -6.0))) (t_1 (* x (+ -3.0 (* z 6.0)))))
(if (<= x -1.4e-59)
t_1
(if (<= x -2.6e-304)
t_0
(if (<= x 1.65e-235) (* y 4.0) (if (<= x 8e-122) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = z * (y * -6.0);
double t_1 = x * (-3.0 + (z * 6.0));
double tmp;
if (x <= -1.4e-59) {
tmp = t_1;
} else if (x <= -2.6e-304) {
tmp = t_0;
} else if (x <= 1.65e-235) {
tmp = y * 4.0;
} else if (x <= 8e-122) {
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 = z * (y * (-6.0d0))
t_1 = x * ((-3.0d0) + (z * 6.0d0))
if (x <= (-1.4d-59)) then
tmp = t_1
else if (x <= (-2.6d-304)) then
tmp = t_0
else if (x <= 1.65d-235) then
tmp = y * 4.0d0
else if (x <= 8d-122) 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 = z * (y * -6.0);
double t_1 = x * (-3.0 + (z * 6.0));
double tmp;
if (x <= -1.4e-59) {
tmp = t_1;
} else if (x <= -2.6e-304) {
tmp = t_0;
} else if (x <= 1.65e-235) {
tmp = y * 4.0;
} else if (x <= 8e-122) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = z * (y * -6.0) t_1 = x * (-3.0 + (z * 6.0)) tmp = 0 if x <= -1.4e-59: tmp = t_1 elif x <= -2.6e-304: tmp = t_0 elif x <= 1.65e-235: tmp = y * 4.0 elif x <= 8e-122: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(y * -6.0)) t_1 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) tmp = 0.0 if (x <= -1.4e-59) tmp = t_1; elseif (x <= -2.6e-304) tmp = t_0; elseif (x <= 1.65e-235) tmp = Float64(y * 4.0); elseif (x <= 8e-122) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (y * -6.0); t_1 = x * (-3.0 + (z * 6.0)); tmp = 0.0; if (x <= -1.4e-59) tmp = t_1; elseif (x <= -2.6e-304) tmp = t_0; elseif (x <= 1.65e-235) tmp = y * 4.0; elseif (x <= 8e-122) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e-59], t$95$1, If[LessEqual[x, -2.6e-304], t$95$0, If[LessEqual[x, 1.65e-235], N[(y * 4.0), $MachinePrecision], If[LessEqual[x, 8e-122], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(y \cdot -6\right)\\
t_1 := x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-304}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-235}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-122}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.3999999999999999e-59 or 8.00000000000000047e-122 < x Initial program 99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around inf 70.7%
+-commutative70.7%
+-commutative70.7%
metadata-eval70.7%
cancel-sign-sub-inv70.7%
*-commutative70.7%
cancel-sign-sub-inv70.7%
distribute-lft-neg-in70.7%
*-commutative70.7%
distribute-lft-neg-in70.7%
metadata-eval70.7%
sub-neg70.7%
distribute-lft-in70.7%
metadata-eval70.7%
neg-mul-170.7%
*-commutative70.7%
associate-*l*70.7%
associate-+r+70.7%
metadata-eval70.7%
*-commutative70.7%
associate-*l*70.7%
metadata-eval70.7%
Simplified70.7%
if -1.3999999999999999e-59 < x < -2.59999999999999997e-304 or 1.65000000000000014e-235 < x < 8.00000000000000047e-122Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 92.4%
Taylor expanded in z around inf 65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in y around inf 57.5%
*-commutative57.5%
*-commutative57.5%
associate-*r*57.6%
*-commutative57.6%
Simplified57.6%
if -2.59999999999999997e-304 < x < 1.65000000000000014e-235Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-define100.0%
sub-neg100.0%
distribute-rgt-in100.0%
metadata-eval100.0%
metadata-eval100.0%
distribute-lft-neg-out100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
Taylor expanded in z around 0 73.7%
Final simplification67.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.5))) (* (- y x) (* z -6.0)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.5)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.58d0)) .or. (.not. (z <= 0.5d0))) then
tmp = (y - x) * (z * (-6.0d0))
else
tmp = x + ((y - x) * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.5)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.5): tmp = (y - x) * (z * -6.0) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.5)) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); else tmp = Float64(x + Float64(Float64(y - x) * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.5))) tmp = (y - x) * (z * -6.0); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.5]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.5\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in z around inf 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in z around 0 98.1%
associate-*r*98.2%
*-commutative98.2%
Simplified98.2%
if -0.57999999999999996 < z < 0.5Initial program 98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in z around 0 98.3%
Final simplification98.3%
(FPCore (x y z) :precision binary64 (+ x (+ (* -6.0 (* (- y x) z)) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.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 + (((-6.0d0) * ((y - x) * z)) + ((y - x) * 4.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0));
}
def code(x, y, z): return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0))
function code(x, y, z) return Float64(x + Float64(Float64(-6.0 * Float64(Float64(y - x) * z)) + Float64(Float64(y - x) * 4.0))) end
function tmp = code(x, y, z) tmp = x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0)); end
code[x_, y_, z_] := N[(x + N[(N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-6 \cdot \left(\left(y - x\right) \cdot z\right) + \left(y - x\right) \cdot 4\right)
\end{array}
Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.4%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= y -5.9e-120) (not (<= y 1.1e-57))) (* y 4.0) (* x -3.0)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -5.9e-120) || !(y <= 1.1e-57)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-5.9d-120)) .or. (.not. (y <= 1.1d-57))) then
tmp = y * 4.0d0
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -5.9e-120) || !(y <= 1.1e-57)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -5.9e-120) or not (y <= 1.1e-57): tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -5.9e-120) || !(y <= 1.1e-57)) tmp = Float64(y * 4.0); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -5.9e-120) || ~((y <= 1.1e-57))) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -5.9e-120], N[Not[LessEqual[y, 1.1e-57]], $MachinePrecision]], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.9 \cdot 10^{-120} \lor \neg \left(y \leq 1.1 \cdot 10^{-57}\right):\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if y < -5.89999999999999979e-120 or 1.09999999999999999e-57 < y Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 73.1%
Taylor expanded in z around 0 33.2%
if -5.89999999999999979e-120 < y < 1.09999999999999999e-57Initial program 98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in x around inf 83.5%
+-commutative83.5%
+-commutative83.5%
metadata-eval83.5%
cancel-sign-sub-inv83.5%
*-commutative83.5%
cancel-sign-sub-inv83.5%
distribute-lft-neg-in83.5%
*-commutative83.5%
distribute-lft-neg-in83.5%
metadata-eval83.5%
sub-neg83.5%
distribute-lft-in83.6%
metadata-eval83.6%
neg-mul-183.6%
*-commutative83.6%
associate-*l*83.6%
associate-+r+83.6%
metadata-eval83.6%
*-commutative83.6%
associate-*l*83.6%
metadata-eval83.6%
Simplified83.6%
Taylor expanded in z around 0 34.1%
*-commutative34.1%
Simplified34.1%
Final simplification33.6%
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
(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.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 52.2%
+-commutative52.2%
+-commutative52.2%
metadata-eval52.2%
cancel-sign-sub-inv52.2%
*-commutative52.2%
cancel-sign-sub-inv52.2%
distribute-lft-neg-in52.2%
*-commutative52.2%
distribute-lft-neg-in52.2%
metadata-eval52.2%
sub-neg52.2%
distribute-lft-in52.2%
metadata-eval52.2%
neg-mul-152.2%
*-commutative52.2%
associate-*l*52.2%
associate-+r+52.2%
metadata-eval52.2%
*-commutative52.2%
associate-*l*52.2%
metadata-eval52.2%
Simplified52.2%
Taylor expanded in z around 0 22.3%
*-commutative22.3%
Simplified22.3%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around inf 57.4%
Taylor expanded in z around 0 2.9%
herbie shell --seed 2024085
(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))))