
(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))) (t_2 (* y (- x))))
(if (<= z -3.4e+34)
t_1
(if (<= z -1.5e-26)
t_2
(if (<= z -2.3e-57)
t_1
(if (<= z -8e-289)
x
(if (<= z 1.35e-231)
t_2
(if (<= z 1.25e-96) x (if (<= z 2.7e+72) (* y t) t_1)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = y * -x;
double tmp;
if (z <= -3.4e+34) {
tmp = t_1;
} else if (z <= -1.5e-26) {
tmp = t_2;
} else if (z <= -2.3e-57) {
tmp = t_1;
} else if (z <= -8e-289) {
tmp = x;
} else if (z <= 1.35e-231) {
tmp = t_2;
} else if (z <= 1.25e-96) {
tmp = x;
} else if (z <= 2.7e+72) {
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 = z * -t
t_2 = y * -x
if (z <= (-3.4d+34)) then
tmp = t_1
else if (z <= (-1.5d-26)) then
tmp = t_2
else if (z <= (-2.3d-57)) then
tmp = t_1
else if (z <= (-8d-289)) then
tmp = x
else if (z <= 1.35d-231) then
tmp = t_2
else if (z <= 1.25d-96) then
tmp = x
else if (z <= 2.7d+72) 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 = z * -t;
double t_2 = y * -x;
double tmp;
if (z <= -3.4e+34) {
tmp = t_1;
} else if (z <= -1.5e-26) {
tmp = t_2;
} else if (z <= -2.3e-57) {
tmp = t_1;
} else if (z <= -8e-289) {
tmp = x;
} else if (z <= 1.35e-231) {
tmp = t_2;
} else if (z <= 1.25e-96) {
tmp = x;
} else if (z <= 2.7e+72) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t t_2 = y * -x tmp = 0 if z <= -3.4e+34: tmp = t_1 elif z <= -1.5e-26: tmp = t_2 elif z <= -2.3e-57: tmp = t_1 elif z <= -8e-289: tmp = x elif z <= 1.35e-231: tmp = t_2 elif z <= 1.25e-96: tmp = x elif z <= 2.7e+72: tmp = y * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) t_2 = Float64(y * Float64(-x)) tmp = 0.0 if (z <= -3.4e+34) tmp = t_1; elseif (z <= -1.5e-26) tmp = t_2; elseif (z <= -2.3e-57) tmp = t_1; elseif (z <= -8e-289) tmp = x; elseif (z <= 1.35e-231) tmp = t_2; elseif (z <= 1.25e-96) tmp = x; elseif (z <= 2.7e+72) tmp = Float64(y * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; t_2 = y * -x; tmp = 0.0; if (z <= -3.4e+34) tmp = t_1; elseif (z <= -1.5e-26) tmp = t_2; elseif (z <= -2.3e-57) tmp = t_1; elseif (z <= -8e-289) tmp = x; elseif (z <= 1.35e-231) tmp = t_2; elseif (z <= 1.25e-96) tmp = x; elseif (z <= 2.7e+72) tmp = y * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[z, -3.4e+34], t$95$1, If[LessEqual[z, -1.5e-26], t$95$2, If[LessEqual[z, -2.3e-57], t$95$1, If[LessEqual[z, -8e-289], x, If[LessEqual[z, 1.35e-231], t$95$2, If[LessEqual[z, 1.25e-96], x, If[LessEqual[z, 2.7e+72], N[(y * t), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
t_2 := y \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-289}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-96}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+72}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.3999999999999999e34 or -1.50000000000000006e-26 < z < -2.3e-57 or 2.7000000000000001e72 < z Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in95.2%
Applied egg-rr95.2%
Taylor expanded in x around 0 55.4%
associate-+r+55.4%
mul-1-neg55.4%
*-commutative55.4%
sub-neg55.4%
associate-+l-55.4%
*-commutative55.4%
Applied egg-rr55.4%
Taylor expanded in z around inf 53.5%
mul-1-neg53.5%
distribute-rgt-neg-out53.5%
Simplified53.5%
if -3.3999999999999999e34 < z < -1.50000000000000006e-26 or -8.0000000000000001e-289 < z < 1.35000000000000011e-231Initial program 100.0%
Taylor expanded in y around inf 94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in x around inf 67.9%
neg-mul-167.9%
unsub-neg67.9%
Simplified67.9%
Taylor expanded in y around inf 53.2%
associate-*r*53.2%
mul-1-neg53.2%
*-commutative53.2%
Simplified53.2%
if -2.3e-57 < z < -8.0000000000000001e-289 or 1.35000000000000011e-231 < z < 1.24999999999999999e-96Initial program 100.0%
Taylor expanded in t around inf 76.3%
Taylor expanded in x around inf 48.9%
if 1.24999999999999999e-96 < z < 2.7000000000000001e72Initial program 99.9%
*-commutative99.9%
sub-neg99.9%
distribute-lft-in96.6%
Applied egg-rr96.6%
Taylor expanded in x around 0 61.3%
associate-+r+61.3%
mul-1-neg61.3%
*-commutative61.3%
sub-neg61.3%
associate-+l-61.3%
*-commutative61.3%
Applied egg-rr61.3%
Taylor expanded in y around inf 45.7%
Final simplification51.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -2.4e-56)
t_1
(if (<= z -5.1e-198)
x
(if (<= z 7.5e-258)
(* y t)
(if (<= z 1.9e-95) x (if (<= z 3.4e+72) (* y t) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -2.4e-56) {
tmp = t_1;
} else if (z <= -5.1e-198) {
tmp = x;
} else if (z <= 7.5e-258) {
tmp = y * t;
} else if (z <= 1.9e-95) {
tmp = x;
} else if (z <= 3.4e+72) {
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) :: tmp
t_1 = z * -t
if (z <= (-2.4d-56)) then
tmp = t_1
else if (z <= (-5.1d-198)) then
tmp = x
else if (z <= 7.5d-258) then
tmp = y * t
else if (z <= 1.9d-95) then
tmp = x
else if (z <= 3.4d+72) 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 = z * -t;
double tmp;
if (z <= -2.4e-56) {
tmp = t_1;
} else if (z <= -5.1e-198) {
tmp = x;
} else if (z <= 7.5e-258) {
tmp = y * t;
} else if (z <= 1.9e-95) {
tmp = x;
} else if (z <= 3.4e+72) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -2.4e-56: tmp = t_1 elif z <= -5.1e-198: tmp = x elif z <= 7.5e-258: tmp = y * t elif z <= 1.9e-95: tmp = x elif z <= 3.4e+72: tmp = y * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -2.4e-56) tmp = t_1; elseif (z <= -5.1e-198) tmp = x; elseif (z <= 7.5e-258) tmp = Float64(y * t); elseif (z <= 1.9e-95) tmp = x; elseif (z <= 3.4e+72) tmp = Float64(y * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -2.4e-56) tmp = t_1; elseif (z <= -5.1e-198) tmp = x; elseif (z <= 7.5e-258) tmp = y * t; elseif (z <= 1.9e-95) tmp = x; elseif (z <= 3.4e+72) tmp = y * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -2.4e-56], t$95$1, If[LessEqual[z, -5.1e-198], x, If[LessEqual[z, 7.5e-258], N[(y * t), $MachinePrecision], If[LessEqual[z, 1.9e-95], x, If[LessEqual[z, 3.4e+72], N[(y * t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-198}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-258}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-95}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+72}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.40000000000000001e-56 or 3.3999999999999998e72 < z Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in94.9%
Applied egg-rr94.9%
Taylor expanded in x around 0 54.7%
associate-+r+54.7%
mul-1-neg54.7%
*-commutative54.7%
sub-neg54.7%
associate-+l-54.7%
*-commutative54.7%
Applied egg-rr54.7%
Taylor expanded in z around inf 49.1%
mul-1-neg49.1%
distribute-rgt-neg-out49.1%
Simplified49.1%
if -2.40000000000000001e-56 < z < -5.0999999999999997e-198 or 7.4999999999999998e-258 < z < 1.8999999999999999e-95Initial program 100.0%
Taylor expanded in t around inf 71.1%
Taylor expanded in x around inf 49.0%
if -5.0999999999999997e-198 < z < 7.4999999999999998e-258 or 1.8999999999999999e-95 < z < 3.3999999999999998e72Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in98.6%
Applied egg-rr98.6%
Taylor expanded in x around 0 65.6%
associate-+r+65.6%
mul-1-neg65.6%
*-commutative65.6%
sub-neg65.6%
associate-+l-65.6%
*-commutative65.6%
Applied egg-rr65.6%
Taylor expanded in y around inf 42.6%
Final simplification47.3%
(FPCore (x y z t)
:precision binary64
(if (or (<= t -0.042)
(and (not (<= t -7.8e-51))
(or (<= t -4.5e-113) (not (<= t 6.2e+74)))))
(+ x (* t (- y z)))
(+ x (* x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.042) || (!(t <= -7.8e-51) && ((t <= -4.5e-113) || !(t <= 6.2e+74)))) {
tmp = x + (t * (y - z));
} else {
tmp = x + (x * (z - 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 <= (-0.042d0)) .or. (.not. (t <= (-7.8d-51))) .and. (t <= (-4.5d-113)) .or. (.not. (t <= 6.2d+74))) then
tmp = x + (t * (y - z))
else
tmp = x + (x * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.042) || (!(t <= -7.8e-51) && ((t <= -4.5e-113) || !(t <= 6.2e+74)))) {
tmp = x + (t * (y - z));
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -0.042) or (not (t <= -7.8e-51) and ((t <= -4.5e-113) or not (t <= 6.2e+74))): tmp = x + (t * (y - z)) else: tmp = x + (x * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -0.042) || (!(t <= -7.8e-51) && ((t <= -4.5e-113) || !(t <= 6.2e+74)))) tmp = Float64(x + Float64(t * Float64(y - z))); else tmp = Float64(x + Float64(x * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -0.042) || (~((t <= -7.8e-51)) && ((t <= -4.5e-113) || ~((t <= 6.2e+74))))) tmp = x + (t * (y - z)); else tmp = x + (x * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -0.042], And[N[Not[LessEqual[t, -7.8e-51]], $MachinePrecision], Or[LessEqual[t, -4.5e-113], N[Not[LessEqual[t, 6.2e+74]], $MachinePrecision]]]], N[(x + N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.042 \lor \neg \left(t \leq -7.8 \cdot 10^{-51}\right) \land \left(t \leq -4.5 \cdot 10^{-113} \lor \neg \left(t \leq 6.2 \cdot 10^{+74}\right)\right):\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\end{array}
\end{array}
if t < -0.0420000000000000026 or -7.7999999999999995e-51 < t < -4.5000000000000001e-113 or 6.20000000000000043e74 < t Initial program 100.0%
Taylor expanded in t around inf 86.1%
if -0.0420000000000000026 < t < -7.7999999999999995e-51 or -4.5000000000000001e-113 < t < 6.20000000000000043e74Initial program 100.0%
Taylor expanded in t around 0 86.6%
mul-1-neg86.6%
distribute-rgt-neg-in86.6%
neg-sub086.6%
sub-neg86.6%
+-commutative86.6%
associate--r+86.6%
neg-sub086.6%
remove-double-neg86.6%
Simplified86.6%
Final simplification86.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (+ x (* (- y z) t))))
(if (<= z -1.85e+81)
t_1
(if (<= z 9e-265)
t_2
(if (<= z 1.85e-97) (* x (- 1.0 y)) (if (<= z 1.42e+31) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = x + ((y - z) * t);
double tmp;
if (z <= -1.85e+81) {
tmp = t_1;
} else if (z <= 9e-265) {
tmp = t_2;
} else if (z <= 1.85e-97) {
tmp = x * (1.0 - y);
} else if (z <= 1.42e+31) {
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 = z * (x - t)
t_2 = x + ((y - z) * t)
if (z <= (-1.85d+81)) then
tmp = t_1
else if (z <= 9d-265) then
tmp = t_2
else if (z <= 1.85d-97) then
tmp = x * (1.0d0 - y)
else if (z <= 1.42d+31) 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 = z * (x - t);
double t_2 = x + ((y - z) * t);
double tmp;
if (z <= -1.85e+81) {
tmp = t_1;
} else if (z <= 9e-265) {
tmp = t_2;
} else if (z <= 1.85e-97) {
tmp = x * (1.0 - y);
} else if (z <= 1.42e+31) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = x + ((y - z) * t) tmp = 0 if z <= -1.85e+81: tmp = t_1 elif z <= 9e-265: tmp = t_2 elif z <= 1.85e-97: tmp = x * (1.0 - y) elif z <= 1.42e+31: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) t_2 = Float64(x + Float64(Float64(y - z) * t)) tmp = 0.0 if (z <= -1.85e+81) tmp = t_1; elseif (z <= 9e-265) tmp = t_2; elseif (z <= 1.85e-97) tmp = Float64(x * Float64(1.0 - y)); elseif (z <= 1.42e+31) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); t_2 = x + ((y - z) * t); tmp = 0.0; if (z <= -1.85e+81) tmp = t_1; elseif (z <= 9e-265) tmp = t_2; elseif (z <= 1.85e-97) tmp = x * (1.0 - y); elseif (z <= 1.42e+31) tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+81], t$95$1, If[LessEqual[z, 9e-265], t$95$2, If[LessEqual[z, 1.85e-97], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e+31], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := x + \left(y - z\right) \cdot t\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-97}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.85e81 or 1.41999999999999997e31 < z Initial program 100.0%
Taylor expanded in y around 0 82.9%
mul-1-neg82.9%
unsub-neg82.9%
Simplified82.9%
Taylor expanded in z around inf 82.9%
Taylor expanded in z around inf 82.9%
if -1.85e81 < z < 9.0000000000000006e-265 or 1.84999999999999988e-97 < z < 1.41999999999999997e31Initial program 100.0%
Taylor expanded in t around inf 74.5%
if 9.0000000000000006e-265 < z < 1.84999999999999988e-97Initial program 100.0%
Taylor expanded in y around inf 97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in x around inf 83.0%
neg-mul-183.0%
unsub-neg83.0%
Simplified83.0%
Final simplification79.3%
(FPCore (x y z t)
:precision binary64
(if (or (<= t -0.16)
(and (not (<= t -1.4e-48))
(or (<= t -4.7e-113) (not (<= t 6.8e+74)))))
(* t (- y z))
(* x (- 1.0 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.16) || (!(t <= -1.4e-48) && ((t <= -4.7e-113) || !(t <= 6.8e+74)))) {
tmp = t * (y - z);
} 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 <= (-0.16d0)) .or. (.not. (t <= (-1.4d-48))) .and. (t <= (-4.7d-113)) .or. (.not. (t <= 6.8d+74))) then
tmp = t * (y - z)
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 <= -0.16) || (!(t <= -1.4e-48) && ((t <= -4.7e-113) || !(t <= 6.8e+74)))) {
tmp = t * (y - z);
} else {
tmp = x * (1.0 - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -0.16) or (not (t <= -1.4e-48) and ((t <= -4.7e-113) or not (t <= 6.8e+74))): tmp = t * (y - z) else: tmp = x * (1.0 - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -0.16) || (!(t <= -1.4e-48) && ((t <= -4.7e-113) || !(t <= 6.8e+74)))) tmp = Float64(t * Float64(y - z)); 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 <= -0.16) || (~((t <= -1.4e-48)) && ((t <= -4.7e-113) || ~((t <= 6.8e+74))))) tmp = t * (y - z); else tmp = x * (1.0 - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -0.16], And[N[Not[LessEqual[t, -1.4e-48]], $MachinePrecision], Or[LessEqual[t, -4.7e-113], N[Not[LessEqual[t, 6.8e+74]], $MachinePrecision]]]], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.16 \lor \neg \left(t \leq -1.4 \cdot 10^{-48}\right) \land \left(t \leq -4.7 \cdot 10^{-113} \lor \neg \left(t \leq 6.8 \cdot 10^{+74}\right)\right):\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if t < -0.160000000000000003 or -1.40000000000000002e-48 < t < -4.7000000000000002e-113 or 6.7999999999999998e74 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in95.2%
Applied egg-rr95.2%
Taylor expanded in x around 0 82.9%
associate-+r+82.9%
mul-1-neg82.9%
*-commutative82.9%
sub-neg82.9%
associate-+l-82.9%
*-commutative82.9%
Applied egg-rr82.9%
Taylor expanded in x around 0 74.0%
distribute-lft-out--77.2%
Simplified77.2%
if -0.160000000000000003 < t < -1.40000000000000002e-48 or -4.7000000000000002e-113 < t < 6.7999999999999998e74Initial program 100.0%
Taylor expanded in y around inf 67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in x around inf 62.4%
neg-mul-162.4%
unsub-neg62.4%
Simplified62.4%
Final simplification69.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (* x (- 1.0 y))))
(if (<= z -3.9e+33)
t_1
(if (<= z 2.3e-96)
t_2
(if (<= z 5.4e-18) (* (- y z) t) (if (<= z 1.5e+32) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = x * (1.0 - y);
double tmp;
if (z <= -3.9e+33) {
tmp = t_1;
} else if (z <= 2.3e-96) {
tmp = t_2;
} else if (z <= 5.4e-18) {
tmp = (y - z) * t;
} else if (z <= 1.5e+32) {
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 = z * (x - t)
t_2 = x * (1.0d0 - y)
if (z <= (-3.9d+33)) then
tmp = t_1
else if (z <= 2.3d-96) then
tmp = t_2
else if (z <= 5.4d-18) then
tmp = (y - z) * t
else if (z <= 1.5d+32) 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 = z * (x - t);
double t_2 = x * (1.0 - y);
double tmp;
if (z <= -3.9e+33) {
tmp = t_1;
} else if (z <= 2.3e-96) {
tmp = t_2;
} else if (z <= 5.4e-18) {
tmp = (y - z) * t;
} else if (z <= 1.5e+32) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = x * (1.0 - y) tmp = 0 if z <= -3.9e+33: tmp = t_1 elif z <= 2.3e-96: tmp = t_2 elif z <= 5.4e-18: tmp = (y - z) * t elif z <= 1.5e+32: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) t_2 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (z <= -3.9e+33) tmp = t_1; elseif (z <= 2.3e-96) tmp = t_2; elseif (z <= 5.4e-18) tmp = Float64(Float64(y - z) * t); elseif (z <= 1.5e+32) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); t_2 = x * (1.0 - y); tmp = 0.0; if (z <= -3.9e+33) tmp = t_1; elseif (z <= 2.3e-96) tmp = t_2; elseif (z <= 5.4e-18) tmp = (y - z) * t; elseif (z <= 1.5e+32) tmp = t_2; 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]}, Block[{t$95$2 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.9e+33], t$95$1, If[LessEqual[z, 2.3e-96], t$95$2, If[LessEqual[z, 5.4e-18], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.5e+32], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-96}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-18}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.9000000000000002e33 or 1.5e32 < z Initial program 100.0%
Taylor expanded in y around 0 82.0%
mul-1-neg82.0%
unsub-neg82.0%
Simplified82.0%
Taylor expanded in z around inf 82.0%
Taylor expanded in z around inf 82.0%
if -3.9000000000000002e33 < z < 2.3e-96 or 5.39999999999999977e-18 < z < 1.5e32Initial program 100.0%
Taylor expanded in y around inf 89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in x around inf 67.1%
neg-mul-167.1%
unsub-neg67.1%
Simplified67.1%
if 2.3e-96 < z < 5.39999999999999977e-18Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 91.4%
associate-+r+91.4%
mul-1-neg91.4%
*-commutative91.4%
sub-neg91.4%
associate-+l-91.4%
*-commutative91.4%
Applied egg-rr91.4%
Taylor expanded in x around 0 77.5%
distribute-lft-out--77.5%
Simplified77.5%
Final simplification74.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -1.3e+79)
t_1
(if (<= z -7.5e-57)
(* (- y z) t)
(if (<= z 5.5e-265)
(+ x (* y t))
(if (<= z 1.5e+32) (* x (- 1.0 y)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -1.3e+79) {
tmp = t_1;
} else if (z <= -7.5e-57) {
tmp = (y - z) * t;
} else if (z <= 5.5e-265) {
tmp = x + (y * t);
} else if (z <= 1.5e+32) {
tmp = x * (1.0 - y);
} 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 <= (-1.3d+79)) then
tmp = t_1
else if (z <= (-7.5d-57)) then
tmp = (y - z) * t
else if (z <= 5.5d-265) then
tmp = x + (y * t)
else if (z <= 1.5d+32) then
tmp = x * (1.0d0 - y)
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 <= -1.3e+79) {
tmp = t_1;
} else if (z <= -7.5e-57) {
tmp = (y - z) * t;
} else if (z <= 5.5e-265) {
tmp = x + (y * t);
} else if (z <= 1.5e+32) {
tmp = x * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -1.3e+79: tmp = t_1 elif z <= -7.5e-57: tmp = (y - z) * t elif z <= 5.5e-265: tmp = x + (y * t) elif z <= 1.5e+32: tmp = x * (1.0 - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -1.3e+79) tmp = t_1; elseif (z <= -7.5e-57) tmp = Float64(Float64(y - z) * t); elseif (z <= 5.5e-265) tmp = Float64(x + Float64(y * t)); elseif (z <= 1.5e+32) tmp = Float64(x * Float64(1.0 - y)); 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 <= -1.3e+79) tmp = t_1; elseif (z <= -7.5e-57) tmp = (y - z) * t; elseif (z <= 5.5e-265) tmp = x + (y * t); elseif (z <= 1.5e+32) tmp = x * (1.0 - y); 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, -1.3e+79], t$95$1, If[LessEqual[z, -7.5e-57], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 5.5e-265], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+32], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-57}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-265}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+32}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.30000000000000007e79 or 1.5e32 < z Initial program 100.0%
Taylor expanded in y around 0 83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
Taylor expanded in z around inf 83.6%
Taylor expanded in z around inf 83.6%
if -1.30000000000000007e79 < z < -7.49999999999999973e-57Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in91.7%
Applied egg-rr91.7%
Taylor expanded in x around 0 62.2%
associate-+r+62.2%
mul-1-neg62.2%
*-commutative62.2%
sub-neg62.2%
associate-+l-62.2%
*-commutative62.2%
Applied egg-rr62.2%
Taylor expanded in x around 0 59.1%
distribute-lft-out--63.3%
Simplified63.3%
if -7.49999999999999973e-57 < z < 5.49999999999999985e-265Initial program 100.0%
Taylor expanded in y around inf 92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in t around inf 69.9%
*-commutative69.9%
Simplified69.9%
if 5.49999999999999985e-265 < z < 1.5e32Initial program 100.0%
Taylor expanded in y around inf 90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in x around inf 70.0%
neg-mul-170.0%
unsub-neg70.0%
Simplified70.0%
Final simplification74.9%
(FPCore (x y z t) :precision binary64 (if (<= y -9.5e-19) (* y t) (if (<= y 1.35e-117) x (if (<= y 1.45e+63) (* z x) (* y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-19) {
tmp = y * t;
} else if (y <= 1.35e-117) {
tmp = x;
} else if (y <= 1.45e+63) {
tmp = z * x;
} else {
tmp = 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 (y <= (-9.5d-19)) then
tmp = y * t
else if (y <= 1.35d-117) then
tmp = x
else if (y <= 1.45d+63) then
tmp = z * x
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-19) {
tmp = y * t;
} else if (y <= 1.35e-117) {
tmp = x;
} else if (y <= 1.45e+63) {
tmp = z * x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.5e-19: tmp = y * t elif y <= 1.35e-117: tmp = x elif y <= 1.45e+63: tmp = z * x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.5e-19) tmp = Float64(y * t); elseif (y <= 1.35e-117) tmp = x; elseif (y <= 1.45e+63) tmp = Float64(z * x); else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.5e-19) tmp = y * t; elseif (y <= 1.35e-117) tmp = x; elseif (y <= 1.45e+63) tmp = z * x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.5e-19], N[(y * t), $MachinePrecision], If[LessEqual[y, 1.35e-117], x, If[LessEqual[y, 1.45e+63], N[(z * x), $MachinePrecision], N[(y * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-19}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-117}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+63}:\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -9.4999999999999995e-19 or 1.45e63 < y Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in95.0%
Applied egg-rr95.0%
Taylor expanded in x around 0 48.0%
associate-+r+48.0%
mul-1-neg48.0%
*-commutative48.0%
sub-neg48.0%
associate-+l-48.0%
*-commutative48.0%
Applied egg-rr48.0%
Taylor expanded in y around inf 42.5%
if -9.4999999999999995e-19 < y < 1.35000000000000001e-117Initial program 100.0%
Taylor expanded in t around inf 79.8%
Taylor expanded in x around inf 41.4%
if 1.35000000000000001e-117 < y < 1.45e63Initial program 100.0%
Taylor expanded in y around 0 83.4%
mul-1-neg83.4%
unsub-neg83.4%
Simplified83.4%
Taylor expanded in z around inf 78.1%
Taylor expanded in z around inf 64.6%
Taylor expanded in x around inf 32.9%
*-commutative32.9%
Simplified32.9%
Final simplification40.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.2e+67) (not (<= z 1.3e+47))) (* z (- x t)) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.2e+67) || !(z <= 1.3e+47)) {
tmp = z * (x - t);
} else {
tmp = x + (y * (t - 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 <= (-2.2d+67)) .or. (.not. (z <= 1.3d+47))) then
tmp = z * (x - t)
else
tmp = x + (y * (t - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.2e+67) || !(z <= 1.3e+47)) {
tmp = z * (x - t);
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.2e+67) or not (z <= 1.3e+47): tmp = z * (x - t) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.2e+67) || !(z <= 1.3e+47)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(x + Float64(y * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.2e+67) || ~((z <= 1.3e+47))) tmp = z * (x - t); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.2e+67], N[Not[LessEqual[z, 1.3e+47]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+67} \lor \neg \left(z \leq 1.3 \cdot 10^{+47}\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -2.2e67 or 1.30000000000000002e47 < z Initial program 100.0%
Taylor expanded in y around 0 84.5%
mul-1-neg84.5%
unsub-neg84.5%
Simplified84.5%
Taylor expanded in z around inf 84.5%
Taylor expanded in z around inf 84.5%
if -2.2e67 < z < 1.30000000000000002e47Initial program 100.0%
Taylor expanded in y around inf 88.5%
*-commutative88.5%
Simplified88.5%
Final simplification86.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.058) (not (<= y 1.4e+63))) (+ x (* y (- t x))) (+ x (* z (- x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.058) || !(y <= 1.4e+63)) {
tmp = x + (y * (t - x));
} 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 <= (-0.058d0)) .or. (.not. (y <= 1.4d+63))) then
tmp = x + (y * (t - x))
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 <= -0.058) || !(y <= 1.4e+63)) {
tmp = x + (y * (t - x));
} else {
tmp = x + (z * (x - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.058) or not (y <= 1.4e+63): tmp = x + (y * (t - x)) else: tmp = x + (z * (x - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.058) || !(y <= 1.4e+63)) tmp = Float64(x + Float64(y * Float64(t - x))); 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 <= -0.058) || ~((y <= 1.4e+63))) tmp = x + (y * (t - x)); else tmp = x + (z * (x - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.058], N[Not[LessEqual[y, 1.4e+63]], $MachinePrecision]], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.058 \lor \neg \left(y \leq 1.4 \cdot 10^{+63}\right):\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\end{array}
\end{array}
if y < -0.0580000000000000029 or 1.39999999999999993e63 < y Initial program 100.0%
Taylor expanded in y around inf 87.2%
*-commutative87.2%
Simplified87.2%
if -0.0580000000000000029 < y < 1.39999999999999993e63Initial program 100.0%
Taylor expanded in y around 0 91.9%
mul-1-neg91.9%
unsub-neg91.9%
Simplified91.9%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.52e-114) (not (<= t 2.9e-104))) (* t (- y z)) (* y (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.52e-114) || !(t <= 2.9e-104)) {
tmp = t * (y - z);
} else {
tmp = y * -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 ((t <= (-1.52d-114)) .or. (.not. (t <= 2.9d-104))) then
tmp = t * (y - z)
else
tmp = y * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.52e-114) || !(t <= 2.9e-104)) {
tmp = t * (y - z);
} else {
tmp = y * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.52e-114) or not (t <= 2.9e-104): tmp = t * (y - z) else: tmp = y * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.52e-114) || !(t <= 2.9e-104)) tmp = Float64(t * Float64(y - z)); else tmp = Float64(y * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.52e-114) || ~((t <= 2.9e-104))) tmp = t * (y - z); else tmp = y * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.52e-114], N[Not[LessEqual[t, 2.9e-104]], $MachinePrecision]], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(y * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{-114} \lor \neg \left(t \leq 2.9 \cdot 10^{-104}\right):\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\end{array}
\end{array}
if t < -1.51999999999999997e-114 or 2.9000000000000001e-104 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in96.5%
Applied egg-rr96.5%
Taylor expanded in x around 0 76.1%
associate-+r+76.1%
mul-1-neg76.1%
*-commutative76.1%
sub-neg76.1%
associate-+l-76.1%
*-commutative76.1%
Applied egg-rr76.1%
Taylor expanded in x around 0 60.7%
distribute-lft-out--63.0%
Simplified63.0%
if -1.51999999999999997e-114 < t < 2.9000000000000001e-104Initial program 100.0%
Taylor expanded in y around inf 69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in x around inf 66.6%
neg-mul-166.6%
unsub-neg66.6%
Simplified66.6%
Taylor expanded in y around inf 43.6%
associate-*r*43.6%
mul-1-neg43.6%
*-commutative43.6%
Simplified43.6%
Final simplification56.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.32e-5) (not (<= x 0.00225))) (* x (+ z 1.0)) (* t (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.32e-5) || !(x <= 0.00225)) {
tmp = x * (z + 1.0);
} else {
tmp = t * (y - z);
}
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 <= (-1.32d-5)) .or. (.not. (x <= 0.00225d0))) then
tmp = x * (z + 1.0d0)
else
tmp = t * (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.32e-5) || !(x <= 0.00225)) {
tmp = x * (z + 1.0);
} else {
tmp = t * (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.32e-5) or not (x <= 0.00225): tmp = x * (z + 1.0) else: tmp = t * (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.32e-5) || !(x <= 0.00225)) tmp = Float64(x * Float64(z + 1.0)); else tmp = Float64(t * Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.32e-5) || ~((x <= 0.00225))) tmp = x * (z + 1.0); else tmp = t * (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.32e-5], N[Not[LessEqual[x, 0.00225]], $MachinePrecision]], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.32 \cdot 10^{-5} \lor \neg \left(x \leq 0.00225\right):\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\end{array}
\end{array}
if x < -1.32000000000000007e-5 or 0.00224999999999999983 < x Initial program 100.0%
Taylor expanded in y around 0 59.7%
mul-1-neg59.7%
unsub-neg59.7%
Simplified59.7%
Taylor expanded in x around inf 54.2%
sub-neg54.2%
mul-1-neg54.2%
remove-double-neg54.2%
+-commutative54.2%
Simplified54.2%
if -1.32000000000000007e-5 < x < 0.00224999999999999983Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in96.5%
Applied egg-rr96.5%
Taylor expanded in x around 0 76.9%
associate-+r+76.9%
mul-1-neg76.9%
*-commutative76.9%
sub-neg76.9%
associate-+l-76.9%
*-commutative76.9%
Applied egg-rr76.9%
Taylor expanded in x around 0 68.6%
distribute-lft-out--72.0%
Simplified72.0%
Final simplification62.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.02e-27) (not (<= y 1.4e+63))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.02e-27) || !(y <= 1.4e+63)) {
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.02d-27)) .or. (.not. (y <= 1.4d+63))) 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.02e-27) || !(y <= 1.4e+63)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.02e-27) or not (y <= 1.4e+63): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.02e-27) || !(y <= 1.4e+63)) 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.02e-27) || ~((y <= 1.4e+63))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.02e-27], N[Not[LessEqual[y, 1.4e+63]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{-27} \lor \neg \left(y \leq 1.4 \cdot 10^{+63}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.02000000000000002e-27 or 1.39999999999999993e63 < y Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in95.0%
Applied egg-rr95.0%
Taylor expanded in x around 0 48.0%
associate-+r+48.0%
mul-1-neg48.0%
*-commutative48.0%
sub-neg48.0%
associate-+l-48.0%
*-commutative48.0%
Applied egg-rr48.0%
Taylor expanded in y around inf 42.5%
if -1.02000000000000002e-27 < y < 1.39999999999999993e63Initial program 100.0%
Taylor expanded in t around inf 74.3%
Taylor expanded in x around inf 35.8%
Final simplification38.9%
(FPCore (x y z t) :precision binary64 (+ x (* (- t x) (- y z))))
double code(double x, double y, double z, double t) {
return x + ((t - 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 - x) * (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
def code(x, y, z, t): return x + ((t - x) * (y - z))
function code(x, y, z, t) return Float64(x + Float64(Float64(t - x) * Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x + ((t - x) * (y - z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right) \cdot \left(y - z\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 t around inf 63.5%
Taylor expanded in x around inf 20.4%
Final simplification20.4%
(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 2024081
(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))))