
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
return fma((y - z), (t - x), x);
}
function code(x, y, z, t) return fma(Float64(y - z), Float64(t - x), x) end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, t - x, x\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))) (t_2 (* x (- y))))
(if (<= y -1.1e+120)
(* y t)
(if (<= y -7.5e+91)
t_2
(if (<= y -3.8e+56)
(* y t)
(if (<= y -245.0)
t_1
(if (<= y -1.75e-18)
(* z x)
(if (<= y -3e-115)
x
(if (<= y 4.1e-126)
t_1
(if (<= y 7.1e-99)
x
(if (<= y 4.5e-24)
t_1
(if (<= y 2.5e+24) (* z x) t_2))))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * -y;
double tmp;
if (y <= -1.1e+120) {
tmp = y * t;
} else if (y <= -7.5e+91) {
tmp = t_2;
} else if (y <= -3.8e+56) {
tmp = y * t;
} else if (y <= -245.0) {
tmp = t_1;
} else if (y <= -1.75e-18) {
tmp = z * x;
} else if (y <= -3e-115) {
tmp = x;
} else if (y <= 4.1e-126) {
tmp = t_1;
} else if (y <= 7.1e-99) {
tmp = x;
} else if (y <= 4.5e-24) {
tmp = t_1;
} else if (y <= 2.5e+24) {
tmp = z * x;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * -t
t_2 = x * -y
if (y <= (-1.1d+120)) then
tmp = y * t
else if (y <= (-7.5d+91)) then
tmp = t_2
else if (y <= (-3.8d+56)) then
tmp = y * t
else if (y <= (-245.0d0)) then
tmp = t_1
else if (y <= (-1.75d-18)) then
tmp = z * x
else if (y <= (-3d-115)) then
tmp = x
else if (y <= 4.1d-126) then
tmp = t_1
else if (y <= 7.1d-99) then
tmp = x
else if (y <= 4.5d-24) then
tmp = t_1
else if (y <= 2.5d+24) then
tmp = z * x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * -y;
double tmp;
if (y <= -1.1e+120) {
tmp = y * t;
} else if (y <= -7.5e+91) {
tmp = t_2;
} else if (y <= -3.8e+56) {
tmp = y * t;
} else if (y <= -245.0) {
tmp = t_1;
} else if (y <= -1.75e-18) {
tmp = z * x;
} else if (y <= -3e-115) {
tmp = x;
} else if (y <= 4.1e-126) {
tmp = t_1;
} else if (y <= 7.1e-99) {
tmp = x;
} else if (y <= 4.5e-24) {
tmp = t_1;
} else if (y <= 2.5e+24) {
tmp = z * x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t t_2 = x * -y tmp = 0 if y <= -1.1e+120: tmp = y * t elif y <= -7.5e+91: tmp = t_2 elif y <= -3.8e+56: tmp = y * t elif y <= -245.0: tmp = t_1 elif y <= -1.75e-18: tmp = z * x elif y <= -3e-115: tmp = x elif y <= 4.1e-126: tmp = t_1 elif y <= 7.1e-99: tmp = x elif y <= 4.5e-24: tmp = t_1 elif y <= 2.5e+24: tmp = z * x else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) t_2 = Float64(x * Float64(-y)) tmp = 0.0 if (y <= -1.1e+120) tmp = Float64(y * t); elseif (y <= -7.5e+91) tmp = t_2; elseif (y <= -3.8e+56) tmp = Float64(y * t); elseif (y <= -245.0) tmp = t_1; elseif (y <= -1.75e-18) tmp = Float64(z * x); elseif (y <= -3e-115) tmp = x; elseif (y <= 4.1e-126) tmp = t_1; elseif (y <= 7.1e-99) tmp = x; elseif (y <= 4.5e-24) tmp = t_1; elseif (y <= 2.5e+24) tmp = Float64(z * x); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; t_2 = x * -y; tmp = 0.0; if (y <= -1.1e+120) tmp = y * t; elseif (y <= -7.5e+91) tmp = t_2; elseif (y <= -3.8e+56) tmp = y * t; elseif (y <= -245.0) tmp = t_1; elseif (y <= -1.75e-18) tmp = z * x; elseif (y <= -3e-115) tmp = x; elseif (y <= 4.1e-126) tmp = t_1; elseif (y <= 7.1e-99) tmp = x; elseif (y <= 4.5e-24) tmp = t_1; elseif (y <= 2.5e+24) tmp = z * x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(x * (-y)), $MachinePrecision]}, If[LessEqual[y, -1.1e+120], N[(y * t), $MachinePrecision], If[LessEqual[y, -7.5e+91], t$95$2, If[LessEqual[y, -3.8e+56], N[(y * t), $MachinePrecision], If[LessEqual[y, -245.0], t$95$1, If[LessEqual[y, -1.75e-18], N[(z * x), $MachinePrecision], If[LessEqual[y, -3e-115], x, If[LessEqual[y, 4.1e-126], t$95$1, If[LessEqual[y, 7.1e-99], x, If[LessEqual[y, 4.5e-24], t$95$1, If[LessEqual[y, 2.5e+24], N[(z * x), $MachinePrecision], t$95$2]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
t_2 := x \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+120}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+56}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -245:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-18}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-115}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{-99}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+24}:\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.1000000000000001e120 or -7.50000000000000033e91 < y < -3.79999999999999996e56Initial program 100.0%
Taylor expanded in x around 0 95.3%
fma-def95.3%
+-commutative95.3%
mul-1-neg95.3%
neg-sub095.3%
associate-+l-95.3%
associate--r+95.3%
+-commutative95.3%
neg-sub095.3%
distribute-rgt-neg-in95.3%
mul-1-neg95.3%
mul-1-neg95.3%
distribute-rgt-neg-in95.3%
neg-sub095.3%
+-commutative95.3%
associate--r+95.3%
associate-+l-95.3%
neg-sub095.3%
mul-1-neg95.3%
+-commutative95.3%
mul-1-neg95.3%
Simplified95.3%
Taylor expanded in z around 0 84.4%
fma-def84.4%
Simplified84.4%
Taylor expanded in t around inf 66.3%
*-commutative66.3%
Simplified66.3%
if -1.1000000000000001e120 < y < -7.50000000000000033e91 or 2.50000000000000023e24 < y Initial program 100.0%
Taylor expanded in x around 0 91.1%
fma-def97.0%
+-commutative97.0%
mul-1-neg97.0%
neg-sub097.0%
associate-+l-97.0%
associate--r+97.0%
+-commutative97.0%
neg-sub097.0%
distribute-rgt-neg-in97.0%
mul-1-neg97.0%
mul-1-neg97.0%
distribute-rgt-neg-in97.0%
neg-sub097.0%
+-commutative97.0%
associate--r+97.0%
associate-+l-97.0%
neg-sub097.0%
mul-1-neg97.0%
+-commutative97.0%
mul-1-neg97.0%
Simplified97.0%
Taylor expanded in y around inf 89.9%
neg-mul-189.9%
sub-neg89.9%
Simplified89.9%
Taylor expanded in t around 0 58.5%
associate-*r*58.5%
neg-mul-158.5%
*-commutative58.5%
Simplified58.5%
if -3.79999999999999996e56 < y < -245 or -3.0000000000000002e-115 < y < 4.0999999999999997e-126 or 7.09999999999999994e-99 < y < 4.4999999999999997e-24Initial program 100.0%
Taylor expanded in x around 0 95.9%
fma-def95.9%
+-commutative95.9%
mul-1-neg95.9%
neg-sub095.9%
associate-+l-95.9%
associate--r+95.9%
+-commutative95.9%
neg-sub095.9%
distribute-rgt-neg-in95.9%
mul-1-neg95.9%
mul-1-neg95.9%
distribute-rgt-neg-in95.9%
neg-sub095.9%
+-commutative95.9%
associate--r+95.9%
associate-+l-95.9%
neg-sub095.9%
mul-1-neg95.9%
+-commutative95.9%
mul-1-neg95.9%
Simplified95.9%
Taylor expanded in t around inf 57.5%
Taylor expanded in y around 0 52.7%
associate-*r*52.7%
mul-1-neg52.7%
Simplified52.7%
if -245 < y < -1.7499999999999999e-18 or 4.4999999999999997e-24 < y < 2.50000000000000023e24Initial program 100.0%
Taylor expanded in x around 0 94.7%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 69.0%
mul-1-neg69.0%
sub-neg69.0%
Simplified69.0%
Taylor expanded in x around inf 59.2%
if -1.7499999999999999e-18 < y < -3.0000000000000002e-115 or 4.0999999999999997e-126 < y < 7.09999999999999994e-99Initial program 99.9%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in y around 0 57.3%
Final simplification57.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* z (- x t))) (t_3 (* x (- 1.0 y))))
(if (<= z -0.0019)
t_2
(if (<= z -8e-171)
t_3
(if (<= z -3.2e-231)
t_1
(if (<= z 1.35e-293)
t_3
(if (<= z 1.05e-86)
t_1
(if (<= z 4.8e+122) (* (- y z) t) t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = z * (x - t);
double t_3 = x * (1.0 - y);
double tmp;
if (z <= -0.0019) {
tmp = t_2;
} else if (z <= -8e-171) {
tmp = t_3;
} else if (z <= -3.2e-231) {
tmp = t_1;
} else if (z <= 1.35e-293) {
tmp = t_3;
} else if (z <= 1.05e-86) {
tmp = t_1;
} else if (z <= 4.8e+122) {
tmp = (y - z) * t;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y * (t - x)
t_2 = z * (x - t)
t_3 = x * (1.0d0 - y)
if (z <= (-0.0019d0)) then
tmp = t_2
else if (z <= (-8d-171)) then
tmp = t_3
else if (z <= (-3.2d-231)) then
tmp = t_1
else if (z <= 1.35d-293) then
tmp = t_3
else if (z <= 1.05d-86) then
tmp = t_1
else if (z <= 4.8d+122) then
tmp = (y - z) * t
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = z * (x - t);
double t_3 = x * (1.0 - y);
double tmp;
if (z <= -0.0019) {
tmp = t_2;
} else if (z <= -8e-171) {
tmp = t_3;
} else if (z <= -3.2e-231) {
tmp = t_1;
} else if (z <= 1.35e-293) {
tmp = t_3;
} else if (z <= 1.05e-86) {
tmp = t_1;
} else if (z <= 4.8e+122) {
tmp = (y - z) * t;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = z * (x - t) t_3 = x * (1.0 - y) tmp = 0 if z <= -0.0019: tmp = t_2 elif z <= -8e-171: tmp = t_3 elif z <= -3.2e-231: tmp = t_1 elif z <= 1.35e-293: tmp = t_3 elif z <= 1.05e-86: tmp = t_1 elif z <= 4.8e+122: tmp = (y - z) * t else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) t_2 = Float64(z * Float64(x - t)) t_3 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (z <= -0.0019) tmp = t_2; elseif (z <= -8e-171) tmp = t_3; elseif (z <= -3.2e-231) tmp = t_1; elseif (z <= 1.35e-293) tmp = t_3; elseif (z <= 1.05e-86) tmp = t_1; elseif (z <= 4.8e+122) tmp = Float64(Float64(y - z) * t); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); t_2 = z * (x - t); t_3 = x * (1.0 - y); tmp = 0.0; if (z <= -0.0019) tmp = t_2; elseif (z <= -8e-171) tmp = t_3; elseif (z <= -3.2e-231) tmp = t_1; elseif (z <= 1.35e-293) tmp = t_3; elseif (z <= 1.05e-86) tmp = t_1; elseif (z <= 4.8e+122) tmp = (y - z) * t; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0019], t$95$2, If[LessEqual[z, -8e-171], t$95$3, If[LessEqual[z, -3.2e-231], t$95$1, If[LessEqual[z, 1.35e-293], t$95$3, If[LessEqual[z, 1.05e-86], t$95$1, If[LessEqual[z, 4.8e+122], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := z \cdot \left(x - t\right)\\
t_3 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -0.0019:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-171}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-293}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+122}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -0.0019 or 4.8000000000000004e122 < z Initial program 100.0%
Taylor expanded in x around 0 91.2%
fma-def96.1%
+-commutative96.1%
mul-1-neg96.1%
neg-sub096.1%
associate-+l-96.1%
associate--r+96.1%
+-commutative96.1%
neg-sub096.1%
distribute-rgt-neg-in96.1%
mul-1-neg96.1%
mul-1-neg96.1%
distribute-rgt-neg-in96.1%
neg-sub096.1%
+-commutative96.1%
associate--r+96.1%
associate-+l-96.1%
neg-sub096.1%
mul-1-neg96.1%
+-commutative96.1%
mul-1-neg96.1%
Simplified96.1%
Taylor expanded in z around inf 87.1%
mul-1-neg87.1%
sub-neg87.1%
Simplified87.1%
if -0.0019 < z < -7.9999999999999999e-171 or -3.20000000000000008e-231 < z < 1.35000000000000001e-293Initial program 100.0%
Taylor expanded in x around 0 98.2%
fma-def98.2%
+-commutative98.2%
mul-1-neg98.2%
neg-sub098.2%
associate-+l-98.2%
associate--r+98.2%
+-commutative98.2%
neg-sub098.2%
distribute-rgt-neg-in98.2%
mul-1-neg98.2%
mul-1-neg98.2%
distribute-rgt-neg-in98.2%
neg-sub098.2%
+-commutative98.2%
associate--r+98.2%
associate-+l-98.2%
neg-sub098.2%
mul-1-neg98.2%
+-commutative98.2%
mul-1-neg98.2%
Simplified98.2%
Taylor expanded in z around 0 94.8%
fma-def94.8%
Simplified94.8%
Taylor expanded in t around 0 81.3%
if -7.9999999999999999e-171 < z < -3.20000000000000008e-231 or 1.35000000000000001e-293 < z < 1.05e-86Initial program 99.9%
Taylor expanded in x around 0 94.3%
fma-def94.3%
+-commutative94.3%
mul-1-neg94.3%
neg-sub094.3%
associate-+l-94.3%
associate--r+94.3%
+-commutative94.3%
neg-sub094.3%
distribute-rgt-neg-in94.3%
mul-1-neg94.3%
mul-1-neg94.3%
distribute-rgt-neg-in94.3%
neg-sub094.3%
+-commutative94.3%
associate--r+94.3%
associate-+l-94.3%
neg-sub094.3%
mul-1-neg94.3%
+-commutative94.3%
mul-1-neg94.3%
Simplified94.3%
Taylor expanded in y around inf 76.5%
neg-mul-176.5%
sub-neg76.5%
Simplified76.5%
if 1.05e-86 < z < 4.8000000000000004e122Initial program 99.9%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 64.7%
Final simplification79.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) t)))
(if (<= (- y z) -5e-19)
t_1
(if (<= (- y z) 4e-26)
x
(if (<= (- y z) 2e+234)
t_1
(if (<= (- y z) 4e+291) (* x (- y)) (* z x)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if ((y - z) <= -5e-19) {
tmp = t_1;
} else if ((y - z) <= 4e-26) {
tmp = x;
} else if ((y - z) <= 2e+234) {
tmp = t_1;
} else if ((y - z) <= 4e+291) {
tmp = x * -y;
} else {
tmp = z * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * t
if ((y - z) <= (-5d-19)) then
tmp = t_1
else if ((y - z) <= 4d-26) then
tmp = x
else if ((y - z) <= 2d+234) then
tmp = t_1
else if ((y - z) <= 4d+291) then
tmp = x * -y
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if ((y - z) <= -5e-19) {
tmp = t_1;
} else if ((y - z) <= 4e-26) {
tmp = x;
} else if ((y - z) <= 2e+234) {
tmp = t_1;
} else if ((y - z) <= 4e+291) {
tmp = x * -y;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t tmp = 0 if (y - z) <= -5e-19: tmp = t_1 elif (y - z) <= 4e-26: tmp = x elif (y - z) <= 2e+234: tmp = t_1 elif (y - z) <= 4e+291: tmp = x * -y else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) tmp = 0.0 if (Float64(y - z) <= -5e-19) tmp = t_1; elseif (Float64(y - z) <= 4e-26) tmp = x; elseif (Float64(y - z) <= 2e+234) tmp = t_1; elseif (Float64(y - z) <= 4e+291) tmp = Float64(x * Float64(-y)); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; tmp = 0.0; if ((y - z) <= -5e-19) tmp = t_1; elseif ((y - z) <= 4e-26) tmp = x; elseif ((y - z) <= 2e+234) tmp = t_1; elseif ((y - z) <= 4e+291) tmp = x * -y; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(y - z), $MachinePrecision], -5e-19], t$95$1, If[LessEqual[N[(y - z), $MachinePrecision], 4e-26], x, If[LessEqual[N[(y - z), $MachinePrecision], 2e+234], t$95$1, If[LessEqual[N[(y - z), $MachinePrecision], 4e+291], N[(x * (-y)), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;y - z \leq -5 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y - z \leq 4 \cdot 10^{-26}:\\
\;\;\;\;x\\
\mathbf{elif}\;y - z \leq 2 \cdot 10^{+234}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y - z \leq 4 \cdot 10^{+291}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if (-.f64 y z) < -5.0000000000000004e-19 or 4.0000000000000002e-26 < (-.f64 y z) < 2.00000000000000004e234Initial program 100.0%
Taylor expanded in x around 0 94.3%
fma-def97.2%
+-commutative97.2%
mul-1-neg97.2%
neg-sub097.2%
associate-+l-97.2%
associate--r+97.2%
+-commutative97.2%
neg-sub097.2%
distribute-rgt-neg-in97.2%
mul-1-neg97.2%
mul-1-neg97.2%
distribute-rgt-neg-in97.2%
neg-sub097.2%
+-commutative97.2%
associate--r+97.2%
associate-+l-97.2%
neg-sub097.2%
mul-1-neg97.2%
+-commutative97.2%
mul-1-neg97.2%
Simplified97.2%
Taylor expanded in t around inf 59.7%
if -5.0000000000000004e-19 < (-.f64 y z) < 4.0000000000000002e-26Initial program 100.0%
Taylor expanded in y around inf 86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in y around 0 72.5%
if 2.00000000000000004e234 < (-.f64 y z) < 3.9999999999999998e291Initial program 100.0%
Taylor expanded in x around 0 87.5%
fma-def87.5%
+-commutative87.5%
mul-1-neg87.5%
neg-sub087.5%
associate-+l-87.5%
associate--r+87.5%
+-commutative87.5%
neg-sub087.5%
distribute-rgt-neg-in87.5%
mul-1-neg87.5%
mul-1-neg87.5%
distribute-rgt-neg-in87.5%
neg-sub087.5%
+-commutative87.5%
associate--r+87.5%
associate-+l-87.5%
neg-sub087.5%
mul-1-neg87.5%
+-commutative87.5%
mul-1-neg87.5%
Simplified87.5%
Taylor expanded in y around inf 75.6%
neg-mul-175.6%
sub-neg75.6%
Simplified75.6%
Taylor expanded in t around 0 59.5%
associate-*r*59.5%
neg-mul-159.5%
*-commutative59.5%
Simplified59.5%
if 3.9999999999999998e291 < (-.f64 y z) Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 80.8%
mul-1-neg80.8%
sub-neg80.8%
Simplified80.8%
Taylor expanded in x around inf 80.8%
Final simplification62.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -6.2e+31)
t_1
(if (<= y -0.135)
(* (- y z) t)
(if (<= y -1.55e-30)
(+ x (* z x))
(if (<= y 9e-103)
(- x (* z t))
(if (<= y 2.05e+24) (* z (- x t)) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -6.2e+31) {
tmp = t_1;
} else if (y <= -0.135) {
tmp = (y - z) * t;
} else if (y <= -1.55e-30) {
tmp = x + (z * x);
} else if (y <= 9e-103) {
tmp = x - (z * t);
} else if (y <= 2.05e+24) {
tmp = z * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-6.2d+31)) then
tmp = t_1
else if (y <= (-0.135d0)) then
tmp = (y - z) * t
else if (y <= (-1.55d-30)) then
tmp = x + (z * x)
else if (y <= 9d-103) then
tmp = x - (z * t)
else if (y <= 2.05d+24) then
tmp = z * (x - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -6.2e+31) {
tmp = t_1;
} else if (y <= -0.135) {
tmp = (y - z) * t;
} else if (y <= -1.55e-30) {
tmp = x + (z * x);
} else if (y <= 9e-103) {
tmp = x - (z * t);
} else if (y <= 2.05e+24) {
tmp = z * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -6.2e+31: tmp = t_1 elif y <= -0.135: tmp = (y - z) * t elif y <= -1.55e-30: tmp = x + (z * x) elif y <= 9e-103: tmp = x - (z * t) elif y <= 2.05e+24: tmp = z * (x - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -6.2e+31) tmp = t_1; elseif (y <= -0.135) tmp = Float64(Float64(y - z) * t); elseif (y <= -1.55e-30) tmp = Float64(x + Float64(z * x)); elseif (y <= 9e-103) tmp = Float64(x - Float64(z * t)); elseif (y <= 2.05e+24) tmp = Float64(z * Float64(x - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -6.2e+31) tmp = t_1; elseif (y <= -0.135) tmp = (y - z) * t; elseif (y <= -1.55e-30) tmp = x + (z * x); elseif (y <= 9e-103) tmp = x - (z * t); elseif (y <= 2.05e+24) tmp = z * (x - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+31], t$95$1, If[LessEqual[y, -0.135], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -1.55e-30], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-103], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+24], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -0.135:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{-30}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-103}:\\
\;\;\;\;x - z \cdot t\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+24}:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -6.2000000000000004e31 or 2.05e24 < y Initial program 100.0%
Taylor expanded in x around 0 93.0%
fma-def96.5%
+-commutative96.5%
mul-1-neg96.5%
neg-sub096.5%
associate-+l-96.5%
associate--r+96.5%
+-commutative96.5%
neg-sub096.5%
distribute-rgt-neg-in96.5%
mul-1-neg96.5%
mul-1-neg96.5%
distribute-rgt-neg-in96.5%
neg-sub096.5%
+-commutative96.5%
associate--r+96.5%
associate-+l-96.5%
neg-sub096.5%
mul-1-neg96.5%
+-commutative96.5%
mul-1-neg96.5%
Simplified96.5%
Taylor expanded in y around inf 88.9%
neg-mul-188.9%
sub-neg88.9%
Simplified88.9%
if -6.2000000000000004e31 < y < -0.13500000000000001Initial program 100.0%
Taylor expanded in x around 0 83.1%
fma-def83.3%
+-commutative83.3%
mul-1-neg83.3%
neg-sub083.3%
associate-+l-83.3%
associate--r+83.3%
+-commutative83.3%
neg-sub083.3%
distribute-rgt-neg-in83.3%
mul-1-neg83.3%
mul-1-neg83.3%
distribute-rgt-neg-in83.3%
neg-sub083.3%
+-commutative83.3%
associate--r+83.3%
associate-+l-83.3%
neg-sub083.3%
mul-1-neg83.3%
+-commutative83.3%
mul-1-neg83.3%
Simplified83.3%
Taylor expanded in t around inf 99.7%
if -0.13500000000000001 < y < -1.54999999999999995e-30Initial program 100.0%
Taylor expanded in y around 0 79.9%
mul-1-neg79.9%
unsub-neg79.9%
Simplified79.9%
Taylor expanded in t around 0 79.9%
mul-1-neg79.9%
distribute-lft-neg-out79.9%
*-commutative79.9%
Simplified79.9%
if -1.54999999999999995e-30 < y < 9e-103Initial program 100.0%
Taylor expanded in y around 0 96.2%
mul-1-neg96.2%
unsub-neg96.2%
Simplified96.2%
Taylor expanded in t around inf 75.5%
*-commutative75.5%
Simplified75.5%
if 9e-103 < y < 2.05e24Initial program 100.0%
Taylor expanded in x around 0 96.2%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 69.9%
mul-1-neg69.9%
sub-neg69.9%
Simplified69.9%
Final simplification81.7%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.2e-12)
(* z x)
(if (<= z -1.5e-54)
x
(if (<= z -3.8e-256)
(* y t)
(if (<= z 1.45e-295) x (if (<= z 3.6e+123) (* y t) (* z x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e-12) {
tmp = z * x;
} else if (z <= -1.5e-54) {
tmp = x;
} else if (z <= -3.8e-256) {
tmp = y * t;
} else if (z <= 1.45e-295) {
tmp = x;
} else if (z <= 3.6e+123) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-7.2d-12)) then
tmp = z * x
else if (z <= (-1.5d-54)) then
tmp = x
else if (z <= (-3.8d-256)) then
tmp = y * t
else if (z <= 1.45d-295) then
tmp = x
else if (z <= 3.6d+123) then
tmp = y * t
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e-12) {
tmp = z * x;
} else if (z <= -1.5e-54) {
tmp = x;
} else if (z <= -3.8e-256) {
tmp = y * t;
} else if (z <= 1.45e-295) {
tmp = x;
} else if (z <= 3.6e+123) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.2e-12: tmp = z * x elif z <= -1.5e-54: tmp = x elif z <= -3.8e-256: tmp = y * t elif z <= 1.45e-295: tmp = x elif z <= 3.6e+123: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.2e-12) tmp = Float64(z * x); elseif (z <= -1.5e-54) tmp = x; elseif (z <= -3.8e-256) tmp = Float64(y * t); elseif (z <= 1.45e-295) tmp = x; elseif (z <= 3.6e+123) tmp = Float64(y * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.2e-12) tmp = z * x; elseif (z <= -1.5e-54) tmp = x; elseif (z <= -3.8e-256) tmp = y * t; elseif (z <= 1.45e-295) tmp = x; elseif (z <= 3.6e+123) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.2e-12], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.5e-54], x, If[LessEqual[z, -3.8e-256], N[(y * t), $MachinePrecision], If[LessEqual[z, 1.45e-295], x, If[LessEqual[z, 3.6e+123], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-12}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-54}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-256}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-295}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+123}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -7.2e-12 or 3.59999999999999998e123 < z Initial program 100.0%
Taylor expanded in x around 0 91.3%
fma-def96.2%
+-commutative96.2%
mul-1-neg96.2%
neg-sub096.2%
associate-+l-96.2%
associate--r+96.2%
+-commutative96.2%
neg-sub096.2%
distribute-rgt-neg-in96.2%
mul-1-neg96.2%
mul-1-neg96.2%
distribute-rgt-neg-in96.2%
neg-sub096.2%
+-commutative96.2%
associate--r+96.2%
associate-+l-96.2%
neg-sub096.2%
mul-1-neg96.2%
+-commutative96.2%
mul-1-neg96.2%
Simplified96.2%
Taylor expanded in z around inf 85.6%
mul-1-neg85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in x around inf 41.7%
if -7.2e-12 < z < -1.50000000000000005e-54 or -3.79999999999999977e-256 < z < 1.45000000000000008e-295Initial program 100.0%
Taylor expanded in y around inf 93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in y around 0 58.5%
if -1.50000000000000005e-54 < z < -3.79999999999999977e-256 or 1.45000000000000008e-295 < z < 3.59999999999999998e123Initial program 99.9%
Taylor expanded in x around 0 96.7%
fma-def96.8%
+-commutative96.8%
mul-1-neg96.8%
neg-sub096.8%
associate-+l-96.8%
associate--r+96.8%
+-commutative96.8%
neg-sub096.8%
distribute-rgt-neg-in96.8%
mul-1-neg96.8%
mul-1-neg96.8%
distribute-rgt-neg-in96.8%
neg-sub096.8%
+-commutative96.8%
associate--r+96.8%
associate-+l-96.8%
neg-sub096.8%
mul-1-neg96.8%
+-commutative96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in z around 0 81.1%
fma-def81.1%
Simplified81.1%
Taylor expanded in t around inf 43.4%
*-commutative43.4%
Simplified43.4%
Final simplification44.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -0.0116)
(* z x)
(if (<= z -3.5e-120)
(* x (- y))
(if (<= z -2.45e-237)
(* y t)
(if (<= z 3.7e-295) x (if (<= z 7.8e+122) (* y t) (* z x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.0116) {
tmp = z * x;
} else if (z <= -3.5e-120) {
tmp = x * -y;
} else if (z <= -2.45e-237) {
tmp = y * t;
} else if (z <= 3.7e-295) {
tmp = x;
} else if (z <= 7.8e+122) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-0.0116d0)) then
tmp = z * x
else if (z <= (-3.5d-120)) then
tmp = x * -y
else if (z <= (-2.45d-237)) then
tmp = y * t
else if (z <= 3.7d-295) then
tmp = x
else if (z <= 7.8d+122) then
tmp = y * t
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.0116) {
tmp = z * x;
} else if (z <= -3.5e-120) {
tmp = x * -y;
} else if (z <= -2.45e-237) {
tmp = y * t;
} else if (z <= 3.7e-295) {
tmp = x;
} else if (z <= 7.8e+122) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -0.0116: tmp = z * x elif z <= -3.5e-120: tmp = x * -y elif z <= -2.45e-237: tmp = y * t elif z <= 3.7e-295: tmp = x elif z <= 7.8e+122: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -0.0116) tmp = Float64(z * x); elseif (z <= -3.5e-120) tmp = Float64(x * Float64(-y)); elseif (z <= -2.45e-237) tmp = Float64(y * t); elseif (z <= 3.7e-295) tmp = x; elseif (z <= 7.8e+122) tmp = Float64(y * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -0.0116) tmp = z * x; elseif (z <= -3.5e-120) tmp = x * -y; elseif (z <= -2.45e-237) tmp = y * t; elseif (z <= 3.7e-295) tmp = x; elseif (z <= 7.8e+122) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.0116], N[(z * x), $MachinePrecision], If[LessEqual[z, -3.5e-120], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, -2.45e-237], N[(y * t), $MachinePrecision], If[LessEqual[z, 3.7e-295], x, If[LessEqual[z, 7.8e+122], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0116:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-120}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-237}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-295}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+122}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -0.0116 or 7.7999999999999999e122 < z Initial program 100.0%
Taylor expanded in x around 0 91.2%
fma-def96.1%
+-commutative96.1%
mul-1-neg96.1%
neg-sub096.1%
associate-+l-96.1%
associate--r+96.1%
+-commutative96.1%
neg-sub096.1%
distribute-rgt-neg-in96.1%
mul-1-neg96.1%
mul-1-neg96.1%
distribute-rgt-neg-in96.1%
neg-sub096.1%
+-commutative96.1%
associate--r+96.1%
associate-+l-96.1%
neg-sub096.1%
mul-1-neg96.1%
+-commutative96.1%
mul-1-neg96.1%
Simplified96.1%
Taylor expanded in z around inf 87.1%
mul-1-neg87.1%
sub-neg87.1%
Simplified87.1%
Taylor expanded in x around inf 42.4%
if -0.0116 < z < -3.5e-120Initial program 100.0%
Taylor expanded in x around 0 95.7%
fma-def95.7%
+-commutative95.7%
mul-1-neg95.7%
neg-sub095.7%
associate-+l-95.7%
associate--r+95.7%
+-commutative95.7%
neg-sub095.7%
distribute-rgt-neg-in95.7%
mul-1-neg95.7%
mul-1-neg95.7%
distribute-rgt-neg-in95.7%
neg-sub095.7%
+-commutative95.7%
associate--r+95.7%
associate-+l-95.7%
neg-sub095.7%
mul-1-neg95.7%
+-commutative95.7%
mul-1-neg95.7%
Simplified95.7%
Taylor expanded in y around inf 60.0%
neg-mul-160.0%
sub-neg60.0%
Simplified60.0%
Taylor expanded in t around 0 47.3%
associate-*r*47.3%
neg-mul-147.3%
*-commutative47.3%
Simplified47.3%
if -3.5e-120 < z < -2.45e-237 or 3.6999999999999999e-295 < z < 7.7999999999999999e122Initial program 99.9%
Taylor expanded in x around 0 97.2%
fma-def97.2%
+-commutative97.2%
mul-1-neg97.2%
neg-sub097.2%
associate-+l-97.2%
associate--r+97.2%
+-commutative97.2%
neg-sub097.2%
distribute-rgt-neg-in97.2%
mul-1-neg97.2%
mul-1-neg97.2%
distribute-rgt-neg-in97.2%
neg-sub097.2%
+-commutative97.2%
associate--r+97.2%
associate-+l-97.2%
neg-sub097.2%
mul-1-neg97.2%
+-commutative97.2%
mul-1-neg97.2%
Simplified97.2%
Taylor expanded in z around 0 79.1%
fma-def79.1%
Simplified79.1%
Taylor expanded in t around inf 45.2%
*-commutative45.2%
Simplified45.2%
if -2.45e-237 < z < 3.6999999999999999e-295Initial program 100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 49.3%
Final simplification44.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -0.0116)
t_1
(if (<= z 1e-99)
(+ x (* y (- t x)))
(if (<= z 4.8e+122) (+ x (* (- y z) t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -0.0116) {
tmp = t_1;
} else if (z <= 1e-99) {
tmp = x + (y * (t - x));
} else if (z <= 4.8e+122) {
tmp = x + ((y - z) * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (x - t)
if (z <= (-0.0116d0)) then
tmp = t_1
else if (z <= 1d-99) then
tmp = x + (y * (t - x))
else if (z <= 4.8d+122) then
tmp = x + ((y - z) * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -0.0116) {
tmp = t_1;
} else if (z <= 1e-99) {
tmp = x + (y * (t - x));
} else if (z <= 4.8e+122) {
tmp = x + ((y - z) * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -0.0116: tmp = t_1 elif z <= 1e-99: tmp = x + (y * (t - x)) elif z <= 4.8e+122: tmp = x + ((y - z) * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -0.0116) tmp = t_1; elseif (z <= 1e-99) tmp = Float64(x + Float64(y * Float64(t - x))); elseif (z <= 4.8e+122) tmp = Float64(x + Float64(Float64(y - z) * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -0.0116) tmp = t_1; elseif (z <= 1e-99) tmp = x + (y * (t - x)); elseif (z <= 4.8e+122) tmp = x + ((y - z) * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0116], t$95$1, If[LessEqual[z, 1e-99], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e+122], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -0.0116:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 10^{-99}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+122}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -0.0116 or 4.8000000000000004e122 < z Initial program 100.0%
Taylor expanded in x around 0 91.2%
fma-def96.1%
+-commutative96.1%
mul-1-neg96.1%
neg-sub096.1%
associate-+l-96.1%
associate--r+96.1%
+-commutative96.1%
neg-sub096.1%
distribute-rgt-neg-in96.1%
mul-1-neg96.1%
mul-1-neg96.1%
distribute-rgt-neg-in96.1%
neg-sub096.1%
+-commutative96.1%
associate--r+96.1%
associate-+l-96.1%
neg-sub096.1%
mul-1-neg96.1%
+-commutative96.1%
mul-1-neg96.1%
Simplified96.1%
Taylor expanded in z around inf 87.1%
mul-1-neg87.1%
sub-neg87.1%
Simplified87.1%
if -0.0116 < z < 1e-99Initial program 100.0%
Taylor expanded in y around inf 96.5%
*-commutative96.5%
Simplified96.5%
if 1e-99 < z < 4.8000000000000004e122Initial program 99.9%
Taylor expanded in t around inf 71.8%
Final simplification88.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -5.2e+31)
t_1
(if (<= y 5.4e-100)
(- x (* z t))
(if (<= y 3.25e+24) (* z (- x t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -5.2e+31) {
tmp = t_1;
} else if (y <= 5.4e-100) {
tmp = x - (z * t);
} else if (y <= 3.25e+24) {
tmp = z * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-5.2d+31)) then
tmp = t_1
else if (y <= 5.4d-100) then
tmp = x - (z * t)
else if (y <= 3.25d+24) then
tmp = z * (x - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -5.2e+31) {
tmp = t_1;
} else if (y <= 5.4e-100) {
tmp = x - (z * t);
} else if (y <= 3.25e+24) {
tmp = z * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -5.2e+31: tmp = t_1 elif y <= 5.4e-100: tmp = x - (z * t) elif y <= 3.25e+24: tmp = z * (x - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -5.2e+31) tmp = t_1; elseif (y <= 5.4e-100) tmp = Float64(x - Float64(z * t)); elseif (y <= 3.25e+24) tmp = Float64(z * Float64(x - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -5.2e+31) tmp = t_1; elseif (y <= 5.4e-100) tmp = x - (z * t); elseif (y <= 3.25e+24) tmp = z * (x - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+31], t$95$1, If[LessEqual[y, 5.4e-100], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.25e+24], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-100}:\\
\;\;\;\;x - z \cdot t\\
\mathbf{elif}\;y \leq 3.25 \cdot 10^{+24}:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.2e31 or 3.2499999999999998e24 < y Initial program 100.0%
Taylor expanded in x around 0 93.0%
fma-def96.5%
+-commutative96.5%
mul-1-neg96.5%
neg-sub096.5%
associate-+l-96.5%
associate--r+96.5%
+-commutative96.5%
neg-sub096.5%
distribute-rgt-neg-in96.5%
mul-1-neg96.5%
mul-1-neg96.5%
distribute-rgt-neg-in96.5%
neg-sub096.5%
+-commutative96.5%
associate--r+96.5%
associate-+l-96.5%
neg-sub096.5%
mul-1-neg96.5%
+-commutative96.5%
mul-1-neg96.5%
Simplified96.5%
Taylor expanded in y around inf 88.9%
neg-mul-188.9%
sub-neg88.9%
Simplified88.9%
if -5.2e31 < y < 5.40000000000000031e-100Initial program 100.0%
Taylor expanded in y around 0 94.1%
mul-1-neg94.1%
unsub-neg94.1%
Simplified94.1%
Taylor expanded in t around inf 73.0%
*-commutative73.0%
Simplified73.0%
if 5.40000000000000031e-100 < y < 3.2499999999999998e24Initial program 100.0%
Taylor expanded in x around 0 96.2%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 69.9%
mul-1-neg69.9%
sub-neg69.9%
Simplified69.9%
Final simplification79.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3e-8) (not (<= x 2.8e+79))) (* x (+ (- z y) 1.0)) (* (- y z) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3e-8) || !(x <= 2.8e+79)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = (y - z) * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-3d-8)) .or. (.not. (x <= 2.8d+79))) then
tmp = x * ((z - y) + 1.0d0)
else
tmp = (y - z) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3e-8) || !(x <= 2.8e+79)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = (y - z) * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3e-8) or not (x <= 2.8e+79): tmp = x * ((z - y) + 1.0) else: tmp = (y - z) * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3e-8) || !(x <= 2.8e+79)) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = Float64(Float64(y - z) * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3e-8) || ~((x <= 2.8e+79))) tmp = x * ((z - y) + 1.0); else tmp = (y - z) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3e-8], N[Not[LessEqual[x, 2.8e+79]], $MachinePrecision]], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-8} \lor \neg \left(x \leq 2.8 \cdot 10^{+79}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\end{array}
\end{array}
if x < -2.99999999999999973e-8 or 2.8000000000000001e79 < x Initial program 100.0%
Taylor expanded in x around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
Simplified86.0%
if -2.99999999999999973e-8 < x < 2.8000000000000001e79Initial program 100.0%
Taylor expanded in x around 0 98.4%
fma-def98.4%
+-commutative98.4%
mul-1-neg98.4%
neg-sub098.4%
associate-+l-98.4%
associate--r+98.4%
+-commutative98.4%
neg-sub098.4%
distribute-rgt-neg-in98.4%
mul-1-neg98.4%
mul-1-neg98.4%
distribute-rgt-neg-in98.4%
neg-sub098.4%
+-commutative98.4%
associate--r+98.4%
associate-+l-98.4%
neg-sub098.4%
mul-1-neg98.4%
+-commutative98.4%
mul-1-neg98.4%
Simplified98.4%
Taylor expanded in t around inf 76.1%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.65e+67) (not (<= x 5.8e+80))) (* x (+ (- z y) 1.0)) (+ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.65e+67) || !(x <= 5.8e+80)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x + ((y - z) * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.65d+67)) .or. (.not. (x <= 5.8d+80))) then
tmp = x * ((z - y) + 1.0d0)
else
tmp = x + ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.65e+67) || !(x <= 5.8e+80)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x + ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.65e+67) or not (x <= 5.8e+80): tmp = x * ((z - y) + 1.0) else: tmp = x + ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.65e+67) || !(x <= 5.8e+80)) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = Float64(x + Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.65e+67) || ~((x <= 5.8e+80))) tmp = x * ((z - y) + 1.0); else tmp = x + ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.65e+67], N[Not[LessEqual[x, 5.8e+80]], $MachinePrecision]], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.65 \cdot 10^{+67} \lor \neg \left(x \leq 5.8 \cdot 10^{+80}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\end{array}
\end{array}
if x < -2.65e67 or 5.79999999999999971e80 < x Initial program 100.0%
Taylor expanded in x around inf 89.1%
mul-1-neg89.1%
unsub-neg89.1%
Simplified89.1%
if -2.65e67 < x < 5.79999999999999971e80Initial program 100.0%
Taylor expanded in t around inf 84.1%
Final simplification86.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -2.05e+32)
t_1
(if (<= y 2.05e+24) (- x (* z (- t x))) (+ x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -2.05e+32) {
tmp = t_1;
} else if (y <= 2.05e+24) {
tmp = x - (z * (t - x));
} else {
tmp = x + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-2.05d+32)) then
tmp = t_1
else if (y <= 2.05d+24) then
tmp = x - (z * (t - x))
else
tmp = x + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -2.05e+32) {
tmp = t_1;
} else if (y <= 2.05e+24) {
tmp = x - (z * (t - x));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -2.05e+32: tmp = t_1 elif y <= 2.05e+24: tmp = x - (z * (t - x)) else: tmp = x + t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -2.05e+32) tmp = t_1; elseif (y <= 2.05e+24) tmp = Float64(x - Float64(z * Float64(t - x))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -2.05e+32) tmp = t_1; elseif (y <= 2.05e+24) tmp = x - (z * (t - x)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.05e+32], t$95$1, If[LessEqual[y, 2.05e+24], N[(x - N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+24}:\\
\;\;\;\;x - z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if y < -2.0499999999999999e32Initial program 100.0%
Taylor expanded in x around 0 91.2%
fma-def96.5%
+-commutative96.5%
mul-1-neg96.5%
neg-sub096.5%
associate-+l-96.5%
associate--r+96.5%
+-commutative96.5%
neg-sub096.5%
distribute-rgt-neg-in96.5%
mul-1-neg96.5%
mul-1-neg96.5%
distribute-rgt-neg-in96.5%
neg-sub096.5%
+-commutative96.5%
associate--r+96.5%
associate-+l-96.5%
neg-sub096.5%
mul-1-neg96.5%
+-commutative96.5%
mul-1-neg96.5%
Simplified96.5%
Taylor expanded in y around inf 86.5%
neg-mul-186.5%
sub-neg86.5%
Simplified86.5%
if -2.0499999999999999e32 < y < 2.05e24Initial program 100.0%
Taylor expanded in y around 0 90.4%
mul-1-neg90.4%
unsub-neg90.4%
Simplified90.4%
if 2.05e24 < y Initial program 99.9%
Taylor expanded in y around inf 91.4%
*-commutative91.4%
Simplified91.4%
Final simplification89.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4.4e+27) (not (<= t 3e+38))) (* (- y z) t) (* x (- 1.0 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.4e+27) || !(t <= 3e+38)) {
tmp = (y - z) * t;
} else {
tmp = x * (1.0 - y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-4.4d+27)) .or. (.not. (t <= 3d+38))) then
tmp = (y - z) * t
else
tmp = x * (1.0d0 - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.4e+27) || !(t <= 3e+38)) {
tmp = (y - z) * t;
} else {
tmp = x * (1.0 - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4.4e+27) or not (t <= 3e+38): tmp = (y - z) * t else: tmp = x * (1.0 - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4.4e+27) || !(t <= 3e+38)) tmp = Float64(Float64(y - z) * t); else tmp = Float64(x * Float64(1.0 - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -4.4e+27) || ~((t <= 3e+38))) tmp = (y - z) * t; else tmp = x * (1.0 - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4.4e+27], N[Not[LessEqual[t, 3e+38]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+27} \lor \neg \left(t \leq 3 \cdot 10^{+38}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if t < -4.3999999999999997e27 or 3.0000000000000001e38 < t Initial program 100.0%
Taylor expanded in x around 0 90.2%
fma-def94.0%
+-commutative94.0%
mul-1-neg94.0%
neg-sub094.0%
associate-+l-94.0%
associate--r+94.0%
+-commutative94.0%
neg-sub094.0%
distribute-rgt-neg-in94.0%
mul-1-neg94.0%
mul-1-neg94.0%
distribute-rgt-neg-in94.0%
neg-sub094.0%
+-commutative94.0%
associate--r+94.0%
associate-+l-94.0%
neg-sub094.0%
mul-1-neg94.0%
+-commutative94.0%
mul-1-neg94.0%
Simplified94.0%
Taylor expanded in t around inf 78.6%
if -4.3999999999999997e27 < t < 3.0000000000000001e38Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 65.9%
fma-def65.9%
Simplified65.9%
Taylor expanded in t around 0 56.3%
Final simplification67.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -7.2e-12) (not (<= z 0.038))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.2e-12) || !(z <= 0.038)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-7.2d-12)) .or. (.not. (z <= 0.038d0))) then
tmp = z * x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.2e-12) || !(z <= 0.038)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -7.2e-12) or not (z <= 0.038): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -7.2e-12) || !(z <= 0.038)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -7.2e-12) || ~((z <= 0.038))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7.2e-12], N[Not[LessEqual[z, 0.038]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-12} \lor \neg \left(z \leq 0.038\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.2e-12 or 0.0379999999999999991 < z Initial program 100.0%
Taylor expanded in x around 0 93.0%
fma-def96.9%
+-commutative96.9%
mul-1-neg96.9%
neg-sub096.9%
associate-+l-96.9%
associate--r+96.9%
+-commutative96.9%
neg-sub096.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
mul-1-neg96.9%
distribute-rgt-neg-in96.9%
neg-sub096.9%
+-commutative96.9%
associate--r+96.9%
associate-+l-96.9%
neg-sub096.9%
mul-1-neg96.9%
+-commutative96.9%
mul-1-neg96.9%
Simplified96.9%
Taylor expanded in z around inf 78.2%
mul-1-neg78.2%
sub-neg78.2%
Simplified78.2%
Taylor expanded in x around inf 38.4%
if -7.2e-12 < z < 0.0379999999999999991Initial program 100.0%
Taylor expanded in y around inf 92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in y around 0 31.1%
Final simplification34.8%
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in y around 0 16.9%
Final simplification16.9%
(FPCore (x y z t) :precision binary64 (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((t * (y - z)) + (-x * (y - z)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
def code(x, y, z, t): return x + ((t * (y - z)) + (-x * (y - z)))
function code(x, y, z, t) return Float64(x + Float64(Float64(t * Float64(y - z)) + Float64(Float64(-x) * Float64(y - z)))) end
function tmp = code(x, y, z, t) tmp = x + ((t * (y - z)) + (-x * (y - z))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] + N[((-x) * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)
\end{array}
herbie shell --seed 2024018
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:herbie-target
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))