
(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-define100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -6.8e-12)
t_1
(if (<= z 4.4e-280)
x
(if (<= z 1.45e-224)
(* y t)
(if (<= z 8.5e-217)
x
(if (<= z 9.5e-56)
(* y t)
(if (or (<= z 3.9e+52)
(and (not (<= z 1.92e+146)) (<= z 1.2e+229)))
t_1
(* z x)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -6.8e-12) {
tmp = t_1;
} else if (z <= 4.4e-280) {
tmp = x;
} else if (z <= 1.45e-224) {
tmp = y * t;
} else if (z <= 8.5e-217) {
tmp = x;
} else if (z <= 9.5e-56) {
tmp = y * t;
} else if ((z <= 3.9e+52) || (!(z <= 1.92e+146) && (z <= 1.2e+229))) {
tmp = t_1;
} 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 = z * -t
if (z <= (-6.8d-12)) then
tmp = t_1
else if (z <= 4.4d-280) then
tmp = x
else if (z <= 1.45d-224) then
tmp = y * t
else if (z <= 8.5d-217) then
tmp = x
else if (z <= 9.5d-56) then
tmp = y * t
else if ((z <= 3.9d+52) .or. (.not. (z <= 1.92d+146)) .and. (z <= 1.2d+229)) then
tmp = t_1
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 = z * -t;
double tmp;
if (z <= -6.8e-12) {
tmp = t_1;
} else if (z <= 4.4e-280) {
tmp = x;
} else if (z <= 1.45e-224) {
tmp = y * t;
} else if (z <= 8.5e-217) {
tmp = x;
} else if (z <= 9.5e-56) {
tmp = y * t;
} else if ((z <= 3.9e+52) || (!(z <= 1.92e+146) && (z <= 1.2e+229))) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -6.8e-12: tmp = t_1 elif z <= 4.4e-280: tmp = x elif z <= 1.45e-224: tmp = y * t elif z <= 8.5e-217: tmp = x elif z <= 9.5e-56: tmp = y * t elif (z <= 3.9e+52) or (not (z <= 1.92e+146) and (z <= 1.2e+229)): tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -6.8e-12) tmp = t_1; elseif (z <= 4.4e-280) tmp = x; elseif (z <= 1.45e-224) tmp = Float64(y * t); elseif (z <= 8.5e-217) tmp = x; elseif (z <= 9.5e-56) tmp = Float64(y * t); elseif ((z <= 3.9e+52) || (!(z <= 1.92e+146) && (z <= 1.2e+229))) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -6.8e-12) tmp = t_1; elseif (z <= 4.4e-280) tmp = x; elseif (z <= 1.45e-224) tmp = y * t; elseif (z <= 8.5e-217) tmp = x; elseif (z <= 9.5e-56) tmp = y * t; elseif ((z <= 3.9e+52) || (~((z <= 1.92e+146)) && (z <= 1.2e+229))) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -6.8e-12], t$95$1, If[LessEqual[z, 4.4e-280], x, If[LessEqual[z, 1.45e-224], N[(y * t), $MachinePrecision], If[LessEqual[z, 8.5e-217], x, If[LessEqual[z, 9.5e-56], N[(y * t), $MachinePrecision], If[Or[LessEqual[z, 3.9e+52], And[N[Not[LessEqual[z, 1.92e+146]], $MachinePrecision], LessEqual[z, 1.2e+229]]], t$95$1, N[(z * x), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-280}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-224}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-217}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-56}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+52} \lor \neg \left(z \leq 1.92 \cdot 10^{+146}\right) \land z \leq 1.2 \cdot 10^{+229}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -6.8000000000000001e-12 or 9.4999999999999991e-56 < z < 3.9e52 or 1.91999999999999993e146 < z < 1.2e229Initial program 100.0%
Taylor expanded in y around 0 75.9%
mul-1-neg75.9%
unsub-neg75.9%
Simplified75.9%
Taylor expanded in z around inf 73.7%
Taylor expanded in x around 0 52.7%
mul-1-neg52.7%
distribute-rgt-neg-in52.7%
Simplified52.7%
if -6.8000000000000001e-12 < z < 4.4000000000000002e-280 or 1.45e-224 < z < 8.4999999999999994e-217Initial program 100.0%
Taylor expanded in y around inf 93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in y around 0 54.8%
if 4.4000000000000002e-280 < z < 1.45e-224 or 8.4999999999999994e-217 < z < 9.4999999999999991e-56Initial program 99.9%
Taylor expanded in y around inf 95.5%
*-commutative95.5%
Simplified95.5%
*-commutative95.5%
sub-neg95.5%
distribute-lft-in91.0%
Applied egg-rr91.0%
associate-+r+91.0%
distribute-rgt-neg-out91.0%
unsub-neg91.0%
*-commutative91.0%
Applied egg-rr91.0%
Taylor expanded in x around 0 61.6%
if 3.9e52 < z < 1.91999999999999993e146 or 1.2e229 < z Initial program 100.0%
Taylor expanded in y around 0 85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
Taylor expanded in z around inf 85.2%
Taylor expanded in x around inf 71.0%
Final simplification57.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))) (t_2 (* x (- 1.0 y))))
(if (<= z -1.3e+91)
t_1
(if (<= z 4.2e-278)
t_2
(if (<= z 2.1e-233)
(* y t)
(if (<= z 2.45e-213)
t_2
(if (<= z 2.7e-116)
(* y t)
(if (<= z 2e+51)
t_2
(if (<= z 1.45e+148)
(* x (+ z 1.0))
(if (<= z 4.6e+228) t_1 (* z x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * (1.0 - y);
double tmp;
if (z <= -1.3e+91) {
tmp = t_1;
} else if (z <= 4.2e-278) {
tmp = t_2;
} else if (z <= 2.1e-233) {
tmp = y * t;
} else if (z <= 2.45e-213) {
tmp = t_2;
} else if (z <= 2.7e-116) {
tmp = y * t;
} else if (z <= 2e+51) {
tmp = t_2;
} else if (z <= 1.45e+148) {
tmp = x * (z + 1.0);
} else if (z <= 4.6e+228) {
tmp = t_1;
} 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) :: t_2
real(8) :: tmp
t_1 = z * -t
t_2 = x * (1.0d0 - y)
if (z <= (-1.3d+91)) then
tmp = t_1
else if (z <= 4.2d-278) then
tmp = t_2
else if (z <= 2.1d-233) then
tmp = y * t
else if (z <= 2.45d-213) then
tmp = t_2
else if (z <= 2.7d-116) then
tmp = y * t
else if (z <= 2d+51) then
tmp = t_2
else if (z <= 1.45d+148) then
tmp = x * (z + 1.0d0)
else if (z <= 4.6d+228) then
tmp = t_1
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 = z * -t;
double t_2 = x * (1.0 - y);
double tmp;
if (z <= -1.3e+91) {
tmp = t_1;
} else if (z <= 4.2e-278) {
tmp = t_2;
} else if (z <= 2.1e-233) {
tmp = y * t;
} else if (z <= 2.45e-213) {
tmp = t_2;
} else if (z <= 2.7e-116) {
tmp = y * t;
} else if (z <= 2e+51) {
tmp = t_2;
} else if (z <= 1.45e+148) {
tmp = x * (z + 1.0);
} else if (z <= 4.6e+228) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t t_2 = x * (1.0 - y) tmp = 0 if z <= -1.3e+91: tmp = t_1 elif z <= 4.2e-278: tmp = t_2 elif z <= 2.1e-233: tmp = y * t elif z <= 2.45e-213: tmp = t_2 elif z <= 2.7e-116: tmp = y * t elif z <= 2e+51: tmp = t_2 elif z <= 1.45e+148: tmp = x * (z + 1.0) elif z <= 4.6e+228: tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) t_2 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (z <= -1.3e+91) tmp = t_1; elseif (z <= 4.2e-278) tmp = t_2; elseif (z <= 2.1e-233) tmp = Float64(y * t); elseif (z <= 2.45e-213) tmp = t_2; elseif (z <= 2.7e-116) tmp = Float64(y * t); elseif (z <= 2e+51) tmp = t_2; elseif (z <= 1.45e+148) tmp = Float64(x * Float64(z + 1.0)); elseif (z <= 4.6e+228) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; t_2 = x * (1.0 - y); tmp = 0.0; if (z <= -1.3e+91) tmp = t_1; elseif (z <= 4.2e-278) tmp = t_2; elseif (z <= 2.1e-233) tmp = y * t; elseif (z <= 2.45e-213) tmp = t_2; elseif (z <= 2.7e-116) tmp = y * t; elseif (z <= 2e+51) tmp = t_2; elseif (z <= 1.45e+148) tmp = x * (z + 1.0); elseif (z <= 4.6e+228) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+91], t$95$1, If[LessEqual[z, 4.2e-278], t$95$2, If[LessEqual[z, 2.1e-233], N[(y * t), $MachinePrecision], If[LessEqual[z, 2.45e-213], t$95$2, If[LessEqual[z, 2.7e-116], N[(y * t), $MachinePrecision], If[LessEqual[z, 2e+51], t$95$2, If[LessEqual[z, 1.45e+148], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+228], t$95$1, N[(z * x), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
t_2 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-278}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-233}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-213}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-116}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+148}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -1.3e91 or 1.45e148 < z < 4.60000000000000026e228Initial program 100.0%
Taylor expanded in y around 0 89.7%
mul-1-neg89.7%
unsub-neg89.7%
Simplified89.7%
Taylor expanded in z around inf 89.7%
Taylor expanded in x around 0 61.5%
mul-1-neg61.5%
distribute-rgt-neg-in61.5%
Simplified61.5%
if -1.3e91 < z < 4.20000000000000027e-278 or 2.0999999999999999e-233 < z < 2.4499999999999999e-213 or 2.7e-116 < z < 2e51Initial program 100.0%
Taylor expanded in x around inf 65.3%
mul-1-neg65.3%
unsub-neg65.3%
Simplified65.3%
Taylor expanded in z around 0 63.2%
if 4.20000000000000027e-278 < z < 2.0999999999999999e-233 or 2.4499999999999999e-213 < z < 2.7e-116Initial program 100.0%
Taylor expanded in y around inf 94.4%
*-commutative94.4%
Simplified94.4%
*-commutative94.4%
sub-neg94.4%
distribute-lft-in88.8%
Applied egg-rr88.8%
associate-+r+88.8%
distribute-rgt-neg-out88.8%
unsub-neg88.8%
*-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in x around 0 68.2%
if 2e51 < z < 1.45e148Initial program 100.0%
Taylor expanded in x around inf 65.4%
mul-1-neg65.4%
unsub-neg65.4%
Simplified65.4%
Taylor expanded in y around 0 59.2%
+-commutative59.2%
Simplified59.2%
if 4.60000000000000026e228 < z Initial program 100.0%
Taylor expanded in y around 0 93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in z around inf 93.3%
Taylor expanded in x around inf 86.7%
Final simplification64.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))) (t_2 (* x (+ z 1.0))))
(if (<= y -2.15e+41)
t_1
(if (<= y 7e-182)
t_2
(if (<= y 8.2e-126)
(* z (- t))
(if (<= y 0.00162)
t_2
(if (or (<= y 3e+216) (not (<= y 9e+257))) (* y t) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -2.15e+41) {
tmp = t_1;
} else if (y <= 7e-182) {
tmp = t_2;
} else if (y <= 8.2e-126) {
tmp = z * -t;
} else if (y <= 0.00162) {
tmp = t_2;
} else if ((y <= 3e+216) || !(y <= 9e+257)) {
tmp = y * 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) :: t_2
real(8) :: tmp
t_1 = y * -x
t_2 = x * (z + 1.0d0)
if (y <= (-2.15d+41)) then
tmp = t_1
else if (y <= 7d-182) then
tmp = t_2
else if (y <= 8.2d-126) then
tmp = z * -t
else if (y <= 0.00162d0) then
tmp = t_2
else if ((y <= 3d+216) .or. (.not. (y <= 9d+257))) then
tmp = y * 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 * -x;
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -2.15e+41) {
tmp = t_1;
} else if (y <= 7e-182) {
tmp = t_2;
} else if (y <= 8.2e-126) {
tmp = z * -t;
} else if (y <= 0.00162) {
tmp = t_2;
} else if ((y <= 3e+216) || !(y <= 9e+257)) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x t_2 = x * (z + 1.0) tmp = 0 if y <= -2.15e+41: tmp = t_1 elif y <= 7e-182: tmp = t_2 elif y <= 8.2e-126: tmp = z * -t elif y <= 0.00162: tmp = t_2 elif (y <= 3e+216) or not (y <= 9e+257): tmp = y * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) t_2 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (y <= -2.15e+41) tmp = t_1; elseif (y <= 7e-182) tmp = t_2; elseif (y <= 8.2e-126) tmp = Float64(z * Float64(-t)); elseif (y <= 0.00162) tmp = t_2; elseif ((y <= 3e+216) || !(y <= 9e+257)) tmp = Float64(y * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; t_2 = x * (z + 1.0); tmp = 0.0; if (y <= -2.15e+41) tmp = t_1; elseif (y <= 7e-182) tmp = t_2; elseif (y <= 8.2e-126) tmp = z * -t; elseif (y <= 0.00162) tmp = t_2; elseif ((y <= 3e+216) || ~((y <= 9e+257))) tmp = y * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.15e+41], t$95$1, If[LessEqual[y, 7e-182], t$95$2, If[LessEqual[y, 8.2e-126], N[(z * (-t)), $MachinePrecision], If[LessEqual[y, 0.00162], t$95$2, If[Or[LessEqual[y, 3e+216], N[Not[LessEqual[y, 9e+257]], $MachinePrecision]], N[(y * t), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
t_2 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;y \leq -2.15 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-182}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-126}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 0.00162:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+216} \lor \neg \left(y \leq 9 \cdot 10^{+257}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.15000000000000012e41 or 2.9999999999999998e216 < y < 8.9999999999999999e257Initial program 99.9%
Taylor expanded in x around inf 57.8%
mul-1-neg57.8%
unsub-neg57.8%
Simplified57.8%
Taylor expanded in z around 0 50.0%
Taylor expanded in y around inf 50.0%
mul-1-neg50.0%
distribute-rgt-neg-out50.0%
Simplified50.0%
if -2.15000000000000012e41 < y < 6.99999999999999966e-182 or 8.1999999999999995e-126 < y < 0.0016199999999999999Initial program 100.0%
Taylor expanded in x around inf 67.4%
mul-1-neg67.4%
unsub-neg67.4%
Simplified67.4%
Taylor expanded in y around 0 65.9%
+-commutative65.9%
Simplified65.9%
if 6.99999999999999966e-182 < y < 8.1999999999999995e-126Initial program 100.0%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in x around 0 83.4%
mul-1-neg83.4%
distribute-rgt-neg-in83.4%
Simplified83.4%
if 0.0016199999999999999 < y < 2.9999999999999998e216 or 8.9999999999999999e257 < y Initial program 100.0%
Taylor expanded in y around inf 80.5%
*-commutative80.5%
Simplified80.5%
*-commutative80.5%
sub-neg80.5%
distribute-lft-in77.2%
Applied egg-rr77.2%
associate-+r+77.2%
distribute-rgt-neg-out77.2%
unsub-neg77.2%
*-commutative77.2%
Applied egg-rr77.2%
Taylor expanded in x around 0 55.8%
Final simplification61.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* z (- x t))))
(if (<= z -7200000000000.0)
t_2
(if (<= z 4.7e-278)
(* x (- 1.0 y))
(if (<= z 4.5e-224)
t_1
(if (<= z 2.2e-218) x (if (<= z 7e-46) t_1 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 tmp;
if (z <= -7200000000000.0) {
tmp = t_2;
} else if (z <= 4.7e-278) {
tmp = x * (1.0 - y);
} else if (z <= 4.5e-224) {
tmp = t_1;
} else if (z <= 2.2e-218) {
tmp = x;
} else if (z <= 7e-46) {
tmp = t_1;
} 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 = y * (t - x)
t_2 = z * (x - t)
if (z <= (-7200000000000.0d0)) then
tmp = t_2
else if (z <= 4.7d-278) then
tmp = x * (1.0d0 - y)
else if (z <= 4.5d-224) then
tmp = t_1
else if (z <= 2.2d-218) then
tmp = x
else if (z <= 7d-46) then
tmp = t_1
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 tmp;
if (z <= -7200000000000.0) {
tmp = t_2;
} else if (z <= 4.7e-278) {
tmp = x * (1.0 - y);
} else if (z <= 4.5e-224) {
tmp = t_1;
} else if (z <= 2.2e-218) {
tmp = x;
} else if (z <= 7e-46) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = z * (x - t) tmp = 0 if z <= -7200000000000.0: tmp = t_2 elif z <= 4.7e-278: tmp = x * (1.0 - y) elif z <= 4.5e-224: tmp = t_1 elif z <= 2.2e-218: tmp = x elif z <= 7e-46: tmp = t_1 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)) tmp = 0.0 if (z <= -7200000000000.0) tmp = t_2; elseif (z <= 4.7e-278) tmp = Float64(x * Float64(1.0 - y)); elseif (z <= 4.5e-224) tmp = t_1; elseif (z <= 2.2e-218) tmp = x; elseif (z <= 7e-46) tmp = t_1; 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); tmp = 0.0; if (z <= -7200000000000.0) tmp = t_2; elseif (z <= 4.7e-278) tmp = x * (1.0 - y); elseif (z <= 4.5e-224) tmp = t_1; elseif (z <= 2.2e-218) tmp = x; elseif (z <= 7e-46) tmp = t_1; 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]}, If[LessEqual[z, -7200000000000.0], t$95$2, If[LessEqual[z, 4.7e-278], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-224], t$95$1, If[LessEqual[z, 2.2e-218], x, If[LessEqual[z, 7e-46], t$95$1, 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)\\
\mathbf{if}\;z \leq -7200000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-278}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-218}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.2e12 or 7.0000000000000004e-46 < z Initial program 100.0%
Taylor expanded in y around 0 80.1%
mul-1-neg80.1%
unsub-neg80.1%
Simplified80.1%
Taylor expanded in z around inf 78.6%
if -7.2e12 < z < 4.6999999999999997e-278Initial program 100.0%
Taylor expanded in x around inf 69.3%
mul-1-neg69.3%
unsub-neg69.3%
Simplified69.3%
Taylor expanded in z around 0 69.2%
if 4.6999999999999997e-278 < z < 4.5000000000000004e-224 or 2.20000000000000007e-218 < z < 7.0000000000000004e-46Initial program 99.9%
Taylor expanded in y around inf 95.6%
*-commutative95.6%
Simplified95.6%
*-commutative95.6%
sub-neg95.6%
distribute-lft-in91.2%
Applied egg-rr91.2%
associate-+r+91.2%
distribute-rgt-neg-out91.2%
unsub-neg91.2%
*-commutative91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 83.4%
if 4.5000000000000004e-224 < z < 2.20000000000000007e-218Initial program 100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
Final simplification76.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -29000000.0)
(* z x)
(if (<= z 3.8e-280)
x
(if (<= z 1.8e-231)
(* y t)
(if (<= z 8e-216) x (if (<= z 7.5e+52) (* y t) (* z x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -29000000.0) {
tmp = z * x;
} else if (z <= 3.8e-280) {
tmp = x;
} else if (z <= 1.8e-231) {
tmp = y * t;
} else if (z <= 8e-216) {
tmp = x;
} else if (z <= 7.5e+52) {
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 <= (-29000000.0d0)) then
tmp = z * x
else if (z <= 3.8d-280) then
tmp = x
else if (z <= 1.8d-231) then
tmp = y * t
else if (z <= 8d-216) then
tmp = x
else if (z <= 7.5d+52) 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 <= -29000000.0) {
tmp = z * x;
} else if (z <= 3.8e-280) {
tmp = x;
} else if (z <= 1.8e-231) {
tmp = y * t;
} else if (z <= 8e-216) {
tmp = x;
} else if (z <= 7.5e+52) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -29000000.0: tmp = z * x elif z <= 3.8e-280: tmp = x elif z <= 1.8e-231: tmp = y * t elif z <= 8e-216: tmp = x elif z <= 7.5e+52: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -29000000.0) tmp = Float64(z * x); elseif (z <= 3.8e-280) tmp = x; elseif (z <= 1.8e-231) tmp = Float64(y * t); elseif (z <= 8e-216) tmp = x; elseif (z <= 7.5e+52) 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 <= -29000000.0) tmp = z * x; elseif (z <= 3.8e-280) tmp = x; elseif (z <= 1.8e-231) tmp = y * t; elseif (z <= 8e-216) tmp = x; elseif (z <= 7.5e+52) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -29000000.0], N[(z * x), $MachinePrecision], If[LessEqual[z, 3.8e-280], x, If[LessEqual[z, 1.8e-231], N[(y * t), $MachinePrecision], If[LessEqual[z, 8e-216], x, If[LessEqual[z, 7.5e+52], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -29000000:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-280}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-231}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-216}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+52}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -2.9e7 or 7.49999999999999995e52 < z Initial program 100.0%
Taylor expanded in y around 0 82.6%
mul-1-neg82.6%
unsub-neg82.6%
Simplified82.6%
Taylor expanded in z around inf 82.6%
Taylor expanded in x around inf 49.3%
if -2.9e7 < z < 3.8000000000000001e-280 or 1.79999999999999987e-231 < z < 8.0000000000000003e-216Initial program 100.0%
Taylor expanded in y around inf 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in y around 0 53.7%
if 3.8000000000000001e-280 < z < 1.79999999999999987e-231 or 8.0000000000000003e-216 < z < 7.49999999999999995e52Initial program 100.0%
Taylor expanded in y around inf 82.2%
*-commutative82.2%
Simplified82.2%
*-commutative82.2%
sub-neg82.2%
distribute-lft-in79.1%
Applied egg-rr79.1%
associate-+r+79.1%
distribute-rgt-neg-out79.1%
unsub-neg79.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in x around 0 48.8%
Final simplification50.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* x (+ z 1.0))))
(if (<= y -16.0)
t_1
(if (<= y 4.6e-180)
t_2
(if (<= y 4.3e-135) (* z (- t)) (if (<= y 0.00102) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -16.0) {
tmp = t_1;
} else if (y <= 4.6e-180) {
tmp = t_2;
} else if (y <= 4.3e-135) {
tmp = z * -t;
} else if (y <= 0.00102) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = y * (t - x)
t_2 = x * (z + 1.0d0)
if (y <= (-16.0d0)) then
tmp = t_1
else if (y <= 4.6d-180) then
tmp = t_2
else if (y <= 4.3d-135) then
tmp = z * -t
else if (y <= 0.00102d0) then
tmp = t_2
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 t_2 = x * (z + 1.0);
double tmp;
if (y <= -16.0) {
tmp = t_1;
} else if (y <= 4.6e-180) {
tmp = t_2;
} else if (y <= 4.3e-135) {
tmp = z * -t;
} else if (y <= 0.00102) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = x * (z + 1.0) tmp = 0 if y <= -16.0: tmp = t_1 elif y <= 4.6e-180: tmp = t_2 elif y <= 4.3e-135: tmp = z * -t elif y <= 0.00102: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) t_2 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (y <= -16.0) tmp = t_1; elseif (y <= 4.6e-180) tmp = t_2; elseif (y <= 4.3e-135) tmp = Float64(z * Float64(-t)); elseif (y <= 0.00102) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); t_2 = x * (z + 1.0); tmp = 0.0; if (y <= -16.0) tmp = t_1; elseif (y <= 4.6e-180) tmp = t_2; elseif (y <= 4.3e-135) tmp = z * -t; elseif (y <= 0.00102) tmp = t_2; 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]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -16.0], t$95$1, If[LessEqual[y, 4.6e-180], t$95$2, If[LessEqual[y, 4.3e-135], N[(z * (-t)), $MachinePrecision], If[LessEqual[y, 0.00102], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;y \leq -16:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-180}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-135}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 0.00102:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -16 or 0.00102 < y Initial program 99.9%
Taylor expanded in y around inf 81.7%
*-commutative81.7%
Simplified81.7%
*-commutative81.7%
sub-neg81.7%
distribute-lft-in76.6%
Applied egg-rr76.6%
associate-+r+76.6%
distribute-rgt-neg-out76.6%
unsub-neg76.6%
*-commutative76.6%
Applied egg-rr76.6%
Taylor expanded in y around inf 81.1%
if -16 < y < 4.59999999999999992e-180 or 4.29999999999999999e-135 < y < 0.00102Initial program 100.0%
Taylor expanded in x around inf 68.2%
mul-1-neg68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in y around 0 68.0%
+-commutative68.0%
Simplified68.0%
if 4.59999999999999992e-180 < y < 4.29999999999999999e-135Initial program 100.0%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in x around 0 83.4%
mul-1-neg83.4%
distribute-rgt-neg-in83.4%
Simplified83.4%
Final simplification74.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -7.2e+33)
t_1
(if (<= z 4.2e-50)
(- x (* y (- x t)))
(if (<= z 2.3e+50) (+ 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 <= -7.2e+33) {
tmp = t_1;
} else if (z <= 4.2e-50) {
tmp = x - (y * (x - t));
} else if (z <= 2.3e+50) {
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 <= (-7.2d+33)) then
tmp = t_1
else if (z <= 4.2d-50) then
tmp = x - (y * (x - t))
else if (z <= 2.3d+50) 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 <= -7.2e+33) {
tmp = t_1;
} else if (z <= 4.2e-50) {
tmp = x - (y * (x - t));
} else if (z <= 2.3e+50) {
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 <= -7.2e+33: tmp = t_1 elif z <= 4.2e-50: tmp = x - (y * (x - t)) elif z <= 2.3e+50: 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 <= -7.2e+33) tmp = t_1; elseif (z <= 4.2e-50) tmp = Float64(x - Float64(y * Float64(x - t))); elseif (z <= 2.3e+50) 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 <= -7.2e+33) tmp = t_1; elseif (z <= 4.2e-50) tmp = x - (y * (x - t)); elseif (z <= 2.3e+50) 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, -7.2e+33], t$95$1, If[LessEqual[z, 4.2e-50], N[(x - N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+50], 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 -7.2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-50}:\\
\;\;\;\;x - y \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+50}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2000000000000005e33 or 2.29999999999999997e50 < z Initial program 100.0%
Taylor expanded in y around 0 86.4%
mul-1-neg86.4%
unsub-neg86.4%
Simplified86.4%
Taylor expanded in z around inf 86.4%
if -7.2000000000000005e33 < z < 4.2000000000000002e-50Initial program 100.0%
Taylor expanded in y around inf 92.3%
*-commutative92.3%
Simplified92.3%
if 4.2000000000000002e-50 < z < 2.29999999999999997e50Initial program 100.0%
Taylor expanded in t around inf 78.1%
Final simplification89.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -2500.0)
t_1
(if (<= y -4.4e-231)
(* x (+ z 1.0))
(if (<= y 4.05e-10) (- x (* z t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -2500.0) {
tmp = t_1;
} else if (y <= -4.4e-231) {
tmp = x * (z + 1.0);
} else if (y <= 4.05e-10) {
tmp = x - (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 = y * (t - x)
if (y <= (-2500.0d0)) then
tmp = t_1
else if (y <= (-4.4d-231)) then
tmp = x * (z + 1.0d0)
else if (y <= 4.05d-10) then
tmp = x - (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 = y * (t - x);
double tmp;
if (y <= -2500.0) {
tmp = t_1;
} else if (y <= -4.4e-231) {
tmp = x * (z + 1.0);
} else if (y <= 4.05e-10) {
tmp = x - (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -2500.0: tmp = t_1 elif y <= -4.4e-231: tmp = x * (z + 1.0) elif y <= 4.05e-10: tmp = x - (z * 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 <= -2500.0) tmp = t_1; elseif (y <= -4.4e-231) tmp = Float64(x * Float64(z + 1.0)); elseif (y <= 4.05e-10) tmp = Float64(x - Float64(z * 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 <= -2500.0) tmp = t_1; elseif (y <= -4.4e-231) tmp = x * (z + 1.0); elseif (y <= 4.05e-10) tmp = x - (z * 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, -2500.0], t$95$1, If[LessEqual[y, -4.4e-231], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.05e-10], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -2500:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-231}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;y \leq 4.05 \cdot 10^{-10}:\\
\;\;\;\;x - z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2500 or 4.04999999999999997e-10 < y Initial program 99.9%
Taylor expanded in y around inf 80.4%
*-commutative80.4%
Simplified80.4%
*-commutative80.4%
sub-neg80.4%
distribute-lft-in75.4%
Applied egg-rr75.4%
associate-+r+75.4%
distribute-rgt-neg-out75.4%
unsub-neg75.4%
*-commutative75.4%
Applied egg-rr75.4%
Taylor expanded in y around inf 79.8%
if -2500 < y < -4.40000000000000018e-231Initial program 100.0%
Taylor expanded in x around inf 76.8%
mul-1-neg76.8%
unsub-neg76.8%
Simplified76.8%
Taylor expanded in y around 0 76.3%
+-commutative76.3%
Simplified76.3%
if -4.40000000000000018e-231 < y < 4.04999999999999997e-10Initial program 100.0%
Taylor expanded in y around 0 95.4%
mul-1-neg95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in t around inf 80.8%
Final simplification79.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -4.8e+19)
t_1
(if (<= y -6.8e-231)
(* x (+ (- z y) 1.0))
(if (<= y 1.9e-9) (- x (* z t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -4.8e+19) {
tmp = t_1;
} else if (y <= -6.8e-231) {
tmp = x * ((z - y) + 1.0);
} else if (y <= 1.9e-9) {
tmp = x - (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 = y * (t - x)
if (y <= (-4.8d+19)) then
tmp = t_1
else if (y <= (-6.8d-231)) then
tmp = x * ((z - y) + 1.0d0)
else if (y <= 1.9d-9) then
tmp = x - (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 = y * (t - x);
double tmp;
if (y <= -4.8e+19) {
tmp = t_1;
} else if (y <= -6.8e-231) {
tmp = x * ((z - y) + 1.0);
} else if (y <= 1.9e-9) {
tmp = x - (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -4.8e+19: tmp = t_1 elif y <= -6.8e-231: tmp = x * ((z - y) + 1.0) elif y <= 1.9e-9: tmp = x - (z * 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 <= -4.8e+19) tmp = t_1; elseif (y <= -6.8e-231) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); elseif (y <= 1.9e-9) tmp = Float64(x - Float64(z * 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 <= -4.8e+19) tmp = t_1; elseif (y <= -6.8e-231) tmp = x * ((z - y) + 1.0); elseif (y <= 1.9e-9) tmp = x - (z * 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, -4.8e+19], t$95$1, If[LessEqual[y, -6.8e-231], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-9], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-231}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-9}:\\
\;\;\;\;x - z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.8e19 or 1.90000000000000006e-9 < y Initial program 100.0%
Taylor expanded in y around inf 79.9%
*-commutative79.9%
Simplified79.9%
*-commutative79.9%
sub-neg79.9%
distribute-lft-in74.8%
Applied egg-rr74.8%
associate-+r+74.8%
distribute-rgt-neg-out74.8%
unsub-neg74.8%
*-commutative74.8%
Applied egg-rr74.8%
Taylor expanded in y around inf 79.9%
if -4.8e19 < y < -6.8e-231Initial program 99.9%
Taylor expanded in x around inf 78.4%
mul-1-neg78.4%
unsub-neg78.4%
Simplified78.4%
if -6.8e-231 < y < 1.90000000000000006e-9Initial program 100.0%
Taylor expanded in y around 0 95.4%
mul-1-neg95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in t around inf 80.8%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -10500000.0) (not (<= t 6e-87))) (+ x (* (- y z) t)) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -10500000.0) || !(t <= 6e-87)) {
tmp = x + ((y - z) * t);
} else {
tmp = x * ((z - y) + 1.0);
}
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 <= (-10500000.0d0)) .or. (.not. (t <= 6d-87))) then
tmp = x + ((y - z) * t)
else
tmp = x * ((z - y) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -10500000.0) || !(t <= 6e-87)) {
tmp = x + ((y - z) * t);
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -10500000.0) or not (t <= 6e-87): tmp = x + ((y - z) * t) else: tmp = x * ((z - y) + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -10500000.0) || !(t <= 6e-87)) tmp = Float64(x + Float64(Float64(y - z) * t)); else tmp = Float64(x * Float64(Float64(z - y) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -10500000.0) || ~((t <= 6e-87))) tmp = x + ((y - z) * t); else tmp = x * ((z - y) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -10500000.0], N[Not[LessEqual[t, 6e-87]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -10500000 \lor \neg \left(t \leq 6 \cdot 10^{-87}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\end{array}
\end{array}
if t < -1.05e7 or 6.00000000000000033e-87 < t Initial program 100.0%
Taylor expanded in t around inf 85.3%
if -1.05e7 < t < 6.00000000000000033e-87Initial program 99.9%
Taylor expanded in x around inf 85.9%
mul-1-neg85.9%
unsub-neg85.9%
Simplified85.9%
Final simplification85.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.15e-99) (not (<= y 0.00076))) (- x (* y (- x t))) (+ x (* z (- x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.15e-99) || !(y <= 0.00076)) {
tmp = x - (y * (x - t));
} else {
tmp = x + (z * (x - 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 ((y <= (-1.15d-99)) .or. (.not. (y <= 0.00076d0))) then
tmp = x - (y * (x - t))
else
tmp = x + (z * (x - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.15e-99) || !(y <= 0.00076)) {
tmp = x - (y * (x - t));
} else {
tmp = x + (z * (x - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.15e-99) or not (y <= 0.00076): tmp = x - (y * (x - t)) else: tmp = x + (z * (x - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.15e-99) || !(y <= 0.00076)) tmp = Float64(x - Float64(y * Float64(x - t))); else tmp = Float64(x + Float64(z * Float64(x - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.15e-99) || ~((y <= 0.00076))) tmp = x - (y * (x - t)); else tmp = x + (z * (x - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.15e-99], N[Not[LessEqual[y, 0.00076]], $MachinePrecision]], N[(x - N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-99} \lor \neg \left(y \leq 0.00076\right):\\
\;\;\;\;x - y \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\end{array}
\end{array}
if y < -1.1499999999999999e-99 or 7.6000000000000004e-4 < y Initial program 99.9%
Taylor expanded in y around inf 82.2%
*-commutative82.2%
Simplified82.2%
if -1.1499999999999999e-99 < y < 7.6000000000000004e-4Initial program 100.0%
Taylor expanded in y around 0 95.7%
mul-1-neg95.7%
unsub-neg95.7%
Simplified95.7%
Final simplification88.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.8e+33) (not (<= z 7e-46))) (* z (- x t)) (+ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+33) || !(z <= 7e-46)) {
tmp = z * (x - t);
} else {
tmp = x + (y * 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 ((z <= (-3.8d+33)) .or. (.not. (z <= 7d-46))) then
tmp = z * (x - t)
else
tmp = x + (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+33) || !(z <= 7e-46)) {
tmp = z * (x - t);
} else {
tmp = x + (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.8e+33) or not (z <= 7e-46): tmp = z * (x - t) else: tmp = x + (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.8e+33) || !(z <= 7e-46)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(x + Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.8e+33) || ~((z <= 7e-46))) tmp = z * (x - t); else tmp = x + (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.8e+33], N[Not[LessEqual[z, 7e-46]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+33} \lor \neg \left(z \leq 7 \cdot 10^{-46}\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot t\\
\end{array}
\end{array}
if z < -3.80000000000000002e33 or 7.0000000000000004e-46 < z Initial program 100.0%
Taylor expanded in y around 0 82.5%
mul-1-neg82.5%
unsub-neg82.5%
Simplified82.5%
Taylor expanded in z around inf 80.9%
if -3.80000000000000002e33 < z < 7.0000000000000004e-46Initial program 100.0%
Taylor expanded in y around inf 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in t around inf 73.4%
*-commutative73.4%
Simplified73.4%
Final simplification76.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.15e-13) (not (<= y 1.15e-10))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.15e-13) || !(y <= 1.15e-10)) {
tmp = y * t;
} 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 ((y <= (-1.15d-13)) .or. (.not. (y <= 1.15d-10))) then
tmp = y * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.15e-13) || !(y <= 1.15e-10)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.15e-13) or not (y <= 1.15e-10): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.15e-13) || !(y <= 1.15e-10)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.15e-13) || ~((y <= 1.15e-10))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.15e-13], N[Not[LessEqual[y, 1.15e-10]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-13} \lor \neg \left(y \leq 1.15 \cdot 10^{-10}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.1499999999999999e-13 or 1.15000000000000004e-10 < y Initial program 99.9%
Taylor expanded in y around inf 80.1%
*-commutative80.1%
Simplified80.1%
*-commutative80.1%
sub-neg80.1%
distribute-lft-in75.2%
Applied egg-rr75.2%
associate-+r+75.2%
distribute-rgt-neg-out75.2%
unsub-neg75.2%
*-commutative75.2%
Applied egg-rr75.2%
Taylor expanded in x around 0 46.5%
if -1.1499999999999999e-13 < y < 1.15000000000000004e-10Initial program 100.0%
Taylor expanded in y around inf 48.5%
*-commutative48.5%
Simplified48.5%
Taylor expanded in y around 0 42.0%
Final simplification44.1%
(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 63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in y around 0 23.5%
Final simplification23.5%
(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 2024055
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:alt
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))