
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= t_m 1.05e+149)
(* t_m (/ (- x y) (- z y)))
(/ (- x y) (/ (- z y) t_m)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (t_m <= 1.05e+149) {
tmp = t_m * ((x - y) / (z - y));
} else {
tmp = (x - y) / ((z - y) / t_m);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (t_m <= 1.05d+149) then
tmp = t_m * ((x - y) / (z - y))
else
tmp = (x - y) / ((z - y) / t_m)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (t_m <= 1.05e+149) {
tmp = t_m * ((x - y) / (z - y));
} else {
tmp = (x - y) / ((z - y) / t_m);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if t_m <= 1.05e+149: tmp = t_m * ((x - y) / (z - y)) else: tmp = (x - y) / ((z - y) / t_m) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (t_m <= 1.05e+149) tmp = Float64(t_m * Float64(Float64(x - y) / Float64(z - y))); else tmp = Float64(Float64(x - y) / Float64(Float64(z - y) / t_m)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (t_m <= 1.05e+149) tmp = t_m * ((x - y) / (z - y)); else tmp = (x - y) / ((z - y) / t_m); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 1.05e+149], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(N[(z - y), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.05 \cdot 10^{+149}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\frac{z - y}{t\_m}}\\
\end{array}
\end{array}
if t < 1.0500000000000001e149Initial program 96.3%
if 1.0500000000000001e149 < t Initial program 93.7%
associate-/r/97.4%
Simplified97.4%
Final simplification96.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(let* ((t_2 (* x (/ t_m (- z y)))))
(*
t_s
(if (<= y -3.1e+179)
t_m
(if (<= y -7.4e+17)
t_2
(if (<= y -5e-189)
(* (- x y) (/ t_m z))
(if (<= y 3e+126) t_2 t_m)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double t_2 = x * (t_m / (z - y));
double tmp;
if (y <= -3.1e+179) {
tmp = t_m;
} else if (y <= -7.4e+17) {
tmp = t_2;
} else if (y <= -5e-189) {
tmp = (x - y) * (t_m / z);
} else if (y <= 3e+126) {
tmp = t_2;
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = x * (t_m / (z - y))
if (y <= (-3.1d+179)) then
tmp = t_m
else if (y <= (-7.4d+17)) then
tmp = t_2
else if (y <= (-5d-189)) then
tmp = (x - y) * (t_m / z)
else if (y <= 3d+126) then
tmp = t_2
else
tmp = t_m
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double t_2 = x * (t_m / (z - y));
double tmp;
if (y <= -3.1e+179) {
tmp = t_m;
} else if (y <= -7.4e+17) {
tmp = t_2;
} else if (y <= -5e-189) {
tmp = (x - y) * (t_m / z);
} else if (y <= 3e+126) {
tmp = t_2;
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): t_2 = x * (t_m / (z - y)) tmp = 0 if y <= -3.1e+179: tmp = t_m elif y <= -7.4e+17: tmp = t_2 elif y <= -5e-189: tmp = (x - y) * (t_m / z) elif y <= 3e+126: tmp = t_2 else: tmp = t_m return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) t_2 = Float64(x * Float64(t_m / Float64(z - y))) tmp = 0.0 if (y <= -3.1e+179) tmp = t_m; elseif (y <= -7.4e+17) tmp = t_2; elseif (y <= -5e-189) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 3e+126) tmp = t_2; else tmp = t_m; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) t_2 = x * (t_m / (z - y)); tmp = 0.0; if (y <= -3.1e+179) tmp = t_m; elseif (y <= -7.4e+17) tmp = t_2; elseif (y <= -5e-189) tmp = (x - y) * (t_m / z); elseif (y <= 3e+126) tmp = t_2; else tmp = t_m; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := Block[{t$95$2 = N[(x * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -3.1e+179], t$95$m, If[LessEqual[y, -7.4e+17], t$95$2, If[LessEqual[y, -5e-189], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+126], t$95$2, t$95$m]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := x \cdot \frac{t\_m}{z - y}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+179}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq -7.4 \cdot 10^{+17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-189}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
\end{array}
if y < -3.1e179 or 3.0000000000000002e126 < y Initial program 99.8%
Taylor expanded in y around inf 75.4%
if -3.1e179 < y < -7.4e17 or -4.9999999999999997e-189 < y < 3.0000000000000002e126Initial program 94.4%
Taylor expanded in x around inf 68.1%
*-commutative68.1%
associate-*r/66.7%
Simplified66.7%
if -7.4e17 < y < -4.9999999999999997e-189Initial program 93.8%
Taylor expanded in z around inf 76.9%
associate-/l*74.5%
associate-/r/81.9%
Simplified81.9%
Final simplification71.6%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(let* ((t_2 (* t_m (/ x (- z y)))))
(*
t_s
(if (<= y -2.6e+190)
t_m
(if (<= y -1.76e+17)
t_2
(if (<= y 4.2e-222)
(* (- x y) (/ t_m z))
(if (<= y 3.6e+129) t_2 t_m)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double t_2 = t_m * (x / (z - y));
double tmp;
if (y <= -2.6e+190) {
tmp = t_m;
} else if (y <= -1.76e+17) {
tmp = t_2;
} else if (y <= 4.2e-222) {
tmp = (x - y) * (t_m / z);
} else if (y <= 3.6e+129) {
tmp = t_2;
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = t_m * (x / (z - y))
if (y <= (-2.6d+190)) then
tmp = t_m
else if (y <= (-1.76d+17)) then
tmp = t_2
else if (y <= 4.2d-222) then
tmp = (x - y) * (t_m / z)
else if (y <= 3.6d+129) then
tmp = t_2
else
tmp = t_m
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double t_2 = t_m * (x / (z - y));
double tmp;
if (y <= -2.6e+190) {
tmp = t_m;
} else if (y <= -1.76e+17) {
tmp = t_2;
} else if (y <= 4.2e-222) {
tmp = (x - y) * (t_m / z);
} else if (y <= 3.6e+129) {
tmp = t_2;
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): t_2 = t_m * (x / (z - y)) tmp = 0 if y <= -2.6e+190: tmp = t_m elif y <= -1.76e+17: tmp = t_2 elif y <= 4.2e-222: tmp = (x - y) * (t_m / z) elif y <= 3.6e+129: tmp = t_2 else: tmp = t_m return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) t_2 = Float64(t_m * Float64(x / Float64(z - y))) tmp = 0.0 if (y <= -2.6e+190) tmp = t_m; elseif (y <= -1.76e+17) tmp = t_2; elseif (y <= 4.2e-222) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 3.6e+129) tmp = t_2; else tmp = t_m; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) t_2 = t_m * (x / (z - y)); tmp = 0.0; if (y <= -2.6e+190) tmp = t_m; elseif (y <= -1.76e+17) tmp = t_2; elseif (y <= 4.2e-222) tmp = (x - y) * (t_m / z); elseif (y <= 3.6e+129) tmp = t_2; else tmp = t_m; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := Block[{t$95$2 = N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -2.6e+190], t$95$m, If[LessEqual[y, -1.76e+17], t$95$2, If[LessEqual[y, 4.2e-222], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+129], t$95$2, t$95$m]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{x}{z - y}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+190}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq -1.76 \cdot 10^{+17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-222}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
\end{array}
if y < -2.60000000000000011e190 or 3.6000000000000001e129 < y Initial program 99.8%
Taylor expanded in y around inf 76.9%
if -2.60000000000000011e190 < y < -1.76e17 or 4.1999999999999998e-222 < y < 3.6000000000000001e129Initial program 99.6%
Taylor expanded in x around inf 59.3%
if -1.76e17 < y < 4.1999999999999998e-222Initial program 87.4%
Taylor expanded in z around inf 83.8%
associate-/l*79.0%
associate-/r/87.4%
Simplified87.4%
Final simplification73.1%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(let* ((t_2 (* t_m (/ x (- z y)))))
(*
t_s
(if (<= y -2.6e+190)
t_m
(if (<= y -3.05e+17)
t_2
(if (<= y 1.45e-228)
(* (- x y) (/ t_m z))
(if (<= y 6.8e+134) t_2 (+ t_m (/ t_m (/ y z))))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double t_2 = t_m * (x / (z - y));
double tmp;
if (y <= -2.6e+190) {
tmp = t_m;
} else if (y <= -3.05e+17) {
tmp = t_2;
} else if (y <= 1.45e-228) {
tmp = (x - y) * (t_m / z);
} else if (y <= 6.8e+134) {
tmp = t_2;
} else {
tmp = t_m + (t_m / (y / z));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = t_m * (x / (z - y))
if (y <= (-2.6d+190)) then
tmp = t_m
else if (y <= (-3.05d+17)) then
tmp = t_2
else if (y <= 1.45d-228) then
tmp = (x - y) * (t_m / z)
else if (y <= 6.8d+134) then
tmp = t_2
else
tmp = t_m + (t_m / (y / z))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double t_2 = t_m * (x / (z - y));
double tmp;
if (y <= -2.6e+190) {
tmp = t_m;
} else if (y <= -3.05e+17) {
tmp = t_2;
} else if (y <= 1.45e-228) {
tmp = (x - y) * (t_m / z);
} else if (y <= 6.8e+134) {
tmp = t_2;
} else {
tmp = t_m + (t_m / (y / z));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): t_2 = t_m * (x / (z - y)) tmp = 0 if y <= -2.6e+190: tmp = t_m elif y <= -3.05e+17: tmp = t_2 elif y <= 1.45e-228: tmp = (x - y) * (t_m / z) elif y <= 6.8e+134: tmp = t_2 else: tmp = t_m + (t_m / (y / z)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) t_2 = Float64(t_m * Float64(x / Float64(z - y))) tmp = 0.0 if (y <= -2.6e+190) tmp = t_m; elseif (y <= -3.05e+17) tmp = t_2; elseif (y <= 1.45e-228) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 6.8e+134) tmp = t_2; else tmp = Float64(t_m + Float64(t_m / Float64(y / z))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) t_2 = t_m * (x / (z - y)); tmp = 0.0; if (y <= -2.6e+190) tmp = t_m; elseif (y <= -3.05e+17) tmp = t_2; elseif (y <= 1.45e-228) tmp = (x - y) * (t_m / z); elseif (y <= 6.8e+134) tmp = t_2; else tmp = t_m + (t_m / (y / z)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := Block[{t$95$2 = N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -2.6e+190], t$95$m, If[LessEqual[y, -3.05e+17], t$95$2, If[LessEqual[y, 1.45e-228], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+134], t$95$2, N[(t$95$m + N[(t$95$m / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{x}{z - y}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+190}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq -3.05 \cdot 10^{+17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-228}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+134}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_m + \frac{t\_m}{\frac{y}{z}}\\
\end{array}
\end{array}
\end{array}
if y < -2.60000000000000011e190Initial program 99.9%
Taylor expanded in y around inf 79.0%
if -2.60000000000000011e190 < y < -3.05e17 or 1.4500000000000001e-228 < y < 6.80000000000000035e134Initial program 99.6%
Taylor expanded in x around inf 58.7%
if -3.05e17 < y < 1.4500000000000001e-228Initial program 87.4%
Taylor expanded in z around inf 83.8%
associate-/l*79.0%
associate-/r/87.4%
Simplified87.4%
if 6.80000000000000035e134 < y Initial program 99.8%
Taylor expanded in x around 0 89.3%
neg-mul-189.3%
distribute-neg-frac89.3%
Simplified89.3%
Taylor expanded in y around inf 76.8%
associate-/l*78.8%
Simplified78.8%
Final simplification73.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= y -2.5e+19)
(* (+ (/ x y) -1.0) (- t_m))
(if (<= y -1.9e-228)
(/ (- x y) (/ z t_m))
(if (<= y 620000.0)
(/ (* t_m x) (- z y))
(if (<= y 3.8e+265) (/ t_m (/ (- y z) y)) (- t_m (/ (* t_m x) y))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -2.5e+19) {
tmp = ((x / y) + -1.0) * -t_m;
} else if (y <= -1.9e-228) {
tmp = (x - y) / (z / t_m);
} else if (y <= 620000.0) {
tmp = (t_m * x) / (z - y);
} else if (y <= 3.8e+265) {
tmp = t_m / ((y - z) / y);
} else {
tmp = t_m - ((t_m * x) / y);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-2.5d+19)) then
tmp = ((x / y) + (-1.0d0)) * -t_m
else if (y <= (-1.9d-228)) then
tmp = (x - y) / (z / t_m)
else if (y <= 620000.0d0) then
tmp = (t_m * x) / (z - y)
else if (y <= 3.8d+265) then
tmp = t_m / ((y - z) / y)
else
tmp = t_m - ((t_m * x) / y)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -2.5e+19) {
tmp = ((x / y) + -1.0) * -t_m;
} else if (y <= -1.9e-228) {
tmp = (x - y) / (z / t_m);
} else if (y <= 620000.0) {
tmp = (t_m * x) / (z - y);
} else if (y <= 3.8e+265) {
tmp = t_m / ((y - z) / y);
} else {
tmp = t_m - ((t_m * x) / y);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -2.5e+19: tmp = ((x / y) + -1.0) * -t_m elif y <= -1.9e-228: tmp = (x - y) / (z / t_m) elif y <= 620000.0: tmp = (t_m * x) / (z - y) elif y <= 3.8e+265: tmp = t_m / ((y - z) / y) else: tmp = t_m - ((t_m * x) / y) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -2.5e+19) tmp = Float64(Float64(Float64(x / y) + -1.0) * Float64(-t_m)); elseif (y <= -1.9e-228) tmp = Float64(Float64(x - y) / Float64(z / t_m)); elseif (y <= 620000.0) tmp = Float64(Float64(t_m * x) / Float64(z - y)); elseif (y <= 3.8e+265) tmp = Float64(t_m / Float64(Float64(y - z) / y)); else tmp = Float64(t_m - Float64(Float64(t_m * x) / y)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -2.5e+19) tmp = ((x / y) + -1.0) * -t_m; elseif (y <= -1.9e-228) tmp = (x - y) / (z / t_m); elseif (y <= 620000.0) tmp = (t_m * x) / (z - y); elseif (y <= 3.8e+265) tmp = t_m / ((y - z) / y); else tmp = t_m - ((t_m * x) / y); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -2.5e+19], N[(N[(N[(x / y), $MachinePrecision] + -1.0), $MachinePrecision] * (-t$95$m)), $MachinePrecision], If[LessEqual[y, -1.9e-228], N[(N[(x - y), $MachinePrecision] / N[(z / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 620000.0], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+265], N[(t$95$m / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t$95$m - N[(N[(t$95$m * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+19}:\\
\;\;\;\;\left(\frac{x}{y} + -1\right) \cdot \left(-t\_m\right)\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-228}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t\_m}}\\
\mathbf{elif}\;y \leq 620000:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+265}:\\
\;\;\;\;\frac{t\_m}{\frac{y - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_m - \frac{t\_m \cdot x}{y}\\
\end{array}
\end{array}
if y < -2.5e19Initial program 99.8%
Taylor expanded in z around 0 82.4%
mul-1-neg82.4%
div-sub82.4%
sub-neg82.4%
*-inverses82.4%
metadata-eval82.4%
Simplified82.4%
if -2.5e19 < y < -1.8999999999999999e-228Initial program 94.5%
associate-/r/97.7%
Simplified97.7%
Taylor expanded in z around inf 84.1%
if -1.8999999999999999e-228 < y < 6.2e5Initial program 89.0%
Taylor expanded in x around inf 85.4%
if 6.2e5 < y < 3.80000000000000015e265Initial program 99.7%
Taylor expanded in x around 0 76.4%
neg-mul-176.4%
distribute-neg-frac76.4%
Simplified76.4%
distribute-frac-neg76.4%
frac-2neg76.4%
distribute-frac-neg76.4%
remove-double-neg76.4%
associate-*l/56.8%
sub-neg56.8%
distribute-neg-in56.8%
remove-double-neg56.8%
Applied egg-rr56.8%
*-commutative56.8%
associate-/l*76.4%
+-commutative76.4%
unsub-neg76.4%
Simplified76.4%
if 3.80000000000000015e265 < y Initial program 99.8%
associate-/r/40.7%
div-inv40.6%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 76.2%
mul-1-neg76.2%
associate-/l*99.8%
distribute-neg-frac99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
mul-1-neg99.8%
*-commutative99.8%
associate-*r/94.0%
unsub-neg94.0%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Final simplification83.1%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= y -6.6e+28)
t_m
(if (<= y 7.8e+21)
(/ x (/ z t_m))
(if (<= y 1.45e+113)
t_m
(if (<= y 1.82e+155) (* t_m (/ (- y) z)) t_m))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -6.6e+28) {
tmp = t_m;
} else if (y <= 7.8e+21) {
tmp = x / (z / t_m);
} else if (y <= 1.45e+113) {
tmp = t_m;
} else if (y <= 1.82e+155) {
tmp = t_m * (-y / z);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-6.6d+28)) then
tmp = t_m
else if (y <= 7.8d+21) then
tmp = x / (z / t_m)
else if (y <= 1.45d+113) then
tmp = t_m
else if (y <= 1.82d+155) then
tmp = t_m * (-y / z)
else
tmp = t_m
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -6.6e+28) {
tmp = t_m;
} else if (y <= 7.8e+21) {
tmp = x / (z / t_m);
} else if (y <= 1.45e+113) {
tmp = t_m;
} else if (y <= 1.82e+155) {
tmp = t_m * (-y / z);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -6.6e+28: tmp = t_m elif y <= 7.8e+21: tmp = x / (z / t_m) elif y <= 1.45e+113: tmp = t_m elif y <= 1.82e+155: tmp = t_m * (-y / z) else: tmp = t_m return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -6.6e+28) tmp = t_m; elseif (y <= 7.8e+21) tmp = Float64(x / Float64(z / t_m)); elseif (y <= 1.45e+113) tmp = t_m; elseif (y <= 1.82e+155) tmp = Float64(t_m * Float64(Float64(-y) / z)); else tmp = t_m; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -6.6e+28) tmp = t_m; elseif (y <= 7.8e+21) tmp = x / (z / t_m); elseif (y <= 1.45e+113) tmp = t_m; elseif (y <= 1.82e+155) tmp = t_m * (-y / z); else tmp = t_m; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -6.6e+28], t$95$m, If[LessEqual[y, 7.8e+21], N[(x / N[(z / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+113], t$95$m, If[LessEqual[y, 1.82e+155], N[(t$95$m * N[((-y) / z), $MachinePrecision]), $MachinePrecision], t$95$m]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+28}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{\frac{z}{t\_m}}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+113}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 1.82 \cdot 10^{+155}:\\
\;\;\;\;t\_m \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -6.6e28 or 7.8e21 < y < 1.44999999999999992e113 or 1.81999999999999989e155 < y Initial program 99.8%
Taylor expanded in y around inf 63.6%
if -6.6e28 < y < 7.8e21Initial program 91.5%
Taylor expanded in y around 0 66.2%
associate-/l*64.6%
associate-/r/67.7%
Simplified67.7%
*-commutative67.7%
clear-num67.7%
un-div-inv67.8%
Applied egg-rr67.8%
if 1.44999999999999992e113 < y < 1.81999999999999989e155Initial program 99.3%
Taylor expanded in x around 0 67.1%
neg-mul-167.1%
distribute-neg-frac67.1%
Simplified67.1%
Taylor expanded in y around 0 49.9%
mul-1-neg49.9%
distribute-neg-frac49.9%
Simplified49.9%
Final simplification64.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= y -7.9e+28)
t_m
(if (<= y 5.5e+21)
(/ x (/ z t_m))
(if (<= y 9.4e+110)
t_m
(if (<= y 1.75e+155) (/ t_m (/ (- z) y)) t_m))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -7.9e+28) {
tmp = t_m;
} else if (y <= 5.5e+21) {
tmp = x / (z / t_m);
} else if (y <= 9.4e+110) {
tmp = t_m;
} else if (y <= 1.75e+155) {
tmp = t_m / (-z / y);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-7.9d+28)) then
tmp = t_m
else if (y <= 5.5d+21) then
tmp = x / (z / t_m)
else if (y <= 9.4d+110) then
tmp = t_m
else if (y <= 1.75d+155) then
tmp = t_m / (-z / y)
else
tmp = t_m
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -7.9e+28) {
tmp = t_m;
} else if (y <= 5.5e+21) {
tmp = x / (z / t_m);
} else if (y <= 9.4e+110) {
tmp = t_m;
} else if (y <= 1.75e+155) {
tmp = t_m / (-z / y);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -7.9e+28: tmp = t_m elif y <= 5.5e+21: tmp = x / (z / t_m) elif y <= 9.4e+110: tmp = t_m elif y <= 1.75e+155: tmp = t_m / (-z / y) else: tmp = t_m return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -7.9e+28) tmp = t_m; elseif (y <= 5.5e+21) tmp = Float64(x / Float64(z / t_m)); elseif (y <= 9.4e+110) tmp = t_m; elseif (y <= 1.75e+155) tmp = Float64(t_m / Float64(Float64(-z) / y)); else tmp = t_m; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -7.9e+28) tmp = t_m; elseif (y <= 5.5e+21) tmp = x / (z / t_m); elseif (y <= 9.4e+110) tmp = t_m; elseif (y <= 1.75e+155) tmp = t_m / (-z / y); else tmp = t_m; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -7.9e+28], t$95$m, If[LessEqual[y, 5.5e+21], N[(x / N[(z / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.4e+110], t$95$m, If[LessEqual[y, 1.75e+155], N[(t$95$m / N[((-z) / y), $MachinePrecision]), $MachinePrecision], t$95$m]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.9 \cdot 10^{+28}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{\frac{z}{t\_m}}\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+110}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+155}:\\
\;\;\;\;\frac{t\_m}{\frac{-z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -7.8999999999999997e28 or 5.5e21 < y < 9.3999999999999996e110 or 1.74999999999999992e155 < y Initial program 99.8%
Taylor expanded in y around inf 63.6%
if -7.8999999999999997e28 < y < 5.5e21Initial program 91.5%
Taylor expanded in y around 0 66.2%
associate-/l*64.6%
associate-/r/67.7%
Simplified67.7%
*-commutative67.7%
clear-num67.7%
un-div-inv67.8%
Applied egg-rr67.8%
if 9.3999999999999996e110 < y < 1.74999999999999992e155Initial program 99.3%
Taylor expanded in z around inf 42.4%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in x around 0 50.0%
associate-*r/50.0%
neg-mul-150.0%
Simplified50.0%
Final simplification64.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= y -3.1e+19)
(- t_m (/ (* t_m x) y))
(if (<= y 5.2e-230)
(* (- x y) (/ t_m z))
(if (<= y 160000.0) (* t_m (/ x (- z y))) (/ t_m (/ (- y z) y)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -3.1e+19) {
tmp = t_m - ((t_m * x) / y);
} else if (y <= 5.2e-230) {
tmp = (x - y) * (t_m / z);
} else if (y <= 160000.0) {
tmp = t_m * (x / (z - y));
} else {
tmp = t_m / ((y - z) / y);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-3.1d+19)) then
tmp = t_m - ((t_m * x) / y)
else if (y <= 5.2d-230) then
tmp = (x - y) * (t_m / z)
else if (y <= 160000.0d0) then
tmp = t_m * (x / (z - y))
else
tmp = t_m / ((y - z) / y)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -3.1e+19) {
tmp = t_m - ((t_m * x) / y);
} else if (y <= 5.2e-230) {
tmp = (x - y) * (t_m / z);
} else if (y <= 160000.0) {
tmp = t_m * (x / (z - y));
} else {
tmp = t_m / ((y - z) / y);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -3.1e+19: tmp = t_m - ((t_m * x) / y) elif y <= 5.2e-230: tmp = (x - y) * (t_m / z) elif y <= 160000.0: tmp = t_m * (x / (z - y)) else: tmp = t_m / ((y - z) / y) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -3.1e+19) tmp = Float64(t_m - Float64(Float64(t_m * x) / y)); elseif (y <= 5.2e-230) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 160000.0) tmp = Float64(t_m * Float64(x / Float64(z - y))); else tmp = Float64(t_m / Float64(Float64(y - z) / y)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -3.1e+19) tmp = t_m - ((t_m * x) / y); elseif (y <= 5.2e-230) tmp = (x - y) * (t_m / z); elseif (y <= 160000.0) tmp = t_m * (x / (z - y)); else tmp = t_m / ((y - z) / y); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -3.1e+19], N[(t$95$m - N[(N[(t$95$m * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-230], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 160000.0], N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+19}:\\
\;\;\;\;t\_m - \frac{t\_m \cdot x}{y}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-230}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 160000:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m}{\frac{y - z}{y}}\\
\end{array}
\end{array}
if y < -3.1e19Initial program 99.8%
associate-/r/79.8%
div-inv79.7%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 60.7%
mul-1-neg60.7%
associate-/l*82.3%
distribute-neg-frac82.3%
Simplified82.3%
Taylor expanded in y around 0 78.1%
mul-1-neg78.1%
*-commutative78.1%
associate-*r/79.1%
unsub-neg79.1%
associate-*r/78.1%
*-commutative78.1%
Simplified78.1%
if -3.1e19 < y < 5.2000000000000003e-230Initial program 87.4%
Taylor expanded in z around inf 83.8%
associate-/l*79.0%
associate-/r/87.4%
Simplified87.4%
if 5.2000000000000003e-230 < y < 1.6e5Initial program 99.6%
Taylor expanded in x around inf 78.7%
if 1.6e5 < y Initial program 99.7%
Taylor expanded in x around 0 78.7%
neg-mul-178.7%
distribute-neg-frac78.7%
Simplified78.7%
distribute-frac-neg78.7%
frac-2neg78.7%
distribute-frac-neg78.7%
remove-double-neg78.7%
associate-*l/58.3%
sub-neg58.3%
distribute-neg-in58.3%
remove-double-neg58.3%
Applied egg-rr58.3%
*-commutative58.3%
associate-/l*78.8%
+-commutative78.8%
unsub-neg78.8%
Simplified78.8%
Final simplification81.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= y -9e+16)
(- t_m (/ (* t_m x) y))
(if (<= y -7.6e-228)
(* (- x y) (/ t_m z))
(if (<= y 1500000.0) (/ (* t_m x) (- z y)) (/ t_m (/ (- y z) y)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -9e+16) {
tmp = t_m - ((t_m * x) / y);
} else if (y <= -7.6e-228) {
tmp = (x - y) * (t_m / z);
} else if (y <= 1500000.0) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_m / ((y - z) / y);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-9d+16)) then
tmp = t_m - ((t_m * x) / y)
else if (y <= (-7.6d-228)) then
tmp = (x - y) * (t_m / z)
else if (y <= 1500000.0d0) then
tmp = (t_m * x) / (z - y)
else
tmp = t_m / ((y - z) / y)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -9e+16) {
tmp = t_m - ((t_m * x) / y);
} else if (y <= -7.6e-228) {
tmp = (x - y) * (t_m / z);
} else if (y <= 1500000.0) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_m / ((y - z) / y);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -9e+16: tmp = t_m - ((t_m * x) / y) elif y <= -7.6e-228: tmp = (x - y) * (t_m / z) elif y <= 1500000.0: tmp = (t_m * x) / (z - y) else: tmp = t_m / ((y - z) / y) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -9e+16) tmp = Float64(t_m - Float64(Float64(t_m * x) / y)); elseif (y <= -7.6e-228) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 1500000.0) tmp = Float64(Float64(t_m * x) / Float64(z - y)); else tmp = Float64(t_m / Float64(Float64(y - z) / y)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -9e+16) tmp = t_m - ((t_m * x) / y); elseif (y <= -7.6e-228) tmp = (x - y) * (t_m / z); elseif (y <= 1500000.0) tmp = (t_m * x) / (z - y); else tmp = t_m / ((y - z) / y); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -9e+16], N[(t$95$m - N[(N[(t$95$m * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.6e-228], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1500000.0], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(t$95$m / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+16}:\\
\;\;\;\;t\_m - \frac{t\_m \cdot x}{y}\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-228}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 1500000:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m}{\frac{y - z}{y}}\\
\end{array}
\end{array}
if y < -9e16Initial program 99.8%
associate-/r/79.8%
div-inv79.7%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 60.7%
mul-1-neg60.7%
associate-/l*82.3%
distribute-neg-frac82.3%
Simplified82.3%
Taylor expanded in y around 0 78.1%
mul-1-neg78.1%
*-commutative78.1%
associate-*r/79.1%
unsub-neg79.1%
associate-*r/78.1%
*-commutative78.1%
Simplified78.1%
if -9e16 < y < -7.5999999999999997e-228Initial program 94.5%
Taylor expanded in z around inf 77.5%
associate-/l*77.4%
associate-/r/84.0%
Simplified84.0%
if -7.5999999999999997e-228 < y < 1.5e6Initial program 89.0%
Taylor expanded in x around inf 85.4%
if 1.5e6 < y Initial program 99.7%
Taylor expanded in x around 0 78.7%
neg-mul-178.7%
distribute-neg-frac78.7%
Simplified78.7%
distribute-frac-neg78.7%
frac-2neg78.7%
distribute-frac-neg78.7%
remove-double-neg78.7%
associate-*l/58.3%
sub-neg58.3%
distribute-neg-in58.3%
remove-double-neg58.3%
Applied egg-rr58.3%
*-commutative58.3%
associate-/l*78.8%
+-commutative78.8%
unsub-neg78.8%
Simplified78.8%
Final simplification81.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= y -1.38e+19)
(- t_m (/ (* t_m x) y))
(if (<= y -2.85e-227)
(/ (- x y) (/ z t_m))
(if (<= y 155000.0) (/ (* t_m x) (- z y)) (/ t_m (/ (- y z) y)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -1.38e+19) {
tmp = t_m - ((t_m * x) / y);
} else if (y <= -2.85e-227) {
tmp = (x - y) / (z / t_m);
} else if (y <= 155000.0) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_m / ((y - z) / y);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-1.38d+19)) then
tmp = t_m - ((t_m * x) / y)
else if (y <= (-2.85d-227)) then
tmp = (x - y) / (z / t_m)
else if (y <= 155000.0d0) then
tmp = (t_m * x) / (z - y)
else
tmp = t_m / ((y - z) / y)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -1.38e+19) {
tmp = t_m - ((t_m * x) / y);
} else if (y <= -2.85e-227) {
tmp = (x - y) / (z / t_m);
} else if (y <= 155000.0) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_m / ((y - z) / y);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -1.38e+19: tmp = t_m - ((t_m * x) / y) elif y <= -2.85e-227: tmp = (x - y) / (z / t_m) elif y <= 155000.0: tmp = (t_m * x) / (z - y) else: tmp = t_m / ((y - z) / y) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -1.38e+19) tmp = Float64(t_m - Float64(Float64(t_m * x) / y)); elseif (y <= -2.85e-227) tmp = Float64(Float64(x - y) / Float64(z / t_m)); elseif (y <= 155000.0) tmp = Float64(Float64(t_m * x) / Float64(z - y)); else tmp = Float64(t_m / Float64(Float64(y - z) / y)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -1.38e+19) tmp = t_m - ((t_m * x) / y); elseif (y <= -2.85e-227) tmp = (x - y) / (z / t_m); elseif (y <= 155000.0) tmp = (t_m * x) / (z - y); else tmp = t_m / ((y - z) / y); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -1.38e+19], N[(t$95$m - N[(N[(t$95$m * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.85e-227], N[(N[(x - y), $MachinePrecision] / N[(z / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 155000.0], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(t$95$m / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.38 \cdot 10^{+19}:\\
\;\;\;\;t\_m - \frac{t\_m \cdot x}{y}\\
\mathbf{elif}\;y \leq -2.85 \cdot 10^{-227}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t\_m}}\\
\mathbf{elif}\;y \leq 155000:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m}{\frac{y - z}{y}}\\
\end{array}
\end{array}
if y < -1.38e19Initial program 99.8%
associate-/r/79.8%
div-inv79.7%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 60.7%
mul-1-neg60.7%
associate-/l*82.3%
distribute-neg-frac82.3%
Simplified82.3%
Taylor expanded in y around 0 78.1%
mul-1-neg78.1%
*-commutative78.1%
associate-*r/79.1%
unsub-neg79.1%
associate-*r/78.1%
*-commutative78.1%
Simplified78.1%
if -1.38e19 < y < -2.84999999999999995e-227Initial program 94.5%
associate-/r/97.7%
Simplified97.7%
Taylor expanded in z around inf 84.1%
if -2.84999999999999995e-227 < y < 155000Initial program 89.0%
Taylor expanded in x around inf 85.4%
if 155000 < y Initial program 99.7%
Taylor expanded in x around 0 78.7%
neg-mul-178.7%
distribute-neg-frac78.7%
Simplified78.7%
distribute-frac-neg78.7%
frac-2neg78.7%
distribute-frac-neg78.7%
remove-double-neg78.7%
associate-*l/58.3%
sub-neg58.3%
distribute-neg-in58.3%
remove-double-neg58.3%
Applied egg-rr58.3%
*-commutative58.3%
associate-/l*78.8%
+-commutative78.8%
unsub-neg78.8%
Simplified78.8%
Final simplification81.3%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (or (<= y -5.6e+18) (not (<= y 3.15e-83)))
(- t_m (/ (* t_m x) y))
(* (- x y) (/ t_m z)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if ((y <= -5.6e+18) || !(y <= 3.15e-83)) {
tmp = t_m - ((t_m * x) / y);
} else {
tmp = (x - y) * (t_m / z);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if ((y <= (-5.6d+18)) .or. (.not. (y <= 3.15d-83))) then
tmp = t_m - ((t_m * x) / y)
else
tmp = (x - y) * (t_m / z)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if ((y <= -5.6e+18) || !(y <= 3.15e-83)) {
tmp = t_m - ((t_m * x) / y);
} else {
tmp = (x - y) * (t_m / z);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if (y <= -5.6e+18) or not (y <= 3.15e-83): tmp = t_m - ((t_m * x) / y) else: tmp = (x - y) * (t_m / z) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if ((y <= -5.6e+18) || !(y <= 3.15e-83)) tmp = Float64(t_m - Float64(Float64(t_m * x) / y)); else tmp = Float64(Float64(x - y) * Float64(t_m / z)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if ((y <= -5.6e+18) || ~((y <= 3.15e-83))) tmp = t_m - ((t_m * x) / y); else tmp = (x - y) * (t_m / z); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[Or[LessEqual[y, -5.6e+18], N[Not[LessEqual[y, 3.15e-83]], $MachinePrecision]], N[(t$95$m - N[(N[(t$95$m * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+18} \lor \neg \left(y \leq 3.15 \cdot 10^{-83}\right):\\
\;\;\;\;t\_m - \frac{t\_m \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\end{array}
\end{array}
if y < -5.6e18 or 3.14999999999999983e-83 < y Initial program 99.7%
associate-/r/75.4%
div-inv75.2%
associate-/r*99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 60.3%
mul-1-neg60.3%
associate-/l*78.6%
distribute-neg-frac78.6%
Simplified78.6%
Taylor expanded in y around 0 75.7%
mul-1-neg75.7%
*-commutative75.7%
associate-*r/76.7%
unsub-neg76.7%
associate-*r/75.7%
*-commutative75.7%
Simplified75.7%
if -5.6e18 < y < 3.14999999999999983e-83Initial program 90.0%
Taylor expanded in z around inf 81.5%
associate-/l*78.5%
associate-/r/84.2%
Simplified84.2%
Final simplification79.0%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (if (<= y -3.1e+179) t_m (if (<= y 3.4e+126) (* x (/ t_m (- z y))) t_m))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -3.1e+179) {
tmp = t_m;
} else if (y <= 3.4e+126) {
tmp = x * (t_m / (z - y));
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-3.1d+179)) then
tmp = t_m
else if (y <= 3.4d+126) then
tmp = x * (t_m / (z - y))
else
tmp = t_m
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -3.1e+179) {
tmp = t_m;
} else if (y <= 3.4e+126) {
tmp = x * (t_m / (z - y));
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -3.1e+179: tmp = t_m elif y <= 3.4e+126: tmp = x * (t_m / (z - y)) else: tmp = t_m return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -3.1e+179) tmp = t_m; elseif (y <= 3.4e+126) tmp = Float64(x * Float64(t_m / Float64(z - y))); else tmp = t_m; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -3.1e+179) tmp = t_m; elseif (y <= 3.4e+126) tmp = x * (t_m / (z - y)); else tmp = t_m; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -3.1e+179], t$95$m, If[LessEqual[y, 3.4e+126], N[(x * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$m]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+179}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \frac{t\_m}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -3.1e179 or 3.39999999999999989e126 < y Initial program 99.8%
Taylor expanded in y around inf 75.4%
if -3.1e179 < y < 3.39999999999999989e126Initial program 94.2%
Taylor expanded in x around inf 67.4%
*-commutative67.4%
associate-*r/66.4%
Simplified66.4%
Final simplification69.1%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (if (<= y -1e+29) t_m (if (<= y 8.6e+21) (* x (/ t_m z)) t_m))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -1e+29) {
tmp = t_m;
} else if (y <= 8.6e+21) {
tmp = x * (t_m / z);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-1d+29)) then
tmp = t_m
else if (y <= 8.6d+21) then
tmp = x * (t_m / z)
else
tmp = t_m
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -1e+29) {
tmp = t_m;
} else if (y <= 8.6e+21) {
tmp = x * (t_m / z);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -1e+29: tmp = t_m elif y <= 8.6e+21: tmp = x * (t_m / z) else: tmp = t_m return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -1e+29) tmp = t_m; elseif (y <= 8.6e+21) tmp = Float64(x * Float64(t_m / z)); else tmp = t_m; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -1e+29) tmp = t_m; elseif (y <= 8.6e+21) tmp = x * (t_m / z); else tmp = t_m; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -1e+29], t$95$m, If[LessEqual[y, 8.6e+21], N[(x * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], t$95$m]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+29}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+21}:\\
\;\;\;\;x \cdot \frac{t\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -9.99999999999999914e28 or 8.6e21 < y Initial program 99.7%
Taylor expanded in y around inf 59.1%
if -9.99999999999999914e28 < y < 8.6e21Initial program 91.5%
Taylor expanded in y around 0 66.2%
associate-/l*64.6%
associate-/r/67.7%
Simplified67.7%
Final simplification63.1%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (if (<= y -6.7e+28) t_m (if (<= y 1.55e+22) (/ x (/ z t_m)) t_m))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -6.7e+28) {
tmp = t_m;
} else if (y <= 1.55e+22) {
tmp = x / (z / t_m);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (y <= (-6.7d+28)) then
tmp = t_m
else if (y <= 1.55d+22) then
tmp = x / (z / t_m)
else
tmp = t_m
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (y <= -6.7e+28) {
tmp = t_m;
} else if (y <= 1.55e+22) {
tmp = x / (z / t_m);
} else {
tmp = t_m;
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if y <= -6.7e+28: tmp = t_m elif y <= 1.55e+22: tmp = x / (z / t_m) else: tmp = t_m return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (y <= -6.7e+28) tmp = t_m; elseif (y <= 1.55e+22) tmp = Float64(x / Float64(z / t_m)); else tmp = t_m; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (y <= -6.7e+28) tmp = t_m; elseif (y <= 1.55e+22) tmp = x / (z / t_m); else tmp = t_m; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -6.7e+28], t$95$m, If[LessEqual[y, 1.55e+22], N[(x / N[(z / t$95$m), $MachinePrecision]), $MachinePrecision], t$95$m]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6.7 \cdot 10^{+28}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+22}:\\
\;\;\;\;\frac{x}{\frac{z}{t\_m}}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -6.7e28 or 1.5500000000000001e22 < y Initial program 99.7%
Taylor expanded in y around inf 59.1%
if -6.7e28 < y < 1.5500000000000001e22Initial program 91.5%
Taylor expanded in y around 0 66.2%
associate-/l*64.6%
associate-/r/67.7%
Simplified67.7%
*-commutative67.7%
clear-num67.7%
un-div-inv67.8%
Applied egg-rr67.8%
Final simplification63.1%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (* t_m (/ (- x y) (- z y)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
return t_s * (t_m * ((x - y) / (z - y)));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
code = t_s * (t_m * ((x - y) / (z - y)))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
return t_s * (t_m * ((x - y) / (z - y)));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): return t_s * (t_m * ((x - y) / (z - y)))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) return Float64(t_s * Float64(t_m * Float64(Float64(x - y) / Float64(z - y)))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, y, z, t_m) tmp = t_s * (t_m * ((x - y) / (z - y))); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * N[(t$95$m * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(t\_m \cdot \frac{x - y}{z - y}\right)
\end{array}
Initial program 96.0%
Final simplification96.0%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s t_m))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
return t_s * t_m;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
code = t_s * t_m
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
return t_s * t_m;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): return t_s * t_m
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) return Float64(t_s * t_m) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, y, z, t_m) tmp = t_s * t_m; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * t$95$m), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot t\_m
\end{array}
Initial program 96.0%
Taylor expanded in y around inf 36.7%
Final simplification36.7%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
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 = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024036
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))