
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (+ (* 4.0 (- y x)) (+ x (* z (* 6.0 (- x y))))))
double code(double x, double y, double z) {
return (4.0 * (y - x)) + (x + (z * (6.0 * (x - y))));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (4.0d0 * (y - x)) + (x + (z * (6.0d0 * (x - y))))
end function
public static double code(double x, double y, double z) {
return (4.0 * (y - x)) + (x + (z * (6.0 * (x - y))));
}
def code(x, y, z): return (4.0 * (y - x)) + (x + (z * (6.0 * (x - y))))
function code(x, y, z) return Float64(Float64(4.0 * Float64(y - x)) + Float64(x + Float64(z * Float64(6.0 * Float64(x - y))))) end
function tmp = code(x, y, z) tmp = (4.0 * (y - x)) + (x + (z * (6.0 * (x - y)))); end
code[x_, y_, z_] := N[(N[(4.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] + N[(x + N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
4 \cdot \left(y - x\right) + \left(x + z \cdot \left(6 \cdot \left(x - y\right)\right)\right)
\end{array}
Initial program 99.6%
Taylor expanded in z around 0 99.8%
Taylor expanded in y around 0 98.2%
associate-*r*98.2%
*-commutative98.2%
metadata-eval98.2%
distribute-lft-neg-in98.2%
associate-*l*98.3%
*-commutative98.3%
associate-*r*97.9%
distribute-rgt-neg-in97.9%
neg-mul-197.9%
distribute-lft-in99.8%
neg-mul-199.8%
sub-neg99.8%
associate-*l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))) (t_1 (* -6.0 (* y z))))
(if (<= z -4.8e+205)
t_0
(if (<= z -1.15e+148)
t_1
(if (<= z -2.65e+20)
t_0
(if (<= z 5.4e-71)
(* x -3.0)
(if (<= z 1.15e-24) (* 4.0 y) (if (<= z 0.65) (* x -3.0) t_1))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -4.8e+205) {
tmp = t_0;
} else if (z <= -1.15e+148) {
tmp = t_1;
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 5.4e-71) {
tmp = x * -3.0;
} else if (z <= 1.15e-24) {
tmp = 4.0 * y;
} else if (z <= 0.65) {
tmp = x * -3.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 * (x * z)
t_1 = (-6.0d0) * (y * z)
if (z <= (-4.8d+205)) then
tmp = t_0
else if (z <= (-1.15d+148)) then
tmp = t_1
else if (z <= (-2.65d+20)) then
tmp = t_0
else if (z <= 5.4d-71) then
tmp = x * (-3.0d0)
else if (z <= 1.15d-24) then
tmp = 4.0d0 * y
else if (z <= 0.65d0) then
tmp = x * (-3.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -4.8e+205) {
tmp = t_0;
} else if (z <= -1.15e+148) {
tmp = t_1;
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 5.4e-71) {
tmp = x * -3.0;
} else if (z <= 1.15e-24) {
tmp = 4.0 * y;
} else if (z <= 0.65) {
tmp = x * -3.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) t_1 = -6.0 * (y * z) tmp = 0 if z <= -4.8e+205: tmp = t_0 elif z <= -1.15e+148: tmp = t_1 elif z <= -2.65e+20: tmp = t_0 elif z <= 5.4e-71: tmp = x * -3.0 elif z <= 1.15e-24: tmp = 4.0 * y elif z <= 0.65: tmp = x * -3.0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -4.8e+205) tmp = t_0; elseif (z <= -1.15e+148) tmp = t_1; elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 5.4e-71) tmp = Float64(x * -3.0); elseif (z <= 1.15e-24) tmp = Float64(4.0 * y); elseif (z <= 0.65) tmp = Float64(x * -3.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -4.8e+205) tmp = t_0; elseif (z <= -1.15e+148) tmp = t_1; elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 5.4e-71) tmp = x * -3.0; elseif (z <= 1.15e-24) tmp = 4.0 * y; elseif (z <= 0.65) tmp = x * -3.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+205], t$95$0, If[LessEqual[z, -1.15e+148], t$95$1, If[LessEqual[z, -2.65e+20], t$95$0, If[LessEqual[z, 5.4e-71], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.15e-24], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 0.65], N[(x * -3.0), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-71}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-24}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.79999999999999972e205 or -1.15e148 < z < -2.65e20Initial program 99.9%
Taylor expanded in x around inf 67.9%
Taylor expanded in z around inf 67.8%
if -4.79999999999999972e205 < z < -1.15e148 or 0.650000000000000022 < z Initial program 99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.5%
Taylor expanded in y around inf 65.3%
*-commutative65.3%
Simplified65.3%
if -2.65e20 < z < 5.4000000000000003e-71 or 1.1500000000000001e-24 < z < 0.650000000000000022Initial program 99.4%
Taylor expanded in x around inf 61.6%
*-commutative61.6%
sub-neg61.6%
distribute-lft-in61.6%
metadata-eval61.6%
metadata-eval61.6%
neg-mul-161.6%
*-commutative61.6%
associate-*l*61.6%
distribute-rgt-in61.6%
distribute-lft-in61.6%
associate-+r+61.6%
metadata-eval61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-lft-in61.6%
+-commutative61.6%
distribute-lft-in61.6%
associate-*r*61.6%
metadata-eval61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in z around 0 60.4%
*-commutative60.4%
Simplified60.4%
if 5.4000000000000003e-71 < z < 1.1500000000000001e-24Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
Final simplification63.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))) (t_1 (* -6.0 (* y z))))
(if (<= z -9.2e+204)
t_0
(if (<= z -1.65e+146)
t_1
(if (<= z -2.65e+20)
t_0
(if (<= z 2.5e-70)
(* x -3.0)
(if (<= z 2.4e-24) (* 4.0 y) (if (<= z 0.65) (* x -3.0) t_1))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -9.2e+204) {
tmp = t_0;
} else if (z <= -1.65e+146) {
tmp = t_1;
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 2.5e-70) {
tmp = x * -3.0;
} else if (z <= 2.4e-24) {
tmp = 4.0 * y;
} else if (z <= 0.65) {
tmp = x * -3.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 = x * (z * 6.0d0)
t_1 = (-6.0d0) * (y * z)
if (z <= (-9.2d+204)) then
tmp = t_0
else if (z <= (-1.65d+146)) then
tmp = t_1
else if (z <= (-2.65d+20)) then
tmp = t_0
else if (z <= 2.5d-70) then
tmp = x * (-3.0d0)
else if (z <= 2.4d-24) then
tmp = 4.0d0 * y
else if (z <= 0.65d0) then
tmp = x * (-3.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -9.2e+204) {
tmp = t_0;
} else if (z <= -1.65e+146) {
tmp = t_1;
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 2.5e-70) {
tmp = x * -3.0;
} else if (z <= 2.4e-24) {
tmp = 4.0 * y;
} else if (z <= 0.65) {
tmp = x * -3.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) t_1 = -6.0 * (y * z) tmp = 0 if z <= -9.2e+204: tmp = t_0 elif z <= -1.65e+146: tmp = t_1 elif z <= -2.65e+20: tmp = t_0 elif z <= 2.5e-70: tmp = x * -3.0 elif z <= 2.4e-24: tmp = 4.0 * y elif z <= 0.65: tmp = x * -3.0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -9.2e+204) tmp = t_0; elseif (z <= -1.65e+146) tmp = t_1; elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 2.5e-70) tmp = Float64(x * -3.0); elseif (z <= 2.4e-24) tmp = Float64(4.0 * y); elseif (z <= 0.65) tmp = Float64(x * -3.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -9.2e+204) tmp = t_0; elseif (z <= -1.65e+146) tmp = t_1; elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 2.5e-70) tmp = x * -3.0; elseif (z <= 2.4e-24) tmp = 4.0 * y; elseif (z <= 0.65) tmp = x * -3.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+204], t$95$0, If[LessEqual[z, -1.65e+146], t$95$1, If[LessEqual[z, -2.65e+20], t$95$0, If[LessEqual[z, 2.5e-70], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.4e-24], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 0.65], N[(x * -3.0), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+204}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-70}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-24}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.19999999999999962e204 or -1.65000000000000008e146 < z < -2.65e20Initial program 99.9%
Taylor expanded in x around inf 67.9%
*-commutative67.9%
sub-neg67.9%
distribute-lft-in67.9%
metadata-eval67.9%
metadata-eval67.9%
neg-mul-167.9%
*-commutative67.9%
associate-*l*67.9%
distribute-rgt-in67.9%
distribute-lft-in67.9%
associate-+r+67.9%
metadata-eval67.9%
metadata-eval67.9%
metadata-eval67.9%
distribute-lft-in67.9%
+-commutative67.9%
distribute-lft-in67.9%
associate-*r*67.9%
metadata-eval67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 67.9%
if -9.19999999999999962e204 < z < -1.65000000000000008e146 or 0.650000000000000022 < z Initial program 99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.5%
Taylor expanded in y around inf 65.3%
*-commutative65.3%
Simplified65.3%
if -2.65e20 < z < 2.4999999999999999e-70 or 2.3999999999999998e-24 < z < 0.650000000000000022Initial program 99.4%
Taylor expanded in x around inf 61.6%
*-commutative61.6%
sub-neg61.6%
distribute-lft-in61.6%
metadata-eval61.6%
metadata-eval61.6%
neg-mul-161.6%
*-commutative61.6%
associate-*l*61.6%
distribute-rgt-in61.6%
distribute-lft-in61.6%
associate-+r+61.6%
metadata-eval61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-lft-in61.6%
+-commutative61.6%
distribute-lft-in61.6%
associate-*r*61.6%
metadata-eval61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in z around 0 60.4%
*-commutative60.4%
Simplified60.4%
if 2.4999999999999999e-70 < z < 2.3999999999999998e-24Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
Final simplification63.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -1.2e+205)
t_0
(if (<= z -3.9e+149)
(* z (* y -6.0))
(if (<= z -2.65e+20)
t_0
(if (<= z 2.15e-71)
(* x -3.0)
(if (<= z 5.2e-24)
(* 4.0 y)
(if (<= z 0.62) (* x -3.0) (* -6.0 (* y z))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -1.2e+205) {
tmp = t_0;
} else if (z <= -3.9e+149) {
tmp = z * (y * -6.0);
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 2.15e-71) {
tmp = x * -3.0;
} else if (z <= 5.2e-24) {
tmp = 4.0 * y;
} else if (z <= 0.62) {
tmp = x * -3.0;
} else {
tmp = -6.0 * (y * 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 = x * (z * 6.0d0)
if (z <= (-1.2d+205)) then
tmp = t_0
else if (z <= (-3.9d+149)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-2.65d+20)) then
tmp = t_0
else if (z <= 2.15d-71) then
tmp = x * (-3.0d0)
else if (z <= 5.2d-24) then
tmp = 4.0d0 * y
else if (z <= 0.62d0) then
tmp = x * (-3.0d0)
else
tmp = (-6.0d0) * (y * z)
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 <= -1.2e+205) {
tmp = t_0;
} else if (z <= -3.9e+149) {
tmp = z * (y * -6.0);
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 2.15e-71) {
tmp = x * -3.0;
} else if (z <= 5.2e-24) {
tmp = 4.0 * y;
} else if (z <= 0.62) {
tmp = x * -3.0;
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -1.2e+205: tmp = t_0 elif z <= -3.9e+149: tmp = z * (y * -6.0) elif z <= -2.65e+20: tmp = t_0 elif z <= 2.15e-71: tmp = x * -3.0 elif z <= 5.2e-24: tmp = 4.0 * y elif z <= 0.62: tmp = x * -3.0 else: tmp = -6.0 * (y * z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -1.2e+205) tmp = t_0; elseif (z <= -3.9e+149) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 2.15e-71) tmp = Float64(x * -3.0); elseif (z <= 5.2e-24) tmp = Float64(4.0 * y); elseif (z <= 0.62) tmp = Float64(x * -3.0); else tmp = Float64(-6.0 * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -1.2e+205) tmp = t_0; elseif (z <= -3.9e+149) tmp = z * (y * -6.0); elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 2.15e-71) tmp = x * -3.0; elseif (z <= 5.2e-24) tmp = 4.0 * y; elseif (z <= 0.62) tmp = x * -3.0; else tmp = -6.0 * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+205], t$95$0, If[LessEqual[z, -3.9e+149], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e+20], t$95$0, If[LessEqual[z, 2.15e-71], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.2e-24], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 0.62], N[(x * -3.0), $MachinePrecision], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{+149}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-71}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-24}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if z < -1.19999999999999993e205 or -3.8999999999999999e149 < z < -2.65e20Initial program 99.9%
Taylor expanded in x around inf 67.9%
*-commutative67.9%
sub-neg67.9%
distribute-lft-in67.9%
metadata-eval67.9%
metadata-eval67.9%
neg-mul-167.9%
*-commutative67.9%
associate-*l*67.9%
distribute-rgt-in67.9%
distribute-lft-in67.9%
associate-+r+67.9%
metadata-eval67.9%
metadata-eval67.9%
metadata-eval67.9%
distribute-lft-in67.9%
+-commutative67.9%
distribute-lft-in67.9%
associate-*r*67.9%
metadata-eval67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 67.9%
if -1.19999999999999993e205 < z < -3.8999999999999999e149Initial program 100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around inf 71.4%
associate-*r*71.6%
Simplified71.6%
if -2.65e20 < z < 2.1499999999999998e-71 or 5.2e-24 < z < 0.619999999999999996Initial program 99.4%
Taylor expanded in x around inf 61.6%
*-commutative61.6%
sub-neg61.6%
distribute-lft-in61.6%
metadata-eval61.6%
metadata-eval61.6%
neg-mul-161.6%
*-commutative61.6%
associate-*l*61.6%
distribute-rgt-in61.6%
distribute-lft-in61.6%
associate-+r+61.6%
metadata-eval61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-lft-in61.6%
+-commutative61.6%
distribute-lft-in61.6%
associate-*r*61.6%
metadata-eval61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in z around 0 60.4%
*-commutative60.4%
Simplified60.4%
if 2.1499999999999998e-71 < z < 5.2e-24Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
if 0.619999999999999996 < z Initial program 99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 96.9%
Taylor expanded in y around inf 63.8%
*-commutative63.8%
Simplified63.8%
Final simplification64.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))))
(if (<= z -2.7e+205)
t_0
(if (<= z -1.6e+146)
(* z (* y -6.0))
(if (<= z -2.65e+20)
t_0
(if (<= z 1.3e-70)
(* x -3.0)
(if (<= z 6.6e-25)
(* 4.0 y)
(if (<= z 0.56) (* x -3.0) (* y (* z -6.0))))))))))
double code(double x, double y, double z) {
double t_0 = x * (z * 6.0);
double tmp;
if (z <= -2.7e+205) {
tmp = t_0;
} else if (z <= -1.6e+146) {
tmp = z * (y * -6.0);
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 1.3e-70) {
tmp = x * -3.0;
} else if (z <= 6.6e-25) {
tmp = 4.0 * y;
} else if (z <= 0.56) {
tmp = x * -3.0;
} else {
tmp = y * (z * -6.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (z * 6.0d0)
if (z <= (-2.7d+205)) then
tmp = t_0
else if (z <= (-1.6d+146)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-2.65d+20)) then
tmp = t_0
else if (z <= 1.3d-70) then
tmp = x * (-3.0d0)
else if (z <= 6.6d-25) then
tmp = 4.0d0 * y
else if (z <= 0.56d0) then
tmp = x * (-3.0d0)
else
tmp = y * (z * (-6.0d0))
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 <= -2.7e+205) {
tmp = t_0;
} else if (z <= -1.6e+146) {
tmp = z * (y * -6.0);
} else if (z <= -2.65e+20) {
tmp = t_0;
} else if (z <= 1.3e-70) {
tmp = x * -3.0;
} else if (z <= 6.6e-25) {
tmp = 4.0 * y;
} else if (z <= 0.56) {
tmp = x * -3.0;
} else {
tmp = y * (z * -6.0);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z * 6.0) tmp = 0 if z <= -2.7e+205: tmp = t_0 elif z <= -1.6e+146: tmp = z * (y * -6.0) elif z <= -2.65e+20: tmp = t_0 elif z <= 1.3e-70: tmp = x * -3.0 elif z <= 6.6e-25: tmp = 4.0 * y elif z <= 0.56: tmp = x * -3.0 else: tmp = y * (z * -6.0) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -2.7e+205) tmp = t_0; elseif (z <= -1.6e+146) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 1.3e-70) tmp = Float64(x * -3.0); elseif (z <= 6.6e-25) tmp = Float64(4.0 * y); elseif (z <= 0.56) tmp = Float64(x * -3.0); else tmp = Float64(y * Float64(z * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z * 6.0); tmp = 0.0; if (z <= -2.7e+205) tmp = t_0; elseif (z <= -1.6e+146) tmp = z * (y * -6.0); elseif (z <= -2.65e+20) tmp = t_0; elseif (z <= 1.3e-70) tmp = x * -3.0; elseif (z <= 6.6e-25) tmp = 4.0 * y; elseif (z <= 0.56) tmp = x * -3.0; else tmp = y * (z * -6.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, -2.7e+205], t$95$0, If[LessEqual[z, -1.6e+146], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e+20], t$95$0, If[LessEqual[z, 1.3e-70], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.6e-25], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 0.56], N[(x * -3.0), $MachinePrecision], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{+146}:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-70}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-25}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 0.56:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -2.70000000000000012e205 or -1.6e146 < z < -2.65e20Initial program 99.9%
Taylor expanded in x around inf 67.9%
*-commutative67.9%
sub-neg67.9%
distribute-lft-in67.9%
metadata-eval67.9%
metadata-eval67.9%
neg-mul-167.9%
*-commutative67.9%
associate-*l*67.9%
distribute-rgt-in67.9%
distribute-lft-in67.9%
associate-+r+67.9%
metadata-eval67.9%
metadata-eval67.9%
metadata-eval67.9%
distribute-lft-in67.9%
+-commutative67.9%
distribute-lft-in67.9%
associate-*r*67.9%
metadata-eval67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 67.9%
if -2.70000000000000012e205 < z < -1.6e146Initial program 100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around inf 71.4%
associate-*r*71.6%
Simplified71.6%
if -2.65e20 < z < 1.30000000000000001e-70 or 6.5999999999999997e-25 < z < 0.56000000000000005Initial program 99.4%
Taylor expanded in x around inf 61.6%
*-commutative61.6%
sub-neg61.6%
distribute-lft-in61.6%
metadata-eval61.6%
metadata-eval61.6%
neg-mul-161.6%
*-commutative61.6%
associate-*l*61.6%
distribute-rgt-in61.6%
distribute-lft-in61.6%
associate-+r+61.6%
metadata-eval61.6%
metadata-eval61.6%
metadata-eval61.6%
distribute-lft-in61.6%
+-commutative61.6%
distribute-lft-in61.6%
associate-*r*61.6%
metadata-eval61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in z around 0 60.4%
*-commutative60.4%
Simplified60.4%
if 1.30000000000000001e-70 < z < 6.5999999999999997e-25Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
if 0.56000000000000005 < z Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
neg-mul-199.7%
associate-*r*99.7%
*-commutative99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 65.8%
Taylor expanded in z around inf 63.8%
Final simplification64.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -9e-5)
t_0
(if (<= z 1.55e-71)
(* x -3.0)
(if (<= z 2e-24) (* 4.0 y) (if (<= z 0.5) (* x -3.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -9e-5) {
tmp = t_0;
} else if (z <= 1.55e-71) {
tmp = x * -3.0;
} else if (z <= 2e-24) {
tmp = 4.0 * y;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-9d-5)) then
tmp = t_0
else if (z <= 1.55d-71) then
tmp = x * (-3.0d0)
else if (z <= 2d-24) then
tmp = 4.0d0 * y
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -9e-5) {
tmp = t_0;
} else if (z <= 1.55e-71) {
tmp = x * -3.0;
} else if (z <= 2e-24) {
tmp = 4.0 * y;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -9e-5: tmp = t_0 elif z <= 1.55e-71: tmp = x * -3.0 elif z <= 2e-24: tmp = 4.0 * y elif z <= 0.5: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -9e-5) tmp = t_0; elseif (z <= 1.55e-71) tmp = Float64(x * -3.0); elseif (z <= 2e-24) tmp = Float64(4.0 * y); elseif (z <= 0.5) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -9e-5) tmp = t_0; elseif (z <= 1.55e-71) tmp = x * -3.0; elseif (z <= 2e-24) tmp = 4.0 * y; elseif (z <= 0.5) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-5], t$95$0, If[LessEqual[z, 1.55e-71], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2e-24], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-71}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-24}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -9.00000000000000057e-5 or 0.5 < z Initial program 99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.2%
if -9.00000000000000057e-5 < z < 1.55000000000000001e-71 or 1.99999999999999985e-24 < z < 0.5Initial program 99.3%
Taylor expanded in x around inf 63.1%
*-commutative63.1%
sub-neg63.1%
distribute-lft-in63.1%
metadata-eval63.1%
metadata-eval63.1%
neg-mul-163.1%
*-commutative63.1%
associate-*l*63.1%
distribute-rgt-in63.1%
distribute-lft-in63.1%
associate-+r+63.1%
metadata-eval63.1%
metadata-eval63.1%
metadata-eval63.1%
distribute-lft-in63.1%
+-commutative63.1%
distribute-lft-in63.1%
associate-*r*63.1%
metadata-eval63.1%
metadata-eval63.1%
Simplified63.1%
Taylor expanded in z around 0 61.9%
*-commutative61.9%
Simplified61.9%
if 1.55000000000000001e-71 < z < 1.99999999999999985e-24Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
Final simplification80.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ -3.0 (* z 6.0)))) (t_1 (* -6.0 (* (- y x) z))))
(if (<= z -9e-5)
t_1
(if (<= z 1.3e-71)
t_0
(if (<= z 1.65e-24) (* 4.0 y) (if (<= z 165.0) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -9e-5) {
tmp = t_1;
} else if (z <= 1.3e-71) {
tmp = t_0;
} else if (z <= 1.65e-24) {
tmp = 4.0 * y;
} else if (z <= 165.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 = x * ((-3.0d0) + (z * 6.0d0))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-9d-5)) then
tmp = t_1
else if (z <= 1.3d-71) then
tmp = t_0
else if (z <= 1.65d-24) then
tmp = 4.0d0 * y
else if (z <= 165.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 = x * (-3.0 + (z * 6.0));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -9e-5) {
tmp = t_1;
} else if (z <= 1.3e-71) {
tmp = t_0;
} else if (z <= 1.65e-24) {
tmp = 4.0 * y;
} else if (z <= 165.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (-3.0 + (z * 6.0)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -9e-5: tmp = t_1 elif z <= 1.3e-71: tmp = t_0 elif z <= 1.65e-24: tmp = 4.0 * y elif z <= 165.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -9e-5) tmp = t_1; elseif (z <= 1.3e-71) tmp = t_0; elseif (z <= 1.65e-24) tmp = Float64(4.0 * y); elseif (z <= 165.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (-3.0 + (z * 6.0)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -9e-5) tmp = t_1; elseif (z <= 1.3e-71) tmp = t_0; elseif (z <= 1.65e-24) tmp = 4.0 * y; elseif (z <= 165.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-5], t$95$1, If[LessEqual[z, 1.3e-71], t$95$0, If[LessEqual[z, 1.65e-24], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 165.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-3 + z \cdot 6\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-71}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-24}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 165:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.00000000000000057e-5 or 165 < z Initial program 99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.2%
if -9.00000000000000057e-5 < z < 1.2999999999999999e-71 or 1.64999999999999992e-24 < z < 165Initial program 99.3%
Taylor expanded in x around inf 63.1%
*-commutative63.1%
sub-neg63.1%
distribute-lft-in63.1%
metadata-eval63.1%
metadata-eval63.1%
neg-mul-163.1%
*-commutative63.1%
associate-*l*63.1%
distribute-rgt-in63.1%
distribute-lft-in63.1%
associate-+r+63.1%
metadata-eval63.1%
metadata-eval63.1%
metadata-eval63.1%
distribute-lft-in63.1%
+-commutative63.1%
distribute-lft-in63.1%
associate-*r*63.1%
metadata-eval63.1%
metadata-eval63.1%
Simplified63.1%
if 1.2999999999999999e-71 < z < 1.64999999999999992e-24Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
Final simplification81.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ -3.0 (* z 6.0)))))
(if (<= z -9e-5)
(* z (* 6.0 (- x y)))
(if (<= z 2.2e-70)
t_0
(if (<= z 2.9e-24)
(* 4.0 y)
(if (<= z 165.0) t_0 (* -6.0 (* (- y x) z))))))))
double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double tmp;
if (z <= -9e-5) {
tmp = z * (6.0 * (x - y));
} else if (z <= 2.2e-70) {
tmp = t_0;
} else if (z <= 2.9e-24) {
tmp = 4.0 * y;
} else if (z <= 165.0) {
tmp = t_0;
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-3.0d0) + (z * 6.0d0))
if (z <= (-9d-5)) then
tmp = z * (6.0d0 * (x - y))
else if (z <= 2.2d-70) then
tmp = t_0
else if (z <= 2.9d-24) then
tmp = 4.0d0 * y
else if (z <= 165.0d0) then
tmp = t_0
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double tmp;
if (z <= -9e-5) {
tmp = z * (6.0 * (x - y));
} else if (z <= 2.2e-70) {
tmp = t_0;
} else if (z <= 2.9e-24) {
tmp = 4.0 * y;
} else if (z <= 165.0) {
tmp = t_0;
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (-3.0 + (z * 6.0)) tmp = 0 if z <= -9e-5: tmp = z * (6.0 * (x - y)) elif z <= 2.2e-70: tmp = t_0 elif z <= 2.9e-24: tmp = 4.0 * y elif z <= 165.0: tmp = t_0 else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) tmp = 0.0 if (z <= -9e-5) tmp = Float64(z * Float64(6.0 * Float64(x - y))); elseif (z <= 2.2e-70) tmp = t_0; elseif (z <= 2.9e-24) tmp = Float64(4.0 * y); elseif (z <= 165.0) tmp = t_0; else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (-3.0 + (z * 6.0)); tmp = 0.0; if (z <= -9e-5) tmp = z * (6.0 * (x - y)); elseif (z <= 2.2e-70) tmp = t_0; elseif (z <= 2.9e-24) tmp = 4.0 * y; elseif (z <= 165.0) tmp = t_0; else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-5], N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-70], t$95$0, If[LessEqual[z, 2.9e-24], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 165.0], t$95$0, N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{-5}:\\
\;\;\;\;z \cdot \left(6 \cdot \left(x - y\right)\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-70}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-24}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 165:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -9.00000000000000057e-5Initial program 100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 97.5%
Taylor expanded in y around 0 91.3%
associate-*r*93.7%
*-commutative93.7%
metadata-eval93.7%
distribute-lft-neg-in93.7%
associate-*l*93.8%
*-commutative93.8%
associate-*r*92.1%
distribute-rgt-neg-in92.1%
neg-mul-192.1%
distribute-lft-in99.8%
neg-mul-199.8%
sub-neg99.8%
associate-*l*99.9%
Simplified97.7%
if -9.00000000000000057e-5 < z < 2.1999999999999999e-70 or 2.8999999999999999e-24 < z < 165Initial program 99.3%
Taylor expanded in x around inf 63.1%
*-commutative63.1%
sub-neg63.1%
distribute-lft-in63.1%
metadata-eval63.1%
metadata-eval63.1%
neg-mul-163.1%
*-commutative63.1%
associate-*l*63.1%
distribute-rgt-in63.1%
distribute-lft-in63.1%
associate-+r+63.1%
metadata-eval63.1%
metadata-eval63.1%
metadata-eval63.1%
distribute-lft-in63.1%
+-commutative63.1%
distribute-lft-in63.1%
associate-*r*63.1%
metadata-eval63.1%
metadata-eval63.1%
Simplified63.1%
if 2.1999999999999999e-70 < z < 2.8999999999999999e-24Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
if 165 < z Initial program 99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 96.9%
Final simplification81.0%
(FPCore (x y z) :precision binary64 (+ (* 4.0 (- y x)) (+ x (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
return (4.0 * (y - x)) + (x + (-6.0 * ((y - x) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (4.0d0 * (y - x)) + (x + ((-6.0d0) * ((y - x) * z)))
end function
public static double code(double x, double y, double z) {
return (4.0 * (y - x)) + (x + (-6.0 * ((y - x) * z)));
}
def code(x, y, z): return (4.0 * (y - x)) + (x + (-6.0 * ((y - x) * z)))
function code(x, y, z) return Float64(Float64(4.0 * Float64(y - x)) + Float64(x + Float64(-6.0 * Float64(Float64(y - x) * z)))) end
function tmp = code(x, y, z) tmp = (4.0 * (y - x)) + (x + (-6.0 * ((y - x) * z))); end
code[x_, y_, z_] := N[(N[(4.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] + N[(x + N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
4 \cdot \left(y - x\right) + \left(x + -6 \cdot \left(\left(y - x\right) \cdot z\right)\right)
\end{array}
Initial program 99.6%
Taylor expanded in z around 0 99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -9e-5)
t_0
(if (<= z 5.9e-71)
(* x -3.0)
(if (<= z 6.2e-25) (* 4.0 y) (if (<= z 0.55) (* x -3.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -9e-5) {
tmp = t_0;
} else if (z <= 5.9e-71) {
tmp = x * -3.0;
} else if (z <= 6.2e-25) {
tmp = 4.0 * y;
} else if (z <= 0.55) {
tmp = x * -3.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 <= (-9d-5)) then
tmp = t_0
else if (z <= 5.9d-71) then
tmp = x * (-3.0d0)
else if (z <= 6.2d-25) then
tmp = 4.0d0 * y
else if (z <= 0.55d0) then
tmp = x * (-3.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 <= -9e-5) {
tmp = t_0;
} else if (z <= 5.9e-71) {
tmp = x * -3.0;
} else if (z <= 6.2e-25) {
tmp = 4.0 * y;
} else if (z <= 0.55) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -9e-5: tmp = t_0 elif z <= 5.9e-71: tmp = x * -3.0 elif z <= 6.2e-25: tmp = 4.0 * y elif z <= 0.55: tmp = x * -3.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 <= -9e-5) tmp = t_0; elseif (z <= 5.9e-71) tmp = Float64(x * -3.0); elseif (z <= 6.2e-25) tmp = Float64(4.0 * y); elseif (z <= 0.55) tmp = Float64(x * -3.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 <= -9e-5) tmp = t_0; elseif (z <= 5.9e-71) tmp = x * -3.0; elseif (z <= 6.2e-25) tmp = 4.0 * y; elseif (z <= 0.55) tmp = x * -3.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, -9e-5], t$95$0, If[LessEqual[z, 5.9e-71], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.2e-25], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, 0.55], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{-71}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-25}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -9.00000000000000057e-5 or 0.55000000000000004 < z Initial program 99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.2%
Taylor expanded in y around inf 56.2%
*-commutative56.2%
Simplified56.2%
if -9.00000000000000057e-5 < z < 5.90000000000000002e-71 or 6.19999999999999989e-25 < z < 0.55000000000000004Initial program 99.3%
Taylor expanded in x around inf 63.1%
*-commutative63.1%
sub-neg63.1%
distribute-lft-in63.1%
metadata-eval63.1%
metadata-eval63.1%
neg-mul-163.1%
*-commutative63.1%
associate-*l*63.1%
distribute-rgt-in63.1%
distribute-lft-in63.1%
associate-+r+63.1%
metadata-eval63.1%
metadata-eval63.1%
metadata-eval63.1%
distribute-lft-in63.1%
+-commutative63.1%
distribute-lft-in63.1%
associate-*r*63.1%
metadata-eval63.1%
metadata-eval63.1%
Simplified63.1%
Taylor expanded in z around 0 61.9%
*-commutative61.9%
Simplified61.9%
if 5.90000000000000002e-71 < z < 6.19999999999999989e-25Initial program 99.7%
+-commutative99.7%
associate-*l*100.0%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
fma-def100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in z around 0 78.5%
*-commutative78.5%
Simplified78.5%
Final simplification59.6%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* z (* 6.0 (- x y))) (if (<= z 0.6) (+ (* 4.0 y) (* x -3.0)) (+ x (* (- y x) (* z -6.0))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * (6.0 * (x - y));
} else if (z <= 0.6) {
tmp = (4.0 * y) + (x * -3.0);
} else {
tmp = x + ((y - x) * (z * -6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.55d0)) then
tmp = z * (6.0d0 * (x - y))
else if (z <= 0.6d0) then
tmp = (4.0d0 * y) + (x * (-3.0d0))
else
tmp = x + ((y - x) * (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * (6.0 * (x - y));
} else if (z <= 0.6) {
tmp = (4.0 * y) + (x * -3.0);
} else {
tmp = x + ((y - x) * (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = z * (6.0 * (x - y)) elif z <= 0.6: tmp = (4.0 * y) + (x * -3.0) else: tmp = x + ((y - x) * (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(z * Float64(6.0 * Float64(x - y))); elseif (z <= 0.6) tmp = Float64(Float64(4.0 * y) + Float64(x * -3.0)); else tmp = Float64(x + Float64(Float64(y - x) * Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = z * (6.0 * (x - y)); elseif (z <= 0.6) tmp = (4.0 * y) + (x * -3.0); else tmp = x + ((y - x) * (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.6], N[(N[(4.0 * y), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;z \cdot \left(6 \cdot \left(x - y\right)\right)\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;4 \cdot y + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.8%
Taylor expanded in y around 0 92.6%
associate-*r*93.6%
*-commutative93.6%
metadata-eval93.6%
distribute-lft-neg-in93.6%
associate-*l*93.7%
*-commutative93.7%
associate-*r*92.0%
distribute-rgt-neg-in92.0%
neg-mul-192.0%
distribute-lft-in99.8%
neg-mul-199.8%
sub-neg99.8%
associate-*l*99.9%
Simplified99.0%
if -0.55000000000000004 < z < 0.599999999999999978Initial program 99.4%
Taylor expanded in x around 0 99.7%
fma-def99.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in z around 0 98.3%
if 0.599999999999999978 < z Initial program 99.6%
Taylor expanded in z around inf 96.9%
associate-*r*97.0%
*-commutative97.0%
Simplified97.0%
Final simplification98.1%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* z (* 6.0 (- x y))) (if (<= z 0.6) (+ (* 4.0 y) (* x -3.0)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * (6.0 * (x - y));
} else if (z <= 0.6) {
tmp = (4.0 * y) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.55d0)) then
tmp = z * (6.0d0 * (x - y))
else if (z <= 0.6d0) then
tmp = (4.0d0 * y) + (x * (-3.0d0))
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * (6.0 * (x - y));
} else if (z <= 0.6) {
tmp = (4.0 * y) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = z * (6.0 * (x - y)) elif z <= 0.6: tmp = (4.0 * y) + (x * -3.0) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(z * Float64(6.0 * Float64(x - y))); elseif (z <= 0.6) tmp = Float64(Float64(4.0 * y) + Float64(x * -3.0)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = z * (6.0 * (x - y)); elseif (z <= 0.6) tmp = (4.0 * y) + (x * -3.0); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(z * N[(6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.6], N[(N[(4.0 * y), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;z \cdot \left(6 \cdot \left(x - y\right)\right)\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;4 \cdot y + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.8%
Taylor expanded in y around 0 92.6%
associate-*r*93.6%
*-commutative93.6%
metadata-eval93.6%
distribute-lft-neg-in93.6%
associate-*l*93.7%
*-commutative93.7%
associate-*r*92.0%
distribute-rgt-neg-in92.0%
neg-mul-192.0%
distribute-lft-in99.8%
neg-mul-199.8%
sub-neg99.8%
associate-*l*99.9%
Simplified99.0%
if -0.55000000000000004 < z < 0.599999999999999978Initial program 99.4%
Taylor expanded in x around 0 99.7%
fma-def99.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in z around 0 98.3%
if 0.599999999999999978 < z Initial program 99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 96.9%
Final simplification98.1%
(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.6%
associate-*l*99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (<= x -2.2e-45) (* x -3.0) (if (<= x 5.4e-142) (* 4.0 y) (* x -3.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.2e-45) {
tmp = x * -3.0;
} else if (x <= 5.4e-142) {
tmp = 4.0 * y;
} else {
tmp = x * -3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.2d-45)) then
tmp = x * (-3.0d0)
else if (x <= 5.4d-142) then
tmp = 4.0d0 * y
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.2e-45) {
tmp = x * -3.0;
} else if (x <= 5.4e-142) {
tmp = 4.0 * y;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.2e-45: tmp = x * -3.0 elif x <= 5.4e-142: tmp = 4.0 * y else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.2e-45) tmp = Float64(x * -3.0); elseif (x <= 5.4e-142) tmp = Float64(4.0 * y); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.2e-45) tmp = x * -3.0; elseif (x <= 5.4e-142) tmp = 4.0 * y; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.2e-45], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 5.4e-142], N[(4.0 * y), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-45}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-142}:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if x < -2.19999999999999993e-45 or 5.3999999999999996e-142 < x Initial program 99.6%
Taylor expanded in x around inf 69.9%
*-commutative69.9%
sub-neg69.9%
distribute-lft-in69.9%
metadata-eval69.9%
metadata-eval69.9%
neg-mul-169.9%
*-commutative69.9%
associate-*l*69.9%
distribute-rgt-in69.9%
distribute-lft-in69.9%
associate-+r+69.9%
metadata-eval69.9%
metadata-eval69.9%
metadata-eval69.9%
distribute-lft-in69.9%
+-commutative69.9%
distribute-lft-in69.9%
associate-*r*69.9%
metadata-eval69.9%
metadata-eval69.9%
Simplified69.9%
Taylor expanded in z around 0 40.0%
*-commutative40.0%
Simplified40.0%
if -2.19999999999999993e-45 < x < 5.3999999999999996e-142Initial program 99.5%
+-commutative99.5%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-lft-in99.8%
neg-mul-199.8%
associate-*r*99.8%
*-commutative99.8%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 83.3%
Taylor expanded in z around 0 44.0%
*-commutative44.0%
Simplified44.0%
Final simplification41.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.6%
Taylor expanded in x around inf 53.8%
*-commutative53.8%
sub-neg53.8%
distribute-lft-in53.8%
metadata-eval53.8%
metadata-eval53.8%
neg-mul-153.8%
*-commutative53.8%
associate-*l*53.8%
distribute-rgt-in53.8%
distribute-lft-in53.8%
associate-+r+53.8%
metadata-eval53.8%
metadata-eval53.8%
metadata-eval53.8%
distribute-lft-in53.8%
+-commutative53.8%
distribute-lft-in53.8%
associate-*r*53.8%
metadata-eval53.8%
metadata-eval53.8%
Simplified53.8%
Taylor expanded in z around 0 30.6%
*-commutative30.6%
Simplified30.6%
Final simplification30.6%
herbie shell --seed 2023224
(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))))