
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
def code(x, y, z, t): return x + (((y - x) * z) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(y - x) * z) / t)) end
function tmp = code(x, y, z, t) tmp = x + (((y - x) * z) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
def code(x, y, z, t): return x + (((y - x) * z) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(y - x) * z) / t)) end
function tmp = code(x, y, z, t) tmp = x + (((y - x) * z) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= t -2e-8) (not (<= t 5e-48))) (+ x (* z (/ (- y x) t))) (+ x (/ (* (- y x) z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2e-8) || !(t <= 5e-48)) {
tmp = x + (z * ((y - x) / t));
} else {
tmp = x + (((y - x) * z) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-2d-8)) .or. (.not. (t <= 5d-48))) then
tmp = x + (z * ((y - x) / t))
else
tmp = x + (((y - x) * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2e-8) || !(t <= 5e-48)) {
tmp = x + (z * ((y - x) / t));
} else {
tmp = x + (((y - x) * z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2e-8) or not (t <= 5e-48): tmp = x + (z * ((y - x) / t)) else: tmp = x + (((y - x) * z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2e-8) || !(t <= 5e-48)) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / t))); else tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2e-8) || ~((t <= 5e-48))) tmp = x + (z * ((y - x) / t)); else tmp = x + (((y - x) * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2e-8], N[Not[LessEqual[t, 5e-48]], $MachinePrecision]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-8} \lor \neg \left(t \leq 5 \cdot 10^{-48}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\end{array}
\end{array}
if t < -2e-8 or 4.9999999999999999e-48 < t Initial program 85.6%
associate-*l/99.9%
Applied egg-rr99.9%
if -2e-8 < t < 4.9999999999999999e-48Initial program 98.1%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- z) t))) (t_2 (* y (/ z t))))
(if (<= t -3.7e+53)
x
(if (<= t -1.2e-74)
t_2
(if (<= t -1.05e-139)
t_1
(if (<= t -5.2e-216)
(/ (* y z) t)
(if (<= t 2.9e-159)
t_1
(if (<= t 1.32e-36)
t_2
(if (<= t 4.5e+42)
x
(if (<= t 1.4e+183) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (-z / t);
double t_2 = y * (z / t);
double tmp;
if (t <= -3.7e+53) {
tmp = x;
} else if (t <= -1.2e-74) {
tmp = t_2;
} else if (t <= -1.05e-139) {
tmp = t_1;
} else if (t <= -5.2e-216) {
tmp = (y * z) / t;
} else if (t <= 2.9e-159) {
tmp = t_1;
} else if (t <= 1.32e-36) {
tmp = t_2;
} else if (t <= 4.5e+42) {
tmp = x;
} else if (t <= 1.4e+183) {
tmp = z * (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (-z / t)
t_2 = y * (z / t)
if (t <= (-3.7d+53)) then
tmp = x
else if (t <= (-1.2d-74)) then
tmp = t_2
else if (t <= (-1.05d-139)) then
tmp = t_1
else if (t <= (-5.2d-216)) then
tmp = (y * z) / t
else if (t <= 2.9d-159) then
tmp = t_1
else if (t <= 1.32d-36) then
tmp = t_2
else if (t <= 4.5d+42) then
tmp = x
else if (t <= 1.4d+183) then
tmp = z * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (-z / t);
double t_2 = y * (z / t);
double tmp;
if (t <= -3.7e+53) {
tmp = x;
} else if (t <= -1.2e-74) {
tmp = t_2;
} else if (t <= -1.05e-139) {
tmp = t_1;
} else if (t <= -5.2e-216) {
tmp = (y * z) / t;
} else if (t <= 2.9e-159) {
tmp = t_1;
} else if (t <= 1.32e-36) {
tmp = t_2;
} else if (t <= 4.5e+42) {
tmp = x;
} else if (t <= 1.4e+183) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (-z / t) t_2 = y * (z / t) tmp = 0 if t <= -3.7e+53: tmp = x elif t <= -1.2e-74: tmp = t_2 elif t <= -1.05e-139: tmp = t_1 elif t <= -5.2e-216: tmp = (y * z) / t elif t <= 2.9e-159: tmp = t_1 elif t <= 1.32e-36: tmp = t_2 elif t <= 4.5e+42: tmp = x elif t <= 1.4e+183: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(-z) / t)) t_2 = Float64(y * Float64(z / t)) tmp = 0.0 if (t <= -3.7e+53) tmp = x; elseif (t <= -1.2e-74) tmp = t_2; elseif (t <= -1.05e-139) tmp = t_1; elseif (t <= -5.2e-216) tmp = Float64(Float64(y * z) / t); elseif (t <= 2.9e-159) tmp = t_1; elseif (t <= 1.32e-36) tmp = t_2; elseif (t <= 4.5e+42) tmp = x; elseif (t <= 1.4e+183) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (-z / t); t_2 = y * (z / t); tmp = 0.0; if (t <= -3.7e+53) tmp = x; elseif (t <= -1.2e-74) tmp = t_2; elseif (t <= -1.05e-139) tmp = t_1; elseif (t <= -5.2e-216) tmp = (y * z) / t; elseif (t <= 2.9e-159) tmp = t_1; elseif (t <= 1.32e-36) tmp = t_2; elseif (t <= 4.5e+42) tmp = x; elseif (t <= 1.4e+183) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+53], x, If[LessEqual[t, -1.2e-74], t$95$2, If[LessEqual[t, -1.05e-139], t$95$1, If[LessEqual[t, -5.2e-216], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.9e-159], t$95$1, If[LessEqual[t, 1.32e-36], t$95$2, If[LessEqual[t, 4.5e+42], x, If[LessEqual[t, 1.4e+183], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{-z}{t}\\
t_2 := y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-216}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{-36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+42}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+183}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -3.7e53 or 1.31999999999999993e-36 < t < 4.50000000000000012e42 or 1.40000000000000009e183 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -3.7e53 < t < -1.1999999999999999e-74 or 2.8999999999999999e-159 < t < 1.31999999999999993e-36Initial program 97.5%
Taylor expanded in t around 0 80.0%
Taylor expanded in y around inf 58.9%
associate-*r/60.0%
Simplified60.0%
if -1.1999999999999999e-74 < t < -1.05000000000000004e-139 or -5.1999999999999997e-216 < t < 2.8999999999999999e-159Initial program 97.9%
Taylor expanded in t around 0 88.5%
Taylor expanded in y around 0 58.4%
associate-*r/58.4%
mul-1-neg58.4%
distribute-rgt-neg-out58.4%
associate-*l/60.2%
Simplified60.2%
if -1.05000000000000004e-139 < t < -5.1999999999999997e-216Initial program 99.8%
Taylor expanded in t around 0 93.2%
Taylor expanded in y around inf 69.3%
*-commutative69.3%
Simplified69.3%
if 4.50000000000000012e42 < t < 1.40000000000000009e183Initial program 87.1%
Taylor expanded in t around 0 56.6%
Taylor expanded in y around inf 51.5%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Final simplification67.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ z t))))
(if (<= t -7.8e+43)
x
(if (<= t -2e-74)
t_1
(if (<= t -2.45e-124)
(* z (- (/ x t)))
(if (<= t -9.6e-216)
(/ (* y z) t)
(if (<= t 3.3e-161)
(* x (/ (- z) t))
(if (<= t 2.9e-30)
t_1
(if (<= t 9e+45) x (if (<= t 3.1e+182) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (z / t);
double tmp;
if (t <= -7.8e+43) {
tmp = x;
} else if (t <= -2e-74) {
tmp = t_1;
} else if (t <= -2.45e-124) {
tmp = z * -(x / t);
} else if (t <= -9.6e-216) {
tmp = (y * z) / t;
} else if (t <= 3.3e-161) {
tmp = x * (-z / t);
} else if (t <= 2.9e-30) {
tmp = t_1;
} else if (t <= 9e+45) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (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) :: t_1
real(8) :: tmp
t_1 = y * (z / t)
if (t <= (-7.8d+43)) then
tmp = x
else if (t <= (-2d-74)) then
tmp = t_1
else if (t <= (-2.45d-124)) then
tmp = z * -(x / t)
else if (t <= (-9.6d-216)) then
tmp = (y * z) / t
else if (t <= 3.3d-161) then
tmp = x * (-z / t)
else if (t <= 2.9d-30) then
tmp = t_1
else if (t <= 9d+45) then
tmp = x
else if (t <= 3.1d+182) then
tmp = z * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (z / t);
double tmp;
if (t <= -7.8e+43) {
tmp = x;
} else if (t <= -2e-74) {
tmp = t_1;
} else if (t <= -2.45e-124) {
tmp = z * -(x / t);
} else if (t <= -9.6e-216) {
tmp = (y * z) / t;
} else if (t <= 3.3e-161) {
tmp = x * (-z / t);
} else if (t <= 2.9e-30) {
tmp = t_1;
} else if (t <= 9e+45) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (z / t) tmp = 0 if t <= -7.8e+43: tmp = x elif t <= -2e-74: tmp = t_1 elif t <= -2.45e-124: tmp = z * -(x / t) elif t <= -9.6e-216: tmp = (y * z) / t elif t <= 3.3e-161: tmp = x * (-z / t) elif t <= 2.9e-30: tmp = t_1 elif t <= 9e+45: tmp = x elif t <= 3.1e+182: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(z / t)) tmp = 0.0 if (t <= -7.8e+43) tmp = x; elseif (t <= -2e-74) tmp = t_1; elseif (t <= -2.45e-124) tmp = Float64(z * Float64(-Float64(x / t))); elseif (t <= -9.6e-216) tmp = Float64(Float64(y * z) / t); elseif (t <= 3.3e-161) tmp = Float64(x * Float64(Float64(-z) / t)); elseif (t <= 2.9e-30) tmp = t_1; elseif (t <= 9e+45) tmp = x; elseif (t <= 3.1e+182) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (z / t); tmp = 0.0; if (t <= -7.8e+43) tmp = x; elseif (t <= -2e-74) tmp = t_1; elseif (t <= -2.45e-124) tmp = z * -(x / t); elseif (t <= -9.6e-216) tmp = (y * z) / t; elseif (t <= 3.3e-161) tmp = x * (-z / t); elseif (t <= 2.9e-30) tmp = t_1; elseif (t <= 9e+45) tmp = x; elseif (t <= 3.1e+182) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+43], x, If[LessEqual[t, -2e-74], t$95$1, If[LessEqual[t, -2.45e-124], N[(z * (-N[(x / t), $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -9.6e-216], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3.3e-161], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-30], t$95$1, If[LessEqual[t, 9e+45], x, If[LessEqual[t, 3.1e+182], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.45 \cdot 10^{-124}:\\
\;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-216}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-161}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -7.8000000000000001e43 or 2.89999999999999989e-30 < t < 8.9999999999999997e45 or 3.09999999999999996e182 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -7.8000000000000001e43 < t < -1.99999999999999992e-74 or 3.2999999999999998e-161 < t < 2.89999999999999989e-30Initial program 97.5%
Taylor expanded in t around 0 80.0%
Taylor expanded in y around inf 58.9%
associate-*r/60.0%
Simplified60.0%
if -1.99999999999999992e-74 < t < -2.44999999999999983e-124Initial program 99.8%
Taylor expanded in t around 0 80.5%
associate-*l/99.4%
Applied egg-rr80.2%
Taylor expanded in y around 0 65.5%
neg-mul-165.5%
distribute-neg-frac65.5%
Simplified65.5%
if -2.44999999999999983e-124 < t < -9.60000000000000014e-216Initial program 99.8%
Taylor expanded in t around 0 93.2%
Taylor expanded in y around inf 69.3%
*-commutative69.3%
Simplified69.3%
if -9.60000000000000014e-216 < t < 3.2999999999999998e-161Initial program 97.1%
Taylor expanded in t around 0 91.6%
Taylor expanded in y around 0 55.5%
associate-*r/55.5%
mul-1-neg55.5%
distribute-rgt-neg-out55.5%
associate-*l/60.6%
Simplified60.6%
if 8.9999999999999997e45 < t < 3.09999999999999996e182Initial program 87.1%
Taylor expanded in t around 0 56.6%
Taylor expanded in y around inf 51.5%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Final simplification68.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ z t))))
(if (<= t -6.4e+49)
x
(if (<= t -1.1e-74)
t_1
(if (<= t -4.1e-129)
(/ (- z) (/ t x))
(if (<= t -9.8e-216)
(/ (* y z) t)
(if (<= t 1.7e-161)
(* x (/ (- z) t))
(if (<= t 1.6e-25)
t_1
(if (<= t 1.02e+47)
x
(if (<= t 9.8e+185) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (z / t);
double tmp;
if (t <= -6.4e+49) {
tmp = x;
} else if (t <= -1.1e-74) {
tmp = t_1;
} else if (t <= -4.1e-129) {
tmp = -z / (t / x);
} else if (t <= -9.8e-216) {
tmp = (y * z) / t;
} else if (t <= 1.7e-161) {
tmp = x * (-z / t);
} else if (t <= 1.6e-25) {
tmp = t_1;
} else if (t <= 1.02e+47) {
tmp = x;
} else if (t <= 9.8e+185) {
tmp = z * (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) :: t_1
real(8) :: tmp
t_1 = y * (z / t)
if (t <= (-6.4d+49)) then
tmp = x
else if (t <= (-1.1d-74)) then
tmp = t_1
else if (t <= (-4.1d-129)) then
tmp = -z / (t / x)
else if (t <= (-9.8d-216)) then
tmp = (y * z) / t
else if (t <= 1.7d-161) then
tmp = x * (-z / t)
else if (t <= 1.6d-25) then
tmp = t_1
else if (t <= 1.02d+47) then
tmp = x
else if (t <= 9.8d+185) then
tmp = z * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (z / t);
double tmp;
if (t <= -6.4e+49) {
tmp = x;
} else if (t <= -1.1e-74) {
tmp = t_1;
} else if (t <= -4.1e-129) {
tmp = -z / (t / x);
} else if (t <= -9.8e-216) {
tmp = (y * z) / t;
} else if (t <= 1.7e-161) {
tmp = x * (-z / t);
} else if (t <= 1.6e-25) {
tmp = t_1;
} else if (t <= 1.02e+47) {
tmp = x;
} else if (t <= 9.8e+185) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (z / t) tmp = 0 if t <= -6.4e+49: tmp = x elif t <= -1.1e-74: tmp = t_1 elif t <= -4.1e-129: tmp = -z / (t / x) elif t <= -9.8e-216: tmp = (y * z) / t elif t <= 1.7e-161: tmp = x * (-z / t) elif t <= 1.6e-25: tmp = t_1 elif t <= 1.02e+47: tmp = x elif t <= 9.8e+185: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(z / t)) tmp = 0.0 if (t <= -6.4e+49) tmp = x; elseif (t <= -1.1e-74) tmp = t_1; elseif (t <= -4.1e-129) tmp = Float64(Float64(-z) / Float64(t / x)); elseif (t <= -9.8e-216) tmp = Float64(Float64(y * z) / t); elseif (t <= 1.7e-161) tmp = Float64(x * Float64(Float64(-z) / t)); elseif (t <= 1.6e-25) tmp = t_1; elseif (t <= 1.02e+47) tmp = x; elseif (t <= 9.8e+185) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (z / t); tmp = 0.0; if (t <= -6.4e+49) tmp = x; elseif (t <= -1.1e-74) tmp = t_1; elseif (t <= -4.1e-129) tmp = -z / (t / x); elseif (t <= -9.8e-216) tmp = (y * z) / t; elseif (t <= 1.7e-161) tmp = x * (-z / t); elseif (t <= 1.6e-25) tmp = t_1; elseif (t <= 1.02e+47) tmp = x; elseif (t <= 9.8e+185) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+49], x, If[LessEqual[t, -1.1e-74], t$95$1, If[LessEqual[t, -4.1e-129], N[((-z) / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.8e-216], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.7e-161], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-25], t$95$1, If[LessEqual[t, 1.02e+47], x, If[LessEqual[t, 9.8e+185], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-129}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-216}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-161}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+185}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.40000000000000028e49 or 1.6000000000000001e-25 < t < 1.0199999999999999e47 or 9.79999999999999968e185 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -6.40000000000000028e49 < t < -1.10000000000000005e-74 or 1.69999999999999991e-161 < t < 1.6000000000000001e-25Initial program 97.5%
Taylor expanded in t around 0 80.0%
Taylor expanded in y around inf 58.9%
associate-*r/60.0%
Simplified60.0%
if -1.10000000000000005e-74 < t < -4.1e-129Initial program 99.8%
Taylor expanded in t around 0 80.5%
Taylor expanded in y around 0 65.8%
associate-*r/65.8%
mul-1-neg65.8%
distribute-rgt-neg-out65.8%
associate-*l/59.0%
Simplified59.0%
Taylor expanded in z around 0 65.8%
mul-1-neg65.8%
associate-/l*65.6%
distribute-neg-frac65.6%
Simplified65.6%
if -4.1e-129 < t < -9.8000000000000003e-216Initial program 99.8%
Taylor expanded in t around 0 93.2%
Taylor expanded in y around inf 69.3%
*-commutative69.3%
Simplified69.3%
if -9.8000000000000003e-216 < t < 1.69999999999999991e-161Initial program 97.1%
Taylor expanded in t around 0 91.6%
Taylor expanded in y around 0 55.5%
associate-*r/55.5%
mul-1-neg55.5%
distribute-rgt-neg-out55.5%
associate-*l/60.6%
Simplified60.6%
if 1.0199999999999999e47 < t < 9.79999999999999968e185Initial program 87.1%
Taylor expanded in t around 0 56.6%
Taylor expanded in y around inf 51.5%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Final simplification68.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ z t))))
(if (<= t -4.2e+48)
x
(if (<= t -2e-74)
t_1
(if (<= t -7.2e-135)
(/ (* x (- z)) t)
(if (<= t -1.25e-215)
(/ (* y z) t)
(if (<= t 2.4e-159)
(* x (/ (- z) t))
(if (<= t 1.7e-32)
t_1
(if (<= t 1.9e+47)
x
(if (<= t 3.2e+182) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (z / t);
double tmp;
if (t <= -4.2e+48) {
tmp = x;
} else if (t <= -2e-74) {
tmp = t_1;
} else if (t <= -7.2e-135) {
tmp = (x * -z) / t;
} else if (t <= -1.25e-215) {
tmp = (y * z) / t;
} else if (t <= 2.4e-159) {
tmp = x * (-z / t);
} else if (t <= 1.7e-32) {
tmp = t_1;
} else if (t <= 1.9e+47) {
tmp = x;
} else if (t <= 3.2e+182) {
tmp = z * (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) :: t_1
real(8) :: tmp
t_1 = y * (z / t)
if (t <= (-4.2d+48)) then
tmp = x
else if (t <= (-2d-74)) then
tmp = t_1
else if (t <= (-7.2d-135)) then
tmp = (x * -z) / t
else if (t <= (-1.25d-215)) then
tmp = (y * z) / t
else if (t <= 2.4d-159) then
tmp = x * (-z / t)
else if (t <= 1.7d-32) then
tmp = t_1
else if (t <= 1.9d+47) then
tmp = x
else if (t <= 3.2d+182) then
tmp = z * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (z / t);
double tmp;
if (t <= -4.2e+48) {
tmp = x;
} else if (t <= -2e-74) {
tmp = t_1;
} else if (t <= -7.2e-135) {
tmp = (x * -z) / t;
} else if (t <= -1.25e-215) {
tmp = (y * z) / t;
} else if (t <= 2.4e-159) {
tmp = x * (-z / t);
} else if (t <= 1.7e-32) {
tmp = t_1;
} else if (t <= 1.9e+47) {
tmp = x;
} else if (t <= 3.2e+182) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (z / t) tmp = 0 if t <= -4.2e+48: tmp = x elif t <= -2e-74: tmp = t_1 elif t <= -7.2e-135: tmp = (x * -z) / t elif t <= -1.25e-215: tmp = (y * z) / t elif t <= 2.4e-159: tmp = x * (-z / t) elif t <= 1.7e-32: tmp = t_1 elif t <= 1.9e+47: tmp = x elif t <= 3.2e+182: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(z / t)) tmp = 0.0 if (t <= -4.2e+48) tmp = x; elseif (t <= -2e-74) tmp = t_1; elseif (t <= -7.2e-135) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (t <= -1.25e-215) tmp = Float64(Float64(y * z) / t); elseif (t <= 2.4e-159) tmp = Float64(x * Float64(Float64(-z) / t)); elseif (t <= 1.7e-32) tmp = t_1; elseif (t <= 1.9e+47) tmp = x; elseif (t <= 3.2e+182) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (z / t); tmp = 0.0; if (t <= -4.2e+48) tmp = x; elseif (t <= -2e-74) tmp = t_1; elseif (t <= -7.2e-135) tmp = (x * -z) / t; elseif (t <= -1.25e-215) tmp = (y * z) / t; elseif (t <= 2.4e-159) tmp = x * (-z / t); elseif (t <= 1.7e-32) tmp = t_1; elseif (t <= 1.9e+47) tmp = x; elseif (t <= 3.2e+182) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+48], x, If[LessEqual[t, -2e-74], t$95$1, If[LessEqual[t, -7.2e-135], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, -1.25e-215], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.4e-159], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-32], t$95$1, If[LessEqual[t, 1.9e+47], x, If[LessEqual[t, 3.2e+182], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+48}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-135}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-215}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-159}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.1999999999999997e48 or 1.69999999999999989e-32 < t < 1.9000000000000002e47 or 3.1999999999999997e182 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -4.1999999999999997e48 < t < -1.99999999999999992e-74 or 2.39999999999999997e-159 < t < 1.69999999999999989e-32Initial program 97.5%
Taylor expanded in t around 0 80.0%
Taylor expanded in y around inf 58.9%
associate-*r/60.0%
Simplified60.0%
if -1.99999999999999992e-74 < t < -7.19999999999999955e-135Initial program 99.8%
Taylor expanded in t around 0 80.5%
Taylor expanded in y around 0 65.8%
mul-1-neg65.8%
distribute-rgt-neg-out65.8%
Simplified65.8%
if -7.19999999999999955e-135 < t < -1.24999999999999989e-215Initial program 99.8%
Taylor expanded in t around 0 93.2%
Taylor expanded in y around inf 69.3%
*-commutative69.3%
Simplified69.3%
if -1.24999999999999989e-215 < t < 2.39999999999999997e-159Initial program 97.1%
Taylor expanded in t around 0 91.6%
Taylor expanded in y around 0 55.5%
associate-*r/55.5%
mul-1-neg55.5%
distribute-rgt-neg-out55.5%
associate-*l/60.6%
Simplified60.6%
if 1.9000000000000002e47 < t < 3.1999999999999997e182Initial program 87.1%
Taylor expanded in t around 0 56.6%
Taylor expanded in y around inf 51.5%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Final simplification68.0%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.6e+153)
x
(if (or (<= t -7.2e+92) (and (not (<= t -5.2e+57)) (<= t 3.1e+182)))
(* (- y x) (/ z t))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e+153) {
tmp = x;
} else if ((t <= -7.2e+92) || (!(t <= -5.2e+57) && (t <= 3.1e+182))) {
tmp = (y - x) * (z / 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 (t <= (-1.6d+153)) then
tmp = x
else if ((t <= (-7.2d+92)) .or. (.not. (t <= (-5.2d+57))) .and. (t <= 3.1d+182)) then
tmp = (y - x) * (z / 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 (t <= -1.6e+153) {
tmp = x;
} else if ((t <= -7.2e+92) || (!(t <= -5.2e+57) && (t <= 3.1e+182))) {
tmp = (y - x) * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.6e+153: tmp = x elif (t <= -7.2e+92) or (not (t <= -5.2e+57) and (t <= 3.1e+182)): tmp = (y - x) * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.6e+153) tmp = x; elseif ((t <= -7.2e+92) || (!(t <= -5.2e+57) && (t <= 3.1e+182))) tmp = Float64(Float64(y - x) * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.6e+153) tmp = x; elseif ((t <= -7.2e+92) || (~((t <= -5.2e+57)) && (t <= 3.1e+182))) tmp = (y - x) * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.6e+153], x, If[Or[LessEqual[t, -7.2e+92], And[N[Not[LessEqual[t, -5.2e+57]], $MachinePrecision], LessEqual[t, 3.1e+182]]], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+153}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{+92} \lor \neg \left(t \leq -5.2 \cdot 10^{+57}\right) \land t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.6000000000000001e153 or -7.2e92 < t < -5.2e57 or 3.09999999999999996e182 < t Initial program 79.8%
Taylor expanded in z around 0 84.2%
if -1.6000000000000001e153 < t < -7.2e92 or -5.2e57 < t < 3.09999999999999996e182Initial program 96.5%
Taylor expanded in t around 0 77.4%
*-commutative77.4%
associate-*l/78.2%
Applied egg-rr78.2%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(if (<= t -5e+150)
x
(if (<= t -9e+92)
(* z (/ (- y x) t))
(if (<= t -3.8e+56) x (if (<= t 2.3e+183) (* (- y x) (/ z t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5e+150) {
tmp = x;
} else if (t <= -9e+92) {
tmp = z * ((y - x) / t);
} else if (t <= -3.8e+56) {
tmp = x;
} else if (t <= 2.3e+183) {
tmp = (y - x) * (z / 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 (t <= (-5d+150)) then
tmp = x
else if (t <= (-9d+92)) then
tmp = z * ((y - x) / t)
else if (t <= (-3.8d+56)) then
tmp = x
else if (t <= 2.3d+183) then
tmp = (y - x) * (z / 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 (t <= -5e+150) {
tmp = x;
} else if (t <= -9e+92) {
tmp = z * ((y - x) / t);
} else if (t <= -3.8e+56) {
tmp = x;
} else if (t <= 2.3e+183) {
tmp = (y - x) * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5e+150: tmp = x elif t <= -9e+92: tmp = z * ((y - x) / t) elif t <= -3.8e+56: tmp = x elif t <= 2.3e+183: tmp = (y - x) * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5e+150) tmp = x; elseif (t <= -9e+92) tmp = Float64(z * Float64(Float64(y - x) / t)); elseif (t <= -3.8e+56) tmp = x; elseif (t <= 2.3e+183) tmp = Float64(Float64(y - x) * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5e+150) tmp = x; elseif (t <= -9e+92) tmp = z * ((y - x) / t); elseif (t <= -3.8e+56) tmp = x; elseif (t <= 2.3e+183) tmp = (y - x) * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5e+150], x, If[LessEqual[t, -9e+92], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e+56], x, If[LessEqual[t, 2.3e+183], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+150}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -9 \cdot 10^{+92}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{+56}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+183}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -5.00000000000000009e150 or -8.9999999999999998e92 < t < -3.79999999999999996e56 or 2.2999999999999998e183 < t Initial program 79.8%
Taylor expanded in z around 0 84.2%
if -5.00000000000000009e150 < t < -8.9999999999999998e92Initial program 92.9%
Taylor expanded in t around 0 63.5%
associate-*l/99.9%
Applied egg-rr70.5%
if -3.79999999999999996e56 < t < 2.2999999999999998e183Initial program 96.8%
Taylor expanded in t around 0 78.5%
*-commutative78.5%
associate-*l/78.9%
Applied egg-rr78.9%
Final simplification80.3%
(FPCore (x y z t)
:precision binary64
(if (<= t -2.8e+47)
x
(if (or (<= t 1.05e-26) (and (not (<= t 1.15e+43)) (<= t 5e+182)))
(* y (/ z t))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.8e+47) {
tmp = x;
} else if ((t <= 1.05e-26) || (!(t <= 1.15e+43) && (t <= 5e+182))) {
tmp = y * (z / 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 (t <= (-2.8d+47)) then
tmp = x
else if ((t <= 1.05d-26) .or. (.not. (t <= 1.15d+43)) .and. (t <= 5d+182)) then
tmp = y * (z / 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 (t <= -2.8e+47) {
tmp = x;
} else if ((t <= 1.05e-26) || (!(t <= 1.15e+43) && (t <= 5e+182))) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.8e+47: tmp = x elif (t <= 1.05e-26) or (not (t <= 1.15e+43) and (t <= 5e+182)): tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.8e+47) tmp = x; elseif ((t <= 1.05e-26) || (!(t <= 1.15e+43) && (t <= 5e+182))) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.8e+47) tmp = x; elseif ((t <= 1.05e-26) || (~((t <= 1.15e+43)) && (t <= 5e+182))) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.8e+47], x, If[Or[LessEqual[t, 1.05e-26], And[N[Not[LessEqual[t, 1.15e+43]], $MachinePrecision], LessEqual[t, 5e+182]]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-26} \lor \neg \left(t \leq 1.15 \cdot 10^{+43}\right) \land t \leq 5 \cdot 10^{+182}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.79999999999999988e47 or 1.05000000000000004e-26 < t < 1.1500000000000001e43 or 4.99999999999999973e182 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -2.79999999999999988e47 < t < 1.05000000000000004e-26 or 1.1500000000000001e43 < t < 4.99999999999999973e182Initial program 96.5%
Taylor expanded in t around 0 82.2%
Taylor expanded in y around inf 53.7%
associate-*r/54.3%
Simplified54.3%
Final simplification63.4%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.85e+49)
x
(if (<= t 4.9e-42)
(* y (/ z t))
(if (<= t 7.6e+47) x (if (<= t 3.1e+182) (* z (/ y t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.85e+49) {
tmp = x;
} else if (t <= 4.9e-42) {
tmp = y * (z / t);
} else if (t <= 7.6e+47) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (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 (t <= (-1.85d+49)) then
tmp = x
else if (t <= 4.9d-42) then
tmp = y * (z / t)
else if (t <= 7.6d+47) then
tmp = x
else if (t <= 3.1d+182) then
tmp = z * (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 (t <= -1.85e+49) {
tmp = x;
} else if (t <= 4.9e-42) {
tmp = y * (z / t);
} else if (t <= 7.6e+47) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.85e+49: tmp = x elif t <= 4.9e-42: tmp = y * (z / t) elif t <= 7.6e+47: tmp = x elif t <= 3.1e+182: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.85e+49) tmp = x; elseif (t <= 4.9e-42) tmp = Float64(y * Float64(z / t)); elseif (t <= 7.6e+47) tmp = x; elseif (t <= 3.1e+182) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.85e+49) tmp = x; elseif (t <= 4.9e-42) tmp = y * (z / t); elseif (t <= 7.6e+47) tmp = x; elseif (t <= 3.1e+182) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.85e+49], x, If[LessEqual[t, 4.9e-42], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.6e+47], x, If[LessEqual[t, 3.1e+182], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{-42}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.85000000000000009e49 or 4.9e-42 < t < 7.6000000000000007e47 or 3.09999999999999996e182 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -1.85000000000000009e49 < t < 4.9e-42Initial program 98.2%
Taylor expanded in t around 0 86.9%
Taylor expanded in y around inf 54.1%
associate-*r/53.6%
Simplified53.6%
if 7.6000000000000007e47 < t < 3.09999999999999996e182Initial program 87.1%
Taylor expanded in t around 0 56.6%
Taylor expanded in y around inf 51.5%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Final simplification63.5%
(FPCore (x y z t)
:precision binary64
(if (<= t -2.2e+52)
x
(if (<= t 1.42e-39)
(/ y (/ t z))
(if (<= t 3.05e+44) x (if (<= t 3.1e+182) (* z (/ y t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.2e+52) {
tmp = x;
} else if (t <= 1.42e-39) {
tmp = y / (t / z);
} else if (t <= 3.05e+44) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (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 (t <= (-2.2d+52)) then
tmp = x
else if (t <= 1.42d-39) then
tmp = y / (t / z)
else if (t <= 3.05d+44) then
tmp = x
else if (t <= 3.1d+182) then
tmp = z * (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 (t <= -2.2e+52) {
tmp = x;
} else if (t <= 1.42e-39) {
tmp = y / (t / z);
} else if (t <= 3.05e+44) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.2e+52: tmp = x elif t <= 1.42e-39: tmp = y / (t / z) elif t <= 3.05e+44: tmp = x elif t <= 3.1e+182: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.2e+52) tmp = x; elseif (t <= 1.42e-39) tmp = Float64(y / Float64(t / z)); elseif (t <= 3.05e+44) tmp = x; elseif (t <= 3.1e+182) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.2e+52) tmp = x; elseif (t <= 1.42e-39) tmp = y / (t / z); elseif (t <= 3.05e+44) tmp = x; elseif (t <= 3.1e+182) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.2e+52], x, If[LessEqual[t, 1.42e-39], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.05e+44], x, If[LessEqual[t, 3.1e+182], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{-39}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq 3.05 \cdot 10^{+44}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.2e52 or 1.42000000000000005e-39 < t < 3.04999999999999991e44 or 3.09999999999999996e182 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -2.2e52 < t < 1.42000000000000005e-39Initial program 98.2%
Taylor expanded in t around 0 86.9%
Taylor expanded in y around inf 54.1%
associate-*r/53.6%
Simplified53.6%
clear-num53.6%
un-div-inv53.7%
Applied egg-rr53.7%
if 3.04999999999999991e44 < t < 3.09999999999999996e182Initial program 87.1%
Taylor expanded in t around 0 56.6%
Taylor expanded in y around inf 51.5%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Final simplification63.5%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.65e+53)
x
(if (<= t 1.9e-28)
(/ (* y z) t)
(if (<= t 7.2e+45) x (if (<= t 3.1e+182) (* z (/ y t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.65e+53) {
tmp = x;
} else if (t <= 1.9e-28) {
tmp = (y * z) / t;
} else if (t <= 7.2e+45) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (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 (t <= (-1.65d+53)) then
tmp = x
else if (t <= 1.9d-28) then
tmp = (y * z) / t
else if (t <= 7.2d+45) then
tmp = x
else if (t <= 3.1d+182) then
tmp = z * (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 (t <= -1.65e+53) {
tmp = x;
} else if (t <= 1.9e-28) {
tmp = (y * z) / t;
} else if (t <= 7.2e+45) {
tmp = x;
} else if (t <= 3.1e+182) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.65e+53: tmp = x elif t <= 1.9e-28: tmp = (y * z) / t elif t <= 7.2e+45: tmp = x elif t <= 3.1e+182: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.65e+53) tmp = x; elseif (t <= 1.9e-28) tmp = Float64(Float64(y * z) / t); elseif (t <= 7.2e+45) tmp = x; elseif (t <= 3.1e+182) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.65e+53) tmp = x; elseif (t <= 1.9e-28) tmp = (y * z) / t; elseif (t <= 7.2e+45) tmp = x; elseif (t <= 3.1e+182) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.65e+53], x, If[LessEqual[t, 1.9e-28], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 7.2e+45], x, If[LessEqual[t, 3.1e+182], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+53}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-28}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.6500000000000001e53 or 1.90000000000000005e-28 < t < 7.2e45 or 3.09999999999999996e182 < t Initial program 84.1%
Taylor expanded in z around 0 74.4%
if -1.6500000000000001e53 < t < 1.90000000000000005e-28Initial program 98.2%
Taylor expanded in t around 0 86.9%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
Simplified54.1%
if 7.2e45 < t < 3.09999999999999996e182Initial program 87.1%
Taylor expanded in t around 0 56.6%
Taylor expanded in y around inf 51.5%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Final simplification63.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3e-28) (not (<= t 3.2e-86))) (+ x (* y (/ z t))) (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3e-28) || !(t <= 3.2e-86)) {
tmp = x + (y * (z / t));
} else {
tmp = (y - x) * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-3d-28)) .or. (.not. (t <= 3.2d-86))) then
tmp = x + (y * (z / t))
else
tmp = (y - x) * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3e-28) || !(t <= 3.2e-86)) {
tmp = x + (y * (z / t));
} else {
tmp = (y - x) * (z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3e-28) or not (t <= 3.2e-86): tmp = x + (y * (z / t)) else: tmp = (y - x) * (z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3e-28) || !(t <= 3.2e-86)) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(Float64(y - x) * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3e-28) || ~((t <= 3.2e-86))) tmp = x + (y * (z / t)); else tmp = (y - x) * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3e-28], N[Not[LessEqual[t, 3.2e-86]], $MachinePrecision]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-28} \lor \neg \left(t \leq 3.2 \cdot 10^{-86}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -3.00000000000000003e-28 or 3.20000000000000006e-86 < t Initial program 86.6%
Taylor expanded in y around inf 84.3%
associate-*r/29.8%
Simplified90.0%
if -3.00000000000000003e-28 < t < 3.20000000000000006e-86Initial program 97.9%
Taylor expanded in t around 0 90.0%
*-commutative90.0%
associate-*l/88.2%
Applied egg-rr88.2%
Final simplification89.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.8e-6) (not (<= y 1.65e+36))) (+ x (* y (/ z t))) (- x (* x (/ z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.8e-6) || !(y <= 1.65e+36)) {
tmp = x + (y * (z / t));
} else {
tmp = x - (x * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9.8d-6)) .or. (.not. (y <= 1.65d+36))) then
tmp = x + (y * (z / t))
else
tmp = x - (x * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.8e-6) || !(y <= 1.65e+36)) {
tmp = x + (y * (z / t));
} else {
tmp = x - (x * (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.8e-6) or not (y <= 1.65e+36): tmp = x + (y * (z / t)) else: tmp = x - (x * (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.8e-6) || !(y <= 1.65e+36)) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x - Float64(x * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.8e-6) || ~((y <= 1.65e+36))) tmp = x + (y * (z / t)); else tmp = x - (x * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.8e-6], N[Not[LessEqual[y, 1.65e+36]], $MachinePrecision]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{-6} \lor \neg \left(y \leq 1.65 \cdot 10^{+36}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{z}{t}\\
\end{array}
\end{array}
if y < -9.79999999999999934e-6 or 1.6499999999999999e36 < y Initial program 90.7%
Taylor expanded in y around inf 85.6%
associate-*r/60.7%
Simplified92.2%
if -9.79999999999999934e-6 < y < 1.6499999999999999e36Initial program 91.2%
Taylor expanded in x around inf 88.5%
*-commutative88.5%
distribute-lft-in88.5%
*-rgt-identity88.5%
mul-1-neg88.5%
distribute-rgt-neg-in88.5%
unsub-neg88.5%
Simplified88.5%
Final simplification90.5%
(FPCore (x y z t) :precision binary64 (if (<= y -7.8e+93) (+ x (* y (/ z t))) (+ x (* z (/ (- y x) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.8e+93) {
tmp = x + (y * (z / t));
} else {
tmp = x + (z * ((y - 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 <= (-7.8d+93)) then
tmp = x + (y * (z / t))
else
tmp = x + (z * ((y - x) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.8e+93) {
tmp = x + (y * (z / t));
} else {
tmp = x + (z * ((y - x) / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.8e+93: tmp = x + (y * (z / t)) else: tmp = x + (z * ((y - x) / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.8e+93) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.8e+93) tmp = x + (y * (z / t)); else tmp = x + (z * ((y - x) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.8e+93], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+93}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\end{array}
\end{array}
if y < -7.8000000000000005e93Initial program 86.7%
Taylor expanded in y around inf 86.7%
associate-*r/60.2%
Simplified98.0%
if -7.8000000000000005e93 < y Initial program 92.0%
associate-*l/95.7%
Applied egg-rr95.7%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 (if (<= z -1.1e-212) (+ x (* z (/ (- y x) t))) (+ x (/ (- y x) (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e-212) {
tmp = x + (z * ((y - x) / t));
} else {
tmp = x + ((y - x) / (t / 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 (z <= (-1.1d-212)) then
tmp = x + (z * ((y - x) / t))
else
tmp = x + ((y - x) / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e-212) {
tmp = x + (z * ((y - x) / t));
} else {
tmp = x + ((y - x) / (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.1e-212: tmp = x + (z * ((y - x) / t)) else: tmp = x + ((y - x) / (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.1e-212) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.1e-212) tmp = x + (z * ((y - x) / t)); else tmp = x + ((y - x) / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.1e-212], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-212}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\end{array}
\end{array}
if z < -1.10000000000000002e-212Initial program 87.5%
associate-*l/99.1%
Applied egg-rr99.1%
if -1.10000000000000002e-212 < z Initial program 94.1%
associate-/l*99.2%
Simplified99.2%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
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 - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
Initial program 90.9%
+-commutative90.9%
*-commutative90.9%
associate-*l/97.8%
fma-def97.8%
Simplified97.8%
fma-udef97.8%
associate-*l/90.9%
*-commutative90.9%
associate-*r/97.8%
Applied egg-rr97.8%
Final simplification97.8%
(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 90.9%
Taylor expanded in z around 0 42.4%
Final simplification42.4%
(FPCore (x y z t)
:precision binary64
(if (< x -9.025511195533005e-135)
(- x (* (/ z t) (- x y)))
(if (< x 4.275032163700715e-250)
(+ x (* (/ (- y x) t) z))
(+ x (/ (- y x) (/ t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x < -9.025511195533005e-135) {
tmp = x - ((z / t) * (x - y));
} else if (x < 4.275032163700715e-250) {
tmp = x + (((y - x) / t) * z);
} else {
tmp = x + ((y - x) / (t / 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 < (-9.025511195533005d-135)) then
tmp = x - ((z / t) * (x - y))
else if (x < 4.275032163700715d-250) then
tmp = x + (((y - x) / t) * z)
else
tmp = x + ((y - x) / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x < -9.025511195533005e-135) {
tmp = x - ((z / t) * (x - y));
} else if (x < 4.275032163700715e-250) {
tmp = x + (((y - x) / t) * z);
} else {
tmp = x + ((y - x) / (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x < -9.025511195533005e-135: tmp = x - ((z / t) * (x - y)) elif x < 4.275032163700715e-250: tmp = x + (((y - x) / t) * z) else: tmp = x + ((y - x) / (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x < -9.025511195533005e-135) tmp = Float64(x - Float64(Float64(z / t) * Float64(x - y))); elseif (x < 4.275032163700715e-250) tmp = Float64(x + Float64(Float64(Float64(y - x) / t) * z)); else tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x < -9.025511195533005e-135) tmp = x - ((z / t) * (x - y)); elseif (x < 4.275032163700715e-250) tmp = x + (((y - x) / t) * z); else tmp = x + ((y - x) / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Less[x, -9.025511195533005e-135], N[(x - N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[x, 4.275032163700715e-250], N[(x + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\
\;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\
\mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\
\;\;\;\;x + \frac{y - x}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\end{array}
\end{array}
herbie shell --seed 2023199
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))
(+ x (/ (* (- y x) z) t)))