
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (+ (* 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 (* x z))) (t_1 (* -6.0 (* y z))))
(if (<= z -1.75e+123)
t_0
(if (<= z -4.5e+42)
t_1
(if (<= z -3.5e+16)
t_0
(if (<= z -3.6e-142)
(* 4.0 y)
(if (<= z -5.8e-192)
(* x -3.0)
(if (<= z -1.76e-217)
(* 4.0 y)
(if (<= z -4.8e-241)
(* x -3.0)
(if (<= z 340000000000.0) (* 4.0 y) 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 <= -1.75e+123) {
tmp = t_0;
} else if (z <= -4.5e+42) {
tmp = t_1;
} else if (z <= -3.5e+16) {
tmp = t_0;
} else if (z <= -3.6e-142) {
tmp = 4.0 * y;
} else if (z <= -5.8e-192) {
tmp = x * -3.0;
} else if (z <= -1.76e-217) {
tmp = 4.0 * y;
} else if (z <= -4.8e-241) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} 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 <= (-1.75d+123)) then
tmp = t_0
else if (z <= (-4.5d+42)) then
tmp = t_1
else if (z <= (-3.5d+16)) then
tmp = t_0
else if (z <= (-3.6d-142)) then
tmp = 4.0d0 * y
else if (z <= (-5.8d-192)) then
tmp = x * (-3.0d0)
else if (z <= (-1.76d-217)) then
tmp = 4.0d0 * y
else if (z <= (-4.8d-241)) then
tmp = x * (-3.0d0)
else if (z <= 340000000000.0d0) then
tmp = 4.0d0 * y
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 <= -1.75e+123) {
tmp = t_0;
} else if (z <= -4.5e+42) {
tmp = t_1;
} else if (z <= -3.5e+16) {
tmp = t_0;
} else if (z <= -3.6e-142) {
tmp = 4.0 * y;
} else if (z <= -5.8e-192) {
tmp = x * -3.0;
} else if (z <= -1.76e-217) {
tmp = 4.0 * y;
} else if (z <= -4.8e-241) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} 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 <= -1.75e+123: tmp = t_0 elif z <= -4.5e+42: tmp = t_1 elif z <= -3.5e+16: tmp = t_0 elif z <= -3.6e-142: tmp = 4.0 * y elif z <= -5.8e-192: tmp = x * -3.0 elif z <= -1.76e-217: tmp = 4.0 * y elif z <= -4.8e-241: tmp = x * -3.0 elif z <= 340000000000.0: tmp = 4.0 * y 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 <= -1.75e+123) tmp = t_0; elseif (z <= -4.5e+42) tmp = t_1; elseif (z <= -3.5e+16) tmp = t_0; elseif (z <= -3.6e-142) tmp = Float64(4.0 * y); elseif (z <= -5.8e-192) tmp = Float64(x * -3.0); elseif (z <= -1.76e-217) tmp = Float64(4.0 * y); elseif (z <= -4.8e-241) tmp = Float64(x * -3.0); elseif (z <= 340000000000.0) tmp = Float64(4.0 * y); 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 <= -1.75e+123) tmp = t_0; elseif (z <= -4.5e+42) tmp = t_1; elseif (z <= -3.5e+16) tmp = t_0; elseif (z <= -3.6e-142) tmp = 4.0 * y; elseif (z <= -5.8e-192) tmp = x * -3.0; elseif (z <= -1.76e-217) tmp = 4.0 * y; elseif (z <= -4.8e-241) tmp = x * -3.0; elseif (z <= 340000000000.0) tmp = 4.0 * y; 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, -1.75e+123], t$95$0, If[LessEqual[z, -4.5e+42], t$95$1, If[LessEqual[z, -3.5e+16], t$95$0, If[LessEqual[z, -3.6e-142], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -5.8e-192], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.76e-217], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -4.8e-241], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 340000000000.0], N[(4.0 * y), $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 -1.75 \cdot 10^{+123}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-142}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-192}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.76 \cdot 10^{-217}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-241}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 340000000000:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.75e123 or -4.50000000000000012e42 < z < -3.5e16Initial program 99.9%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around 0 66.3%
if -1.75e123 < z < -4.50000000000000012e42 or 3.4e11 < z Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 59.5%
if -3.5e16 < z < -3.6e-142 or -5.80000000000000033e-192 < z < -1.76000000000000006e-217 or -4.8e-241 < z < 3.4e11Initial program 99.5%
Taylor expanded in y around inf 61.7%
Taylor expanded in x around 0 62.3%
Taylor expanded in z around 0 59.8%
*-commutative59.8%
Simplified59.8%
if -3.6e-142 < z < -5.80000000000000033e-192 or -1.76000000000000006e-217 < z < -4.8e-241Initial program 99.2%
Taylor expanded in x around inf 83.8%
*-commutative83.8%
sub-neg83.8%
distribute-lft-in83.8%
metadata-eval83.8%
metadata-eval83.8%
neg-mul-183.8%
*-commutative83.8%
associate-*l*83.8%
distribute-rgt-in83.8%
distribute-lft-in83.8%
associate-+r+83.8%
metadata-eval83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-in83.8%
+-commutative83.8%
distribute-rgt-in83.8%
*-commutative83.8%
associate-*l*83.8%
metadata-eval83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in z around 0 83.8%
*-commutative83.8%
Simplified83.8%
Final simplification62.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* z 6.0))) (t_1 (* -6.0 (* y z))))
(if (<= z -1.32e+122)
t_0
(if (<= z -4.4e+42)
t_1
(if (<= z -3.5e+16)
t_0
(if (<= z -5.5e-142)
(* 4.0 y)
(if (<= z -3.3e-190)
(* x -3.0)
(if (<= z -2.55e-217)
(* 4.0 y)
(if (<= z -2.25e-237)
(* x -3.0)
(if (<= z 340000000000.0) (* 4.0 y) 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 <= -1.32e+122) {
tmp = t_0;
} else if (z <= -4.4e+42) {
tmp = t_1;
} else if (z <= -3.5e+16) {
tmp = t_0;
} else if (z <= -5.5e-142) {
tmp = 4.0 * y;
} else if (z <= -3.3e-190) {
tmp = x * -3.0;
} else if (z <= -2.55e-217) {
tmp = 4.0 * y;
} else if (z <= -2.25e-237) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} 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 <= (-1.32d+122)) then
tmp = t_0
else if (z <= (-4.4d+42)) then
tmp = t_1
else if (z <= (-3.5d+16)) then
tmp = t_0
else if (z <= (-5.5d-142)) then
tmp = 4.0d0 * y
else if (z <= (-3.3d-190)) then
tmp = x * (-3.0d0)
else if (z <= (-2.55d-217)) then
tmp = 4.0d0 * y
else if (z <= (-2.25d-237)) then
tmp = x * (-3.0d0)
else if (z <= 340000000000.0d0) then
tmp = 4.0d0 * y
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 <= -1.32e+122) {
tmp = t_0;
} else if (z <= -4.4e+42) {
tmp = t_1;
} else if (z <= -3.5e+16) {
tmp = t_0;
} else if (z <= -5.5e-142) {
tmp = 4.0 * y;
} else if (z <= -3.3e-190) {
tmp = x * -3.0;
} else if (z <= -2.55e-217) {
tmp = 4.0 * y;
} else if (z <= -2.25e-237) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} 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 <= -1.32e+122: tmp = t_0 elif z <= -4.4e+42: tmp = t_1 elif z <= -3.5e+16: tmp = t_0 elif z <= -5.5e-142: tmp = 4.0 * y elif z <= -3.3e-190: tmp = x * -3.0 elif z <= -2.55e-217: tmp = 4.0 * y elif z <= -2.25e-237: tmp = x * -3.0 elif z <= 340000000000.0: tmp = 4.0 * y 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 <= -1.32e+122) tmp = t_0; elseif (z <= -4.4e+42) tmp = t_1; elseif (z <= -3.5e+16) tmp = t_0; elseif (z <= -5.5e-142) tmp = Float64(4.0 * y); elseif (z <= -3.3e-190) tmp = Float64(x * -3.0); elseif (z <= -2.55e-217) tmp = Float64(4.0 * y); elseif (z <= -2.25e-237) tmp = Float64(x * -3.0); elseif (z <= 340000000000.0) tmp = Float64(4.0 * y); 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 <= -1.32e+122) tmp = t_0; elseif (z <= -4.4e+42) tmp = t_1; elseif (z <= -3.5e+16) tmp = t_0; elseif (z <= -5.5e-142) tmp = 4.0 * y; elseif (z <= -3.3e-190) tmp = x * -3.0; elseif (z <= -2.55e-217) tmp = 4.0 * y; elseif (z <= -2.25e-237) tmp = x * -3.0; elseif (z <= 340000000000.0) tmp = 4.0 * y; 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, -1.32e+122], t$95$0, If[LessEqual[z, -4.4e+42], t$95$1, If[LessEqual[z, -3.5e+16], t$95$0, If[LessEqual[z, -5.5e-142], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -3.3e-190], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.55e-217], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -2.25e-237], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 340000000000.0], N[(4.0 * y), $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 -1.32 \cdot 10^{+122}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-142}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-190}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-217}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-237}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 340000000000:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.31999999999999992e122 or -4.4000000000000003e42 < z < -3.5e16Initial program 99.9%
Taylor expanded in x around inf 66.4%
*-commutative66.4%
sub-neg66.4%
distribute-lft-in66.4%
metadata-eval66.4%
metadata-eval66.4%
neg-mul-166.4%
*-commutative66.4%
associate-*l*66.4%
distribute-rgt-in66.4%
distribute-lft-in66.4%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
metadata-eval66.4%
distribute-lft-in66.4%
+-commutative66.4%
distribute-rgt-in66.4%
*-commutative66.4%
associate-*l*66.4%
metadata-eval66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in z around inf 66.4%
if -1.31999999999999992e122 < z < -4.4000000000000003e42 or 3.4e11 < z Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 59.5%
if -3.5e16 < z < -5.50000000000000023e-142 or -3.30000000000000019e-190 < z < -2.5499999999999998e-217 or -2.25000000000000005e-237 < z < 3.4e11Initial program 99.5%
Taylor expanded in y around inf 61.7%
Taylor expanded in x around 0 62.3%
Taylor expanded in z around 0 59.8%
*-commutative59.8%
Simplified59.8%
if -5.50000000000000023e-142 < z < -3.30000000000000019e-190 or -2.5499999999999998e-217 < z < -2.25000000000000005e-237Initial program 99.2%
Taylor expanded in x around inf 83.8%
*-commutative83.8%
sub-neg83.8%
distribute-lft-in83.8%
metadata-eval83.8%
metadata-eval83.8%
neg-mul-183.8%
*-commutative83.8%
associate-*l*83.8%
distribute-rgt-in83.8%
distribute-lft-in83.8%
associate-+r+83.8%
metadata-eval83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-in83.8%
+-commutative83.8%
distribute-rgt-in83.8%
*-commutative83.8%
associate-*l*83.8%
metadata-eval83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in z around 0 83.8%
*-commutative83.8%
Simplified83.8%
Final simplification62.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -7.8e+121)
(* z (* x 6.0))
(if (<= z -4.5e+42)
t_0
(if (<= z -3.5e+16)
(* x (* z 6.0))
(if (<= z -4.9e-142)
(* 4.0 y)
(if (<= z -1.25e-190)
(* x -3.0)
(if (<= z -2.5e-216)
(* 4.0 y)
(if (<= z -1.8e-241)
(* x -3.0)
(if (<= z 340000000000.0) (* 4.0 y) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -7.8e+121) {
tmp = z * (x * 6.0);
} else if (z <= -4.5e+42) {
tmp = t_0;
} else if (z <= -3.5e+16) {
tmp = x * (z * 6.0);
} else if (z <= -4.9e-142) {
tmp = 4.0 * y;
} else if (z <= -1.25e-190) {
tmp = x * -3.0;
} else if (z <= -2.5e-216) {
tmp = 4.0 * y;
} else if (z <= -1.8e-241) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} 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 <= (-7.8d+121)) then
tmp = z * (x * 6.0d0)
else if (z <= (-4.5d+42)) then
tmp = t_0
else if (z <= (-3.5d+16)) then
tmp = x * (z * 6.0d0)
else if (z <= (-4.9d-142)) then
tmp = 4.0d0 * y
else if (z <= (-1.25d-190)) then
tmp = x * (-3.0d0)
else if (z <= (-2.5d-216)) then
tmp = 4.0d0 * y
else if (z <= (-1.8d-241)) then
tmp = x * (-3.0d0)
else if (z <= 340000000000.0d0) then
tmp = 4.0d0 * y
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 <= -7.8e+121) {
tmp = z * (x * 6.0);
} else if (z <= -4.5e+42) {
tmp = t_0;
} else if (z <= -3.5e+16) {
tmp = x * (z * 6.0);
} else if (z <= -4.9e-142) {
tmp = 4.0 * y;
} else if (z <= -1.25e-190) {
tmp = x * -3.0;
} else if (z <= -2.5e-216) {
tmp = 4.0 * y;
} else if (z <= -1.8e-241) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -7.8e+121: tmp = z * (x * 6.0) elif z <= -4.5e+42: tmp = t_0 elif z <= -3.5e+16: tmp = x * (z * 6.0) elif z <= -4.9e-142: tmp = 4.0 * y elif z <= -1.25e-190: tmp = x * -3.0 elif z <= -2.5e-216: tmp = 4.0 * y elif z <= -1.8e-241: tmp = x * -3.0 elif z <= 340000000000.0: tmp = 4.0 * y else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -7.8e+121) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= -4.5e+42) tmp = t_0; elseif (z <= -3.5e+16) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -4.9e-142) tmp = Float64(4.0 * y); elseif (z <= -1.25e-190) tmp = Float64(x * -3.0); elseif (z <= -2.5e-216) tmp = Float64(4.0 * y); elseif (z <= -1.8e-241) tmp = Float64(x * -3.0); elseif (z <= 340000000000.0) tmp = Float64(4.0 * y); 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 <= -7.8e+121) tmp = z * (x * 6.0); elseif (z <= -4.5e+42) tmp = t_0; elseif (z <= -3.5e+16) tmp = x * (z * 6.0); elseif (z <= -4.9e-142) tmp = 4.0 * y; elseif (z <= -1.25e-190) tmp = x * -3.0; elseif (z <= -2.5e-216) tmp = 4.0 * y; elseif (z <= -1.8e-241) tmp = x * -3.0; elseif (z <= 340000000000.0) tmp = 4.0 * y; 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, -7.8e+121], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.5e+42], t$95$0, If[LessEqual[z, -3.5e+16], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.9e-142], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -1.25e-190], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.5e-216], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -1.8e-241], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 340000000000.0], N[(4.0 * y), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+121}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+42}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+16}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-142}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-190}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-216}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-241}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 340000000000:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -7.79999999999999967e121Initial program 99.9%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around 0 62.5%
*-commutative62.5%
associate-*r*62.6%
Simplified62.6%
if -7.79999999999999967e121 < z < -4.50000000000000012e42 or 3.4e11 < z Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 59.5%
if -4.50000000000000012e42 < z < -3.5e16Initial program 100.0%
Taylor expanded in x around inf 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in100.0%
metadata-eval100.0%
metadata-eval100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-*l*100.0%
distribute-rgt-in100.0%
distribute-lft-in100.0%
associate-+r+100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
distribute-lft-in100.0%
+-commutative100.0%
distribute-rgt-in100.0%
*-commutative100.0%
associate-*l*100.0%
metadata-eval100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
if -3.5e16 < z < -4.9000000000000003e-142 or -1.25000000000000009e-190 < z < -2.5000000000000001e-216 or -1.7999999999999999e-241 < z < 3.4e11Initial program 99.5%
Taylor expanded in y around inf 61.7%
Taylor expanded in x around 0 62.3%
Taylor expanded in z around 0 59.8%
*-commutative59.8%
Simplified59.8%
if -4.9000000000000003e-142 < z < -1.25000000000000009e-190 or -2.5000000000000001e-216 < z < -1.7999999999999999e-241Initial program 99.2%
Taylor expanded in x around inf 83.8%
*-commutative83.8%
sub-neg83.8%
distribute-lft-in83.8%
metadata-eval83.8%
metadata-eval83.8%
neg-mul-183.8%
*-commutative83.8%
associate-*l*83.8%
distribute-rgt-in83.8%
distribute-lft-in83.8%
associate-+r+83.8%
metadata-eval83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-in83.8%
+-commutative83.8%
distribute-rgt-in83.8%
*-commutative83.8%
associate-*l*83.8%
metadata-eval83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in z around 0 83.8%
*-commutative83.8%
Simplified83.8%
Final simplification62.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.0265)
t_0
(if (<= z -3.8e-142)
(* 4.0 y)
(if (<= z -3.7e-191)
(* x -3.0)
(if (<= z -1.02e-218)
(* 4.0 y)
(if (<= z -3.2e-241)
(* x -3.0)
(if (<= z 0.52) (* 4.0 y) t_0))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.0265) {
tmp = t_0;
} else if (z <= -3.8e-142) {
tmp = 4.0 * y;
} else if (z <= -3.7e-191) {
tmp = x * -3.0;
} else if (z <= -1.02e-218) {
tmp = 4.0 * y;
} else if (z <= -3.2e-241) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = 4.0 * y;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.0265d0)) then
tmp = t_0
else if (z <= (-3.8d-142)) then
tmp = 4.0d0 * y
else if (z <= (-3.7d-191)) then
tmp = x * (-3.0d0)
else if (z <= (-1.02d-218)) then
tmp = 4.0d0 * y
else if (z <= (-3.2d-241)) then
tmp = x * (-3.0d0)
else if (z <= 0.52d0) then
tmp = 4.0d0 * y
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.0265) {
tmp = t_0;
} else if (z <= -3.8e-142) {
tmp = 4.0 * y;
} else if (z <= -3.7e-191) {
tmp = x * -3.0;
} else if (z <= -1.02e-218) {
tmp = 4.0 * y;
} else if (z <= -3.2e-241) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = 4.0 * y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.0265: tmp = t_0 elif z <= -3.8e-142: tmp = 4.0 * y elif z <= -3.7e-191: tmp = x * -3.0 elif z <= -1.02e-218: tmp = 4.0 * y elif z <= -3.2e-241: tmp = x * -3.0 elif z <= 0.52: tmp = 4.0 * y else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.0265) tmp = t_0; elseif (z <= -3.8e-142) tmp = Float64(4.0 * y); elseif (z <= -3.7e-191) tmp = Float64(x * -3.0); elseif (z <= -1.02e-218) tmp = Float64(4.0 * y); elseif (z <= -3.2e-241) tmp = Float64(x * -3.0); elseif (z <= 0.52) tmp = Float64(4.0 * y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.0265) tmp = t_0; elseif (z <= -3.8e-142) tmp = 4.0 * y; elseif (z <= -3.7e-191) tmp = x * -3.0; elseif (z <= -1.02e-218) tmp = 4.0 * y; elseif (z <= -3.2e-241) tmp = x * -3.0; elseif (z <= 0.52) tmp = 4.0 * y; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0265], t$95$0, If[LessEqual[z, -3.8e-142], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -3.7e-191], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.02e-218], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -3.2e-241], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.52], N[(4.0 * y), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.0265:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-142}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-191}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-218}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-241}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.0264999999999999993 or 0.52000000000000002 < z Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.9%
if -0.0264999999999999993 < z < -3.79999999999999972e-142 or -3.6999999999999997e-191 < z < -1.02e-218 or -3.2e-241 < z < 0.52000000000000002Initial program 99.5%
Taylor expanded in y around inf 61.9%
Taylor expanded in x around 0 62.8%
Taylor expanded in z around 0 61.9%
*-commutative61.9%
Simplified61.9%
if -3.79999999999999972e-142 < z < -3.6999999999999997e-191 or -1.02e-218 < z < -3.2e-241Initial program 99.2%
Taylor expanded in x around inf 83.8%
*-commutative83.8%
sub-neg83.8%
distribute-lft-in83.8%
metadata-eval83.8%
metadata-eval83.8%
neg-mul-183.8%
*-commutative83.8%
associate-*l*83.8%
distribute-rgt-in83.8%
distribute-lft-in83.8%
associate-+r+83.8%
metadata-eval83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-in83.8%
+-commutative83.8%
distribute-rgt-in83.8%
*-commutative83.8%
associate-*l*83.8%
metadata-eval83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in z around 0 83.8%
*-commutative83.8%
Simplified83.8%
Final simplification83.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z))))
(t_1 (* -6.0 (* (- y x) z))))
(if (<= z -3.5e+16)
t_1
(if (<= z -4.6e-142)
t_0
(if (<= z -1.08e-190)
(* x -3.0)
(if (<= z -7e-220)
(* 4.0 y)
(if (<= z -1.8e-236) (* x -3.0) (if (<= z 0.55) t_0 t_1))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -3.5e+16) {
tmp = t_1;
} else if (z <= -4.6e-142) {
tmp = t_0;
} else if (z <= -1.08e-190) {
tmp = x * -3.0;
} else if (z <= -7e-220) {
tmp = 4.0 * y;
} else if (z <= -1.8e-236) {
tmp = x * -3.0;
} else if (z <= 0.55) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * (y * (0.6666666666666666d0 - z))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-3.5d+16)) then
tmp = t_1
else if (z <= (-4.6d-142)) then
tmp = t_0
else if (z <= (-1.08d-190)) then
tmp = x * (-3.0d0)
else if (z <= (-7d-220)) then
tmp = 4.0d0 * y
else if (z <= (-1.8d-236)) then
tmp = x * (-3.0d0)
else if (z <= 0.55d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -3.5e+16) {
tmp = t_1;
} else if (z <= -4.6e-142) {
tmp = t_0;
} else if (z <= -1.08e-190) {
tmp = x * -3.0;
} else if (z <= -7e-220) {
tmp = 4.0 * y;
} else if (z <= -1.8e-236) {
tmp = x * -3.0;
} else if (z <= 0.55) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -3.5e+16: tmp = t_1 elif z <= -4.6e-142: tmp = t_0 elif z <= -1.08e-190: tmp = x * -3.0 elif z <= -7e-220: tmp = 4.0 * y elif z <= -1.8e-236: tmp = x * -3.0 elif z <= 0.55: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -3.5e+16) tmp = t_1; elseif (z <= -4.6e-142) tmp = t_0; elseif (z <= -1.08e-190) tmp = Float64(x * -3.0); elseif (z <= -7e-220) tmp = Float64(4.0 * y); elseif (z <= -1.8e-236) tmp = Float64(x * -3.0); elseif (z <= 0.55) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -3.5e+16) tmp = t_1; elseif (z <= -4.6e-142) tmp = t_0; elseif (z <= -1.08e-190) tmp = x * -3.0; elseif (z <= -7e-220) tmp = 4.0 * y; elseif (z <= -1.8e-236) tmp = x * -3.0; elseif (z <= 0.55) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+16], t$95$1, If[LessEqual[z, -4.6e-142], t$95$0, If[LessEqual[z, -1.08e-190], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7e-220], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -1.8e-236], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.55], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-142}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{-190}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-220}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-236}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.5e16 or 0.55000000000000004 < z Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.1%
if -3.5e16 < z < -4.60000000000000005e-142 or -1.80000000000000004e-236 < z < 0.55000000000000004Initial program 99.5%
Taylor expanded in y around inf 61.0%
Taylor expanded in x around 0 61.9%
if -4.60000000000000005e-142 < z < -1.08e-190 or -6.99999999999999975e-220 < z < -1.80000000000000004e-236Initial program 99.2%
Taylor expanded in x around inf 83.8%
*-commutative83.8%
sub-neg83.8%
distribute-lft-in83.8%
metadata-eval83.8%
metadata-eval83.8%
neg-mul-183.8%
*-commutative83.8%
associate-*l*83.8%
distribute-rgt-in83.8%
distribute-lft-in83.8%
associate-+r+83.8%
metadata-eval83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-in83.8%
+-commutative83.8%
distribute-rgt-in83.8%
*-commutative83.8%
associate-*l*83.8%
metadata-eval83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in z around 0 83.8%
*-commutative83.8%
Simplified83.8%
if -1.08e-190 < z < -6.99999999999999975e-220Initial program 99.6%
Taylor expanded in y around inf 85.3%
Taylor expanded in x around 0 85.4%
Taylor expanded in z around 0 85.9%
*-commutative85.9%
Simplified85.9%
Final simplification84.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.65)
t_0
(if (<= z -4.5e-142)
(* 4.0 y)
(if (<= z -2.3e-192)
(* x -3.0)
(if (<= z -8.2e-218)
(* 4.0 y)
(if (<= z -3.3e-236)
(* x -3.0)
(if (<= z 340000000000.0) (* 4.0 y) 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 <= -4.5e-142) {
tmp = 4.0 * y;
} else if (z <= -2.3e-192) {
tmp = x * -3.0;
} else if (z <= -8.2e-218) {
tmp = 4.0 * y;
} else if (z <= -3.3e-236) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} 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 <= (-4.5d-142)) then
tmp = 4.0d0 * y
else if (z <= (-2.3d-192)) then
tmp = x * (-3.0d0)
else if (z <= (-8.2d-218)) then
tmp = 4.0d0 * y
else if (z <= (-3.3d-236)) then
tmp = x * (-3.0d0)
else if (z <= 340000000000.0d0) then
tmp = 4.0d0 * y
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 <= -4.5e-142) {
tmp = 4.0 * y;
} else if (z <= -2.3e-192) {
tmp = x * -3.0;
} else if (z <= -8.2e-218) {
tmp = 4.0 * y;
} else if (z <= -3.3e-236) {
tmp = x * -3.0;
} else if (z <= 340000000000.0) {
tmp = 4.0 * y;
} 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 <= -4.5e-142: tmp = 4.0 * y elif z <= -2.3e-192: tmp = x * -3.0 elif z <= -8.2e-218: tmp = 4.0 * y elif z <= -3.3e-236: tmp = x * -3.0 elif z <= 340000000000.0: tmp = 4.0 * y 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 <= -4.5e-142) tmp = Float64(4.0 * y); elseif (z <= -2.3e-192) tmp = Float64(x * -3.0); elseif (z <= -8.2e-218) tmp = Float64(4.0 * y); elseif (z <= -3.3e-236) tmp = Float64(x * -3.0); elseif (z <= 340000000000.0) tmp = Float64(4.0 * y); 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 <= -4.5e-142) tmp = 4.0 * y; elseif (z <= -2.3e-192) tmp = x * -3.0; elseif (z <= -8.2e-218) tmp = 4.0 * y; elseif (z <= -3.3e-236) tmp = x * -3.0; elseif (z <= 340000000000.0) tmp = 4.0 * y; 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, -4.5e-142], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -2.3e-192], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8.2e-218], N[(4.0 * y), $MachinePrecision], If[LessEqual[z, -3.3e-236], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 340000000000.0], N[(4.0 * y), $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 -4.5 \cdot 10^{-142}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-192}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-218}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-236}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 340000000000:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.650000000000000022 or 3.4e11 < z Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.5%
*-commutative99.5%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in y around inf 53.9%
if -0.650000000000000022 < z < -4.50000000000000019e-142 or -2.30000000000000018e-192 < z < -8.1999999999999995e-218 or -3.3000000000000001e-236 < z < 3.4e11Initial program 99.5%
Taylor expanded in y around inf 61.0%
Taylor expanded in x around 0 61.6%
Taylor expanded in z around 0 60.8%
*-commutative60.8%
Simplified60.8%
if -4.50000000000000019e-142 < z < -2.30000000000000018e-192 or -8.1999999999999995e-218 < z < -3.3000000000000001e-236Initial program 99.2%
Taylor expanded in x around inf 83.8%
*-commutative83.8%
sub-neg83.8%
distribute-lft-in83.8%
metadata-eval83.8%
metadata-eval83.8%
neg-mul-183.8%
*-commutative83.8%
associate-*l*83.8%
distribute-rgt-in83.8%
distribute-lft-in83.8%
associate-+r+83.8%
metadata-eval83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-in83.8%
+-commutative83.8%
distribute-rgt-in83.8%
*-commutative83.8%
associate-*l*83.8%
metadata-eval83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in z around 0 83.8%
*-commutative83.8%
Simplified83.8%
Final simplification58.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z)))))
(if (<= y -1150000000.0)
t_0
(if (<= y -5.5e-99)
(* -6.0 (* (- y x) z))
(if (or (<= y -1e-108) (not (<= y 5.5e-17)))
t_0
(* x (+ -3.0 (* z 6.0))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double tmp;
if (y <= -1150000000.0) {
tmp = t_0;
} else if (y <= -5.5e-99) {
tmp = -6.0 * ((y - x) * z);
} else if ((y <= -1e-108) || !(y <= 5.5e-17)) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (y * (0.6666666666666666d0 - z))
if (y <= (-1150000000.0d0)) then
tmp = t_0
else if (y <= (-5.5d-99)) then
tmp = (-6.0d0) * ((y - x) * z)
else if ((y <= (-1d-108)) .or. (.not. (y <= 5.5d-17))) then
tmp = t_0
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 t_0 = 6.0 * (y * (0.6666666666666666 - z));
double tmp;
if (y <= -1150000000.0) {
tmp = t_0;
} else if (y <= -5.5e-99) {
tmp = -6.0 * ((y - x) * z);
} else if ((y <= -1e-108) || !(y <= 5.5e-17)) {
tmp = t_0;
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) tmp = 0 if y <= -1150000000.0: tmp = t_0 elif y <= -5.5e-99: tmp = -6.0 * ((y - x) * z) elif (y <= -1e-108) or not (y <= 5.5e-17): tmp = t_0 else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) tmp = 0.0 if (y <= -1150000000.0) tmp = t_0; elseif (y <= -5.5e-99) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif ((y <= -1e-108) || !(y <= 5.5e-17)) tmp = t_0; else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); tmp = 0.0; if (y <= -1150000000.0) tmp = t_0; elseif (y <= -5.5e-99) tmp = -6.0 * ((y - x) * z); elseif ((y <= -1e-108) || ~((y <= 5.5e-17))) tmp = t_0; else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1150000000.0], t$95$0, If[LessEqual[y, -5.5e-99], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1e-108], N[Not[LessEqual[y, 5.5e-17]], $MachinePrecision]], t$95$0, N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{if}\;y \leq -1150000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-99}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-108} \lor \neg \left(y \leq 5.5 \cdot 10^{-17}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -1.15e9 or -5.49999999999999991e-99 < y < -1.00000000000000004e-108 or 5.50000000000000001e-17 < y Initial program 99.6%
Taylor expanded in y around inf 81.9%
Taylor expanded in x around 0 82.1%
if -1.15e9 < y < -5.49999999999999991e-99Initial program 99.5%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 71.9%
if -1.00000000000000004e-108 < y < 5.50000000000000001e-17Initial program 99.7%
Taylor expanded in x around inf 82.5%
*-commutative82.5%
sub-neg82.5%
distribute-lft-in82.5%
metadata-eval82.5%
metadata-eval82.5%
neg-mul-182.5%
*-commutative82.5%
associate-*l*82.5%
distribute-rgt-in82.5%
distribute-lft-in82.5%
associate-+r+82.5%
metadata-eval82.5%
metadata-eval82.5%
metadata-eval82.5%
distribute-lft-in82.5%
+-commutative82.5%
distribute-rgt-in82.5%
*-commutative82.5%
associate-*l*82.5%
metadata-eval82.5%
metadata-eval82.5%
Simplified82.5%
Final simplification81.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (+ 4.0 (* -6.0 z)))))
(if (<= y -145000000.0)
t_0
(if (<= y -4.6e-99)
(* -6.0 (* (- y x) z))
(if (or (<= y -1.02e-108) (not (<= y 5.6e-17)))
t_0
(* x (+ -3.0 (* z 6.0))))))))
double code(double x, double y, double z) {
double t_0 = y * (4.0 + (-6.0 * z));
double tmp;
if (y <= -145000000.0) {
tmp = t_0;
} else if (y <= -4.6e-99) {
tmp = -6.0 * ((y - x) * z);
} else if ((y <= -1.02e-108) || !(y <= 5.6e-17)) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = y * (4.0d0 + ((-6.0d0) * z))
if (y <= (-145000000.0d0)) then
tmp = t_0
else if (y <= (-4.6d-99)) then
tmp = (-6.0d0) * ((y - x) * z)
else if ((y <= (-1.02d-108)) .or. (.not. (y <= 5.6d-17))) then
tmp = t_0
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 t_0 = y * (4.0 + (-6.0 * z));
double tmp;
if (y <= -145000000.0) {
tmp = t_0;
} else if (y <= -4.6e-99) {
tmp = -6.0 * ((y - x) * z);
} else if ((y <= -1.02e-108) || !(y <= 5.6e-17)) {
tmp = t_0;
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): t_0 = y * (4.0 + (-6.0 * z)) tmp = 0 if y <= -145000000.0: tmp = t_0 elif y <= -4.6e-99: tmp = -6.0 * ((y - x) * z) elif (y <= -1.02e-108) or not (y <= 5.6e-17): tmp = t_0 else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) t_0 = Float64(y * Float64(4.0 + Float64(-6.0 * z))) tmp = 0.0 if (y <= -145000000.0) tmp = t_0; elseif (y <= -4.6e-99) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif ((y <= -1.02e-108) || !(y <= 5.6e-17)) tmp = t_0; else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (4.0 + (-6.0 * z)); tmp = 0.0; if (y <= -145000000.0) tmp = t_0; elseif (y <= -4.6e-99) tmp = -6.0 * ((y - x) * z); elseif ((y <= -1.02e-108) || ~((y <= 5.6e-17))) tmp = t_0; else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(4.0 + N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -145000000.0], t$95$0, If[LessEqual[y, -4.6e-99], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.02e-108], N[Not[LessEqual[y, 5.6e-17]], $MachinePrecision]], t$95$0, N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(4 + -6 \cdot z\right)\\
\mathbf{if}\;y \leq -145000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-99}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-108} \lor \neg \left(y \leq 5.6 \cdot 10^{-17}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -1.45e8 or -4.5999999999999997e-99 < y < -1.02000000000000008e-108 or 5.5999999999999998e-17 < y Initial program 99.6%
+-commutative99.6%
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.9%
metadata-eval99.9%
metadata-eval99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 82.3%
if -1.45e8 < y < -4.5999999999999997e-99Initial program 99.5%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 71.9%
if -1.02000000000000008e-108 < y < 5.5999999999999998e-17Initial program 99.7%
Taylor expanded in x around inf 82.5%
*-commutative82.5%
sub-neg82.5%
distribute-lft-in82.5%
metadata-eval82.5%
metadata-eval82.5%
neg-mul-182.5%
*-commutative82.5%
associate-*l*82.5%
distribute-rgt-in82.5%
distribute-lft-in82.5%
associate-+r+82.5%
metadata-eval82.5%
metadata-eval82.5%
metadata-eval82.5%
distribute-lft-in82.5%
+-commutative82.5%
distribute-rgt-in82.5%
*-commutative82.5%
associate-*l*82.5%
metadata-eval82.5%
metadata-eval82.5%
Simplified82.5%
Final simplification81.4%
(FPCore (x y z) :precision binary64 (if (<= z -0.55) (* z (* (- y x) -6.0)) (if (<= z 0.55) (+ (* x -3.0) (* 4.0 y)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.55) {
tmp = (x * -3.0) + (4.0 * y);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.55d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.55d0) then
tmp = (x * (-3.0d0)) + (4.0d0 * y)
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.55) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.55) {
tmp = (x * -3.0) + (4.0 * y);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.55: tmp = z * ((y - x) * -6.0) elif z <= 0.55: tmp = (x * -3.0) + (4.0 * y) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.55) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.55) tmp = Float64(Float64(x * -3.0) + Float64(4.0 * y)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.55) tmp = z * ((y - x) * -6.0); elseif (z <= 0.55) tmp = (x * -3.0) + (4.0 * y); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.55], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.55], N[(N[(x * -3.0), $MachinePrecision] + N[(4.0 * y), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.55:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;x \cdot -3 + 4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.55000000000000004Initial program 99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.3%
*-commutative99.3%
associate-*l*99.4%
Simplified99.4%
if -0.55000000000000004 < z < 0.55000000000000004Initial program 99.5%
Taylor expanded in z around 0 98.0%
Taylor expanded in x around 0 98.5%
if 0.55000000000000004 < z Initial program 99.7%
Taylor expanded in z around 0 99.9%
Taylor expanded in z around inf 98.5%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (* (- y x) 6.0))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((0.6666666666666666d0 - z) * ((y - x) * 6.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((y - x) * 6.0))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(y - x) * 6.0))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((y - x) * 6.0)); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(\left(y - x\right) \cdot 6\right)
\end{array}
Initial program 99.6%
Taylor expanded in z around 0 99.6%
neg-mul-199.6%
+-commutative99.6%
sub-neg99.6%
Simplified99.6%
Final simplification99.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(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 -3e-44) (* x -3.0) (if (<= x 1.02e-32) (* 4.0 y) (* x -3.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3e-44) {
tmp = x * -3.0;
} else if (x <= 1.02e-32) {
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 <= (-3d-44)) then
tmp = x * (-3.0d0)
else if (x <= 1.02d-32) 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 <= -3e-44) {
tmp = x * -3.0;
} else if (x <= 1.02e-32) {
tmp = 4.0 * y;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3e-44: tmp = x * -3.0 elif x <= 1.02e-32: tmp = 4.0 * y else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3e-44) tmp = Float64(x * -3.0); elseif (x <= 1.02e-32) 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 <= -3e-44) tmp = x * -3.0; elseif (x <= 1.02e-32) tmp = 4.0 * y; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3e-44], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 1.02e-32], N[(4.0 * y), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-44}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-32}:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if x < -3.0000000000000002e-44 or 1.02000000000000002e-32 < x Initial program 99.7%
Taylor expanded in x around inf 75.1%
*-commutative75.1%
sub-neg75.1%
distribute-lft-in75.2%
metadata-eval75.2%
metadata-eval75.2%
neg-mul-175.2%
*-commutative75.2%
associate-*l*75.2%
distribute-rgt-in75.2%
distribute-lft-in75.2%
associate-+r+75.2%
metadata-eval75.2%
metadata-eval75.2%
metadata-eval75.2%
distribute-lft-in75.2%
+-commutative75.2%
distribute-rgt-in75.2%
*-commutative75.2%
associate-*l*75.2%
metadata-eval75.2%
metadata-eval75.2%
Simplified75.2%
Taylor expanded in z around 0 32.3%
*-commutative32.3%
Simplified32.3%
if -3.0000000000000002e-44 < x < 1.02000000000000002e-32Initial program 99.6%
Taylor expanded in y around inf 82.7%
Taylor expanded in x around 0 82.9%
Taylor expanded in z around 0 43.9%
*-commutative43.9%
Simplified43.9%
Final simplification37.5%
(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 49.8%
*-commutative49.8%
sub-neg49.8%
distribute-lft-in49.8%
metadata-eval49.8%
metadata-eval49.8%
neg-mul-149.8%
*-commutative49.8%
associate-*l*49.8%
distribute-rgt-in49.8%
distribute-lft-in49.8%
associate-+r+49.8%
metadata-eval49.8%
metadata-eval49.8%
metadata-eval49.8%
distribute-lft-in49.8%
+-commutative49.8%
distribute-rgt-in49.8%
*-commutative49.8%
associate-*l*49.8%
metadata-eval49.8%
metadata-eval49.8%
Simplified49.8%
Taylor expanded in z around 0 22.1%
*-commutative22.1%
Simplified22.1%
Final simplification22.1%
herbie shell --seed 2023199
(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))))