
(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 17 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 4.1e+37)
(* (/ 1.0 (- z y)) (/ t_m (/ 1.0 (- x y))))
(/ t_m (/ (- z y) (- 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 (t_m <= 4.1e+37) {
tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y)));
} else {
tmp = t_m / ((z - y) / (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 (t_m <= 4.1d+37) then
tmp = (1.0d0 / (z - y)) * (t_m / (1.0d0 / (x - y)))
else
tmp = t_m / ((z - y) / (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 (t_m <= 4.1e+37) {
tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y)));
} else {
tmp = t_m / ((z - y) / (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 t_m <= 4.1e+37: tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y))) else: tmp = t_m / ((z - y) / (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 (t_m <= 4.1e+37) tmp = Float64(Float64(1.0 / Float64(z - y)) * Float64(t_m / Float64(1.0 / Float64(x - y)))); else tmp = Float64(t_m / Float64(Float64(z - y) / Float64(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 (t_m <= 4.1e+37) tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y))); else tmp = t_m / ((z - y) / (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[t$95$m, 4.1e+37], N[(N[(1.0 / N[(z - y), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / N[(1.0 / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $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 4.1 \cdot 10^{+37}:\\
\;\;\;\;\frac{1}{z - y} \cdot \frac{t\_m}{\frac{1}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m}{\frac{z - y}{x - y}}\\
\end{array}
\end{array}
if t < 4.0999999999999998e37Initial program 94.6%
associate-*l/89.5%
associate-/l*81.7%
Simplified81.7%
associate-*r/89.5%
associate-*l/94.6%
*-commutative94.6%
clear-num93.9%
un-div-inv95.0%
Applied egg-rr95.0%
*-un-lft-identity95.0%
div-inv94.9%
times-frac89.5%
Applied egg-rr89.5%
if 4.0999999999999998e37 < t Initial program 98.3%
associate-*l/68.1%
associate-/l*93.7%
Simplified93.7%
associate-*r/68.1%
associate-*l/98.3%
*-commutative98.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
Final simplification91.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 (- 1.0 (/ x y)))) (t_3 (* t_m (/ x (- z y)))))
(*
t_s
(if (<= y -7e+111)
t_2
(if (<= y -1.75e+66)
(* t_m (/ (- x y) z))
(if (<= y -5.2e+33)
t_2
(if (<= y -4.2e-79)
t_3
(if (<= y 1.15e-278)
(* (- x y) (/ t_m z))
(if (<= y 4.4e+45) t_3 t_2)))))))))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 * (1.0 - (x / y));
double t_3 = t_m * (x / (z - y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -1.75e+66) {
tmp = t_m * ((x - y) / z);
} else if (y <= -5.2e+33) {
tmp = t_2;
} else if (y <= -4.2e-79) {
tmp = t_3;
} else if (y <= 1.15e-278) {
tmp = (x - y) * (t_m / z);
} else if (y <= 4.4e+45) {
tmp = t_3;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_2 = t_m * (1.0d0 - (x / y))
t_3 = t_m * (x / (z - y))
if (y <= (-7d+111)) then
tmp = t_2
else if (y <= (-1.75d+66)) then
tmp = t_m * ((x - y) / z)
else if (y <= (-5.2d+33)) then
tmp = t_2
else if (y <= (-4.2d-79)) then
tmp = t_3
else if (y <= 1.15d-278) then
tmp = (x - y) * (t_m / z)
else if (y <= 4.4d+45) then
tmp = t_3
else
tmp = t_2
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 * (1.0 - (x / y));
double t_3 = t_m * (x / (z - y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -1.75e+66) {
tmp = t_m * ((x - y) / z);
} else if (y <= -5.2e+33) {
tmp = t_2;
} else if (y <= -4.2e-79) {
tmp = t_3;
} else if (y <= 1.15e-278) {
tmp = (x - y) * (t_m / z);
} else if (y <= 4.4e+45) {
tmp = t_3;
} else {
tmp = t_2;
}
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 * (1.0 - (x / y)) t_3 = t_m * (x / (z - y)) tmp = 0 if y <= -7e+111: tmp = t_2 elif y <= -1.75e+66: tmp = t_m * ((x - y) / z) elif y <= -5.2e+33: tmp = t_2 elif y <= -4.2e-79: tmp = t_3 elif y <= 1.15e-278: tmp = (x - y) * (t_m / z) elif y <= 4.4e+45: tmp = t_3 else: tmp = t_2 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(1.0 - Float64(x / y))) t_3 = Float64(t_m * Float64(x / Float64(z - y))) tmp = 0.0 if (y <= -7e+111) tmp = t_2; elseif (y <= -1.75e+66) tmp = Float64(t_m * Float64(Float64(x - y) / z)); elseif (y <= -5.2e+33) tmp = t_2; elseif (y <= -4.2e-79) tmp = t_3; elseif (y <= 1.15e-278) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 4.4e+45) tmp = t_3; else tmp = t_2; 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 * (1.0 - (x / y)); t_3 = t_m * (x / (z - y)); tmp = 0.0; if (y <= -7e+111) tmp = t_2; elseif (y <= -1.75e+66) tmp = t_m * ((x - y) / z); elseif (y <= -5.2e+33) tmp = t_2; elseif (y <= -4.2e-79) tmp = t_3; elseif (y <= 1.15e-278) tmp = (x - y) * (t_m / z); elseif (y <= 4.4e+45) tmp = t_3; else tmp = t_2; 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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -1.75e+66], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e+33], t$95$2, If[LessEqual[y, -4.2e-79], t$95$3, If[LessEqual[y, 1.15e-278], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+45], t$95$3, t$95$2]]]]]]), $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 \left(1 - \frac{x}{y}\right)\\
t_3 := t\_m \cdot \frac{x}{z - y}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{+66}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-79}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-278}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+45}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -7.0000000000000004e111 or -1.7499999999999999e66 < y < -5.1999999999999995e33 or 4.4000000000000001e45 < y Initial program 99.8%
Taylor expanded in z around 0 83.5%
mul-1-neg83.5%
div-sub83.5%
sub-neg83.5%
*-inverses83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in x around 0 76.8%
*-rgt-identity76.8%
*-commutative76.8%
associate-/l*83.5%
associate-*r*83.5%
*-commutative83.5%
distribute-lft-in83.5%
mul-1-neg83.5%
sub-neg83.5%
Simplified83.5%
if -7.0000000000000004e111 < y < -1.7499999999999999e66Initial program 99.9%
Taylor expanded in z around inf 80.8%
if -5.1999999999999995e33 < y < -4.1999999999999999e-79 or 1.15000000000000001e-278 < y < 4.4000000000000001e45Initial program 95.0%
Taylor expanded in x around inf 76.1%
if -4.1999999999999999e-79 < y < 1.15000000000000001e-278Initial program 85.8%
associate-*l/92.7%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in z around inf 79.6%
*-commutative79.6%
associate-/l*83.2%
Simplified83.2%
Final simplification81.0%
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 (- 1.0 (/ x y)))) (t_3 (/ t_m (/ (- z y) x))))
(*
t_s
(if (<= y -7.4e+111)
t_2
(if (<= y -3.3e+66)
(* t_m (/ (- x y) z))
(if (<= y -1.6e+32)
t_2
(if (<= y -4.95e-138)
t_3
(if (<= y 2.05e-277)
(* (- x y) (/ t_m z))
(if (<= y 2.2e+38) t_3 t_2)))))))))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 * (1.0 - (x / y));
double t_3 = t_m / ((z - y) / x);
double tmp;
if (y <= -7.4e+111) {
tmp = t_2;
} else if (y <= -3.3e+66) {
tmp = t_m * ((x - y) / z);
} else if (y <= -1.6e+32) {
tmp = t_2;
} else if (y <= -4.95e-138) {
tmp = t_3;
} else if (y <= 2.05e-277) {
tmp = (x - y) * (t_m / z);
} else if (y <= 2.2e+38) {
tmp = t_3;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_2 = t_m * (1.0d0 - (x / y))
t_3 = t_m / ((z - y) / x)
if (y <= (-7.4d+111)) then
tmp = t_2
else if (y <= (-3.3d+66)) then
tmp = t_m * ((x - y) / z)
else if (y <= (-1.6d+32)) then
tmp = t_2
else if (y <= (-4.95d-138)) then
tmp = t_3
else if (y <= 2.05d-277) then
tmp = (x - y) * (t_m / z)
else if (y <= 2.2d+38) then
tmp = t_3
else
tmp = t_2
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 * (1.0 - (x / y));
double t_3 = t_m / ((z - y) / x);
double tmp;
if (y <= -7.4e+111) {
tmp = t_2;
} else if (y <= -3.3e+66) {
tmp = t_m * ((x - y) / z);
} else if (y <= -1.6e+32) {
tmp = t_2;
} else if (y <= -4.95e-138) {
tmp = t_3;
} else if (y <= 2.05e-277) {
tmp = (x - y) * (t_m / z);
} else if (y <= 2.2e+38) {
tmp = t_3;
} else {
tmp = t_2;
}
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 * (1.0 - (x / y)) t_3 = t_m / ((z - y) / x) tmp = 0 if y <= -7.4e+111: tmp = t_2 elif y <= -3.3e+66: tmp = t_m * ((x - y) / z) elif y <= -1.6e+32: tmp = t_2 elif y <= -4.95e-138: tmp = t_3 elif y <= 2.05e-277: tmp = (x - y) * (t_m / z) elif y <= 2.2e+38: tmp = t_3 else: tmp = t_2 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(1.0 - Float64(x / y))) t_3 = Float64(t_m / Float64(Float64(z - y) / x)) tmp = 0.0 if (y <= -7.4e+111) tmp = t_2; elseif (y <= -3.3e+66) tmp = Float64(t_m * Float64(Float64(x - y) / z)); elseif (y <= -1.6e+32) tmp = t_2; elseif (y <= -4.95e-138) tmp = t_3; elseif (y <= 2.05e-277) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 2.2e+38) tmp = t_3; else tmp = t_2; 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 * (1.0 - (x / y)); t_3 = t_m / ((z - y) / x); tmp = 0.0; if (y <= -7.4e+111) tmp = t_2; elseif (y <= -3.3e+66) tmp = t_m * ((x - y) / z); elseif (y <= -1.6e+32) tmp = t_2; elseif (y <= -4.95e-138) tmp = t_3; elseif (y <= 2.05e-277) tmp = (x - y) * (t_m / z); elseif (y <= 2.2e+38) tmp = t_3; else tmp = t_2; 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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7.4e+111], t$95$2, If[LessEqual[y, -3.3e+66], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e+32], t$95$2, If[LessEqual[y, -4.95e-138], t$95$3, If[LessEqual[y, 2.05e-277], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+38], t$95$3, t$95$2]]]]]]), $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 \left(1 - \frac{x}{y}\right)\\
t_3 := \frac{t\_m}{\frac{z - y}{x}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{+66}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.95 \cdot 10^{-138}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-277}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -7.4000000000000005e111 or -3.3000000000000001e66 < y < -1.5999999999999999e32 or 2.20000000000000006e38 < y Initial program 99.8%
Taylor expanded in z around 0 83.5%
mul-1-neg83.5%
div-sub83.5%
sub-neg83.5%
*-inverses83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in x around 0 76.8%
*-rgt-identity76.8%
*-commutative76.8%
associate-/l*83.5%
associate-*r*83.5%
*-commutative83.5%
distribute-lft-in83.5%
mul-1-neg83.5%
sub-neg83.5%
Simplified83.5%
if -7.4000000000000005e111 < y < -3.3000000000000001e66Initial program 99.9%
Taylor expanded in z around inf 80.8%
if -1.5999999999999999e32 < y < -4.95e-138 or 2.04999999999999994e-277 < y < 2.20000000000000006e38Initial program 94.4%
associate-*l/95.6%
associate-/l*90.3%
Simplified90.3%
associate-*r/95.6%
associate-*l/94.4%
*-commutative94.4%
clear-num94.4%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in x around inf 75.7%
if -4.95e-138 < y < 2.04999999999999994e-277Initial program 85.1%
associate-*l/93.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 82.0%
*-commutative82.0%
associate-/l*86.5%
Simplified86.5%
Final simplification81.2%
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 y) (/ t_m (- z y)))))
(*
t_s
(if (<= y -5.6e+94)
(* t_m (/ y (- y z)))
(if (<= y 3.7e-265)
t_2
(if (<= y 1.25e-151)
(/ (* t_m x) (- z y))
(if (<= y 5.2e+254) t_2 (/ t_m (- 1.0 (/ 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 t_2 = (x - y) * (t_m / (z - y));
double tmp;
if (y <= -5.6e+94) {
tmp = t_m * (y / (y - z));
} else if (y <= 3.7e-265) {
tmp = t_2;
} else if (y <= 1.25e-151) {
tmp = (t_m * x) / (z - y);
} else if (y <= 5.2e+254) {
tmp = t_2;
} else {
tmp = t_m / (1.0 - (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) :: t_2
real(8) :: tmp
t_2 = (x - y) * (t_m / (z - y))
if (y <= (-5.6d+94)) then
tmp = t_m * (y / (y - z))
else if (y <= 3.7d-265) then
tmp = t_2
else if (y <= 1.25d-151) then
tmp = (t_m * x) / (z - y)
else if (y <= 5.2d+254) then
tmp = t_2
else
tmp = t_m / (1.0d0 - (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 t_2 = (x - y) * (t_m / (z - y));
double tmp;
if (y <= -5.6e+94) {
tmp = t_m * (y / (y - z));
} else if (y <= 3.7e-265) {
tmp = t_2;
} else if (y <= 1.25e-151) {
tmp = (t_m * x) / (z - y);
} else if (y <= 5.2e+254) {
tmp = t_2;
} else {
tmp = t_m / (1.0 - (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): t_2 = (x - y) * (t_m / (z - y)) tmp = 0 if y <= -5.6e+94: tmp = t_m * (y / (y - z)) elif y <= 3.7e-265: tmp = t_2 elif y <= 1.25e-151: tmp = (t_m * x) / (z - y) elif y <= 5.2e+254: tmp = t_2 else: tmp = t_m / (1.0 - (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) t_2 = Float64(Float64(x - y) * Float64(t_m / Float64(z - y))) tmp = 0.0 if (y <= -5.6e+94) tmp = Float64(t_m * Float64(y / Float64(y - z))); elseif (y <= 3.7e-265) tmp = t_2; elseif (y <= 1.25e-151) tmp = Float64(Float64(t_m * x) / Float64(z - y)); elseif (y <= 5.2e+254) tmp = t_2; else tmp = Float64(t_m / Float64(1.0 - Float64(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) t_2 = (x - y) * (t_m / (z - y)); tmp = 0.0; if (y <= -5.6e+94) tmp = t_m * (y / (y - z)); elseif (y <= 3.7e-265) tmp = t_2; elseif (y <= 1.25e-151) tmp = (t_m * x) / (z - y); elseif (y <= 5.2e+254) tmp = t_2; else tmp = t_m / (1.0 - (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_] := Block[{t$95$2 = N[(N[(x - y), $MachinePrecision] * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -5.6e+94], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-265], t$95$2, If[LessEqual[y, 1.25e-151], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+254], t$95$2, N[(t$95$m / N[(1.0 - N[(z / y), $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 := \left(x - y\right) \cdot \frac{t\_m}{z - y}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+94}:\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-151}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+254}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m}{1 - \frac{z}{y}}\\
\end{array}
\end{array}
\end{array}
if y < -5.59999999999999997e94Initial program 100.0%
Taylor expanded in x around 0 93.3%
neg-mul-193.3%
distribute-neg-frac293.3%
Simplified93.3%
if -5.59999999999999997e94 < y < 3.6999999999999997e-265 or 1.25000000000000001e-151 < y < 5.2000000000000002e254Initial program 93.5%
associate-*l/91.6%
associate-/l*95.6%
Simplified95.6%
if 3.6999999999999997e-265 < y < 1.25000000000000001e-151Initial program 95.0%
associate-*l/99.5%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in x around inf 99.5%
if 5.2000000000000002e254 < y Initial program 99.8%
associate-*l/64.5%
associate-/l*52.9%
Simplified52.9%
associate-*r/64.5%
associate-*l/99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification95.7%
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 (- 1.0 (/ x y)))))
(*
t_s
(if (<= y -7e+111)
t_2
(if (<= y -5.6e+94)
(* t_m (/ y (- z)))
(if (or (<= y -1.26e-23) (not (<= y 1.5e-109)))
t_2
(* t_m (/ x 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 * (1.0 - (x / y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -5.6e+94) {
tmp = t_m * (y / -z);
} else if ((y <= -1.26e-23) || !(y <= 1.5e-109)) {
tmp = t_2;
} else {
tmp = t_m * (x / 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 * (1.0d0 - (x / y))
if (y <= (-7d+111)) then
tmp = t_2
else if (y <= (-5.6d+94)) then
tmp = t_m * (y / -z)
else if ((y <= (-1.26d-23)) .or. (.not. (y <= 1.5d-109))) then
tmp = t_2
else
tmp = t_m * (x / 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 * (1.0 - (x / y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -5.6e+94) {
tmp = t_m * (y / -z);
} else if ((y <= -1.26e-23) || !(y <= 1.5e-109)) {
tmp = t_2;
} else {
tmp = t_m * (x / 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 * (1.0 - (x / y)) tmp = 0 if y <= -7e+111: tmp = t_2 elif y <= -5.6e+94: tmp = t_m * (y / -z) elif (y <= -1.26e-23) or not (y <= 1.5e-109): tmp = t_2 else: tmp = t_m * (x / 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(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -7e+111) tmp = t_2; elseif (y <= -5.6e+94) tmp = Float64(t_m * Float64(y / Float64(-z))); elseif ((y <= -1.26e-23) || !(y <= 1.5e-109)) tmp = t_2; else tmp = Float64(t_m * Float64(x / 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 * (1.0 - (x / y)); tmp = 0.0; if (y <= -7e+111) tmp = t_2; elseif (y <= -5.6e+94) tmp = t_m * (y / -z); elseif ((y <= -1.26e-23) || ~((y <= 1.5e-109))) tmp = t_2; else tmp = t_m * (x / 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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -5.6e+94], N[(t$95$m * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.26e-23], N[Not[LessEqual[y, 1.5e-109]], $MachinePrecision]], t$95$2, N[(t$95$m * N[(x / z), $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 \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{+94}:\\
\;\;\;\;t\_m \cdot \frac{y}{-z}\\
\mathbf{elif}\;y \leq -1.26 \cdot 10^{-23} \lor \neg \left(y \leq 1.5 \cdot 10^{-109}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z}\\
\end{array}
\end{array}
\end{array}
if y < -7.0000000000000004e111 or -5.59999999999999997e94 < y < -1.25999999999999996e-23 or 1.50000000000000011e-109 < y Initial program 98.6%
Taylor expanded in z around 0 76.7%
mul-1-neg76.7%
div-sub76.7%
sub-neg76.7%
*-inverses76.7%
metadata-eval76.7%
Simplified76.7%
Taylor expanded in x around 0 72.6%
*-rgt-identity72.6%
*-commutative72.6%
associate-/l*76.7%
associate-*r*76.7%
*-commutative76.7%
distribute-lft-in76.7%
mul-1-neg76.7%
sub-neg76.7%
Simplified76.7%
if -7.0000000000000004e111 < y < -5.59999999999999997e94Initial program 100.0%
associate-*l/83.9%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in z around inf 83.9%
*-commutative83.9%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in x around 0 68.1%
associate-*r/68.1%
mul-1-neg68.1%
distribute-rgt-neg-out68.1%
associate-/l*84.0%
Simplified84.0%
if -1.25999999999999996e-23 < y < 1.50000000000000011e-109Initial program 90.6%
Taylor expanded in y around 0 70.6%
Final simplification74.4%
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_3 (* t_m (- 1.0 (/ x y)))))
(*
t_s
(if (<= y -5.2e+101)
t_3
(if (<= y -2.7e-79)
t_2
(if (<= y 8.2e-279)
(* (- x y) (/ t_m z))
(if (<= y 6.5e+35) t_2 t_3)))))))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 t_3 = t_m * (1.0 - (x / y));
double tmp;
if (y <= -5.2e+101) {
tmp = t_3;
} else if (y <= -2.7e-79) {
tmp = t_2;
} else if (y <= 8.2e-279) {
tmp = (x - y) * (t_m / z);
} else if (y <= 6.5e+35) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_2 = t_m * (x / (z - y))
t_3 = t_m * (1.0d0 - (x / y))
if (y <= (-5.2d+101)) then
tmp = t_3
else if (y <= (-2.7d-79)) then
tmp = t_2
else if (y <= 8.2d-279) then
tmp = (x - y) * (t_m / z)
else if (y <= 6.5d+35) then
tmp = t_2
else
tmp = t_3
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 t_3 = t_m * (1.0 - (x / y));
double tmp;
if (y <= -5.2e+101) {
tmp = t_3;
} else if (y <= -2.7e-79) {
tmp = t_2;
} else if (y <= 8.2e-279) {
tmp = (x - y) * (t_m / z);
} else if (y <= 6.5e+35) {
tmp = t_2;
} else {
tmp = t_3;
}
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)) t_3 = t_m * (1.0 - (x / y)) tmp = 0 if y <= -5.2e+101: tmp = t_3 elif y <= -2.7e-79: tmp = t_2 elif y <= 8.2e-279: tmp = (x - y) * (t_m / z) elif y <= 6.5e+35: tmp = t_2 else: tmp = t_3 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))) t_3 = Float64(t_m * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -5.2e+101) tmp = t_3; elseif (y <= -2.7e-79) tmp = t_2; elseif (y <= 8.2e-279) tmp = Float64(Float64(x - y) * Float64(t_m / z)); elseif (y <= 6.5e+35) tmp = t_2; else tmp = t_3; 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)); t_3 = t_m * (1.0 - (x / y)); tmp = 0.0; if (y <= -5.2e+101) tmp = t_3; elseif (y <= -2.7e-79) tmp = t_2; elseif (y <= 8.2e-279) tmp = (x - y) * (t_m / z); elseif (y <= 6.5e+35) tmp = t_2; else tmp = t_3; 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]}, Block[{t$95$3 = N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -5.2e+101], t$95$3, If[LessEqual[y, -2.7e-79], t$95$2, If[LessEqual[y, 8.2e-279], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+35], t$95$2, t$95$3]]]]), $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_3 := t\_m \cdot \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+101}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-279}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
\end{array}
if y < -5.2e101 or 6.5000000000000003e35 < y Initial program 99.8%
Taylor expanded in z around 0 82.1%
mul-1-neg82.1%
div-sub82.1%
sub-neg82.1%
*-inverses82.1%
metadata-eval82.1%
Simplified82.1%
Taylor expanded in x around 0 75.1%
*-rgt-identity75.1%
*-commutative75.1%
associate-/l*82.1%
associate-*r*82.1%
*-commutative82.1%
distribute-lft-in82.1%
mul-1-neg82.1%
sub-neg82.1%
Simplified82.1%
if -5.2e101 < y < -2.7000000000000002e-79 or 8.20000000000000034e-279 < y < 6.5000000000000003e35Initial program 95.8%
Taylor expanded in x around inf 73.1%
if -2.7000000000000002e-79 < y < 8.20000000000000034e-279Initial program 85.8%
associate-*l/92.7%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in z around inf 79.6%
*-commutative79.6%
associate-/l*83.2%
Simplified83.2%
Final simplification78.9%
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 (- 1.0 (/ x y)))))
(*
t_s
(if (<= y -7e+111)
t_2
(if (<= y -9e+64)
(* t_m (/ (- x y) z))
(if (<= y 1.8e-265)
(/ x (/ (- z y) t_m))
(if (<= y 9.2e+34) (/ (* t_m x) (- z y)) t_2)))))))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 * (1.0 - (x / y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -9e+64) {
tmp = t_m * ((x - y) / z);
} else if (y <= 1.8e-265) {
tmp = x / ((z - y) / t_m);
} else if (y <= 9.2e+34) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_2;
}
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 * (1.0d0 - (x / y))
if (y <= (-7d+111)) then
tmp = t_2
else if (y <= (-9d+64)) then
tmp = t_m * ((x - y) / z)
else if (y <= 1.8d-265) then
tmp = x / ((z - y) / t_m)
else if (y <= 9.2d+34) then
tmp = (t_m * x) / (z - y)
else
tmp = t_2
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 * (1.0 - (x / y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -9e+64) {
tmp = t_m * ((x - y) / z);
} else if (y <= 1.8e-265) {
tmp = x / ((z - y) / t_m);
} else if (y <= 9.2e+34) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_2;
}
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 * (1.0 - (x / y)) tmp = 0 if y <= -7e+111: tmp = t_2 elif y <= -9e+64: tmp = t_m * ((x - y) / z) elif y <= 1.8e-265: tmp = x / ((z - y) / t_m) elif y <= 9.2e+34: tmp = (t_m * x) / (z - y) else: tmp = t_2 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(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -7e+111) tmp = t_2; elseif (y <= -9e+64) tmp = Float64(t_m * Float64(Float64(x - y) / z)); elseif (y <= 1.8e-265) tmp = Float64(x / Float64(Float64(z - y) / t_m)); elseif (y <= 9.2e+34) tmp = Float64(Float64(t_m * x) / Float64(z - y)); else tmp = t_2; 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 * (1.0 - (x / y)); tmp = 0.0; if (y <= -7e+111) tmp = t_2; elseif (y <= -9e+64) tmp = t_m * ((x - y) / z); elseif (y <= 1.8e-265) tmp = x / ((z - y) / t_m); elseif (y <= 9.2e+34) tmp = (t_m * x) / (z - y); else tmp = t_2; 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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -9e+64], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-265], N[(x / N[(N[(z - y), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+34], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]), $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 \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+64}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-265}:\\
\;\;\;\;\frac{x}{\frac{z - y}{t\_m}}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+34}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -7.0000000000000004e111 or 9.1999999999999993e34 < y Initial program 99.8%
Taylor expanded in z around 0 83.5%
mul-1-neg83.5%
div-sub83.5%
sub-neg83.5%
*-inverses83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in x around 0 76.4%
*-rgt-identity76.4%
*-commutative76.4%
associate-/l*83.5%
associate-*r*83.5%
*-commutative83.5%
distribute-lft-in83.5%
mul-1-neg83.5%
sub-neg83.5%
Simplified83.5%
if -7.0000000000000004e111 < y < -8.99999999999999946e64Initial program 99.9%
Taylor expanded in z around inf 80.8%
if -8.99999999999999946e64 < y < 1.8000000000000001e-265Initial program 90.9%
associate-*l/94.0%
associate-/l*97.5%
Simplified97.5%
clear-num96.3%
un-div-inv96.9%
Applied egg-rr96.9%
div-sub94.4%
Applied egg-rr94.4%
Taylor expanded in x around inf 78.9%
div-sub81.3%
Simplified81.3%
if 1.8000000000000001e-265 < y < 9.1999999999999993e34Initial program 93.0%
associate-*l/96.4%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in x around inf 79.7%
Final simplification81.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 -4e+116)
t_m
(if (<= y -3.6e-22)
(* t_m (/ x (- y)))
(if (<= y 2.2e-278)
(* x (/ t_m z))
(if (<= y 1.6e+35) (/ t_m (/ z x)) 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 <= -4e+116) {
tmp = t_m;
} else if (y <= -3.6e-22) {
tmp = t_m * (x / -y);
} else if (y <= 2.2e-278) {
tmp = x * (t_m / z);
} else if (y <= 1.6e+35) {
tmp = t_m / (z / x);
} 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 <= (-4d+116)) then
tmp = t_m
else if (y <= (-3.6d-22)) then
tmp = t_m * (x / -y)
else if (y <= 2.2d-278) then
tmp = x * (t_m / z)
else if (y <= 1.6d+35) then
tmp = t_m / (z / x)
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 <= -4e+116) {
tmp = t_m;
} else if (y <= -3.6e-22) {
tmp = t_m * (x / -y);
} else if (y <= 2.2e-278) {
tmp = x * (t_m / z);
} else if (y <= 1.6e+35) {
tmp = t_m / (z / x);
} 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 <= -4e+116: tmp = t_m elif y <= -3.6e-22: tmp = t_m * (x / -y) elif y <= 2.2e-278: tmp = x * (t_m / z) elif y <= 1.6e+35: tmp = t_m / (z / x) 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 <= -4e+116) tmp = t_m; elseif (y <= -3.6e-22) tmp = Float64(t_m * Float64(x / Float64(-y))); elseif (y <= 2.2e-278) tmp = Float64(x * Float64(t_m / z)); elseif (y <= 1.6e+35) tmp = Float64(t_m / Float64(z / x)); 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 <= -4e+116) tmp = t_m; elseif (y <= -3.6e-22) tmp = t_m * (x / -y); elseif (y <= 2.2e-278) tmp = x * (t_m / z); elseif (y <= 1.6e+35) tmp = t_m / (z / x); 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, -4e+116], t$95$m, If[LessEqual[y, -3.6e-22], N[(t$95$m * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-278], N[(x * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+35], N[(t$95$m / N[(z / x), $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 -4 \cdot 10^{+116}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-22}:\\
\;\;\;\;t\_m \cdot \frac{x}{-y}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-278}:\\
\;\;\;\;x \cdot \frac{t\_m}{z}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{t\_m}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -4.00000000000000006e116 or 1.59999999999999991e35 < y Initial program 99.8%
associate-*l/69.4%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in y around inf 70.7%
if -4.00000000000000006e116 < y < -3.5999999999999998e-22Initial program 99.8%
Taylor expanded in z around 0 54.4%
mul-1-neg54.4%
div-sub54.4%
sub-neg54.4%
*-inverses54.4%
metadata-eval54.4%
Simplified54.4%
Taylor expanded in x around 0 54.4%
*-rgt-identity54.4%
*-commutative54.4%
associate-/l*54.4%
associate-*r*54.4%
*-commutative54.4%
distribute-lft-in54.4%
mul-1-neg54.4%
sub-neg54.4%
Simplified54.4%
Taylor expanded in x around inf 48.0%
mul-1-neg48.0%
associate-/l*48.0%
distribute-rgt-neg-in48.0%
distribute-neg-frac48.0%
Simplified48.0%
if -3.5999999999999998e-22 < y < 2.2000000000000001e-278Initial program 88.6%
associate-*l/92.7%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in y around 0 65.1%
*-commutative65.1%
associate-/l*70.7%
Simplified70.7%
if 2.2000000000000001e-278 < y < 1.59999999999999991e35Initial program 93.5%
associate-*l/96.5%
associate-/l*87.3%
Simplified87.3%
associate-*r/96.5%
associate-*l/93.5%
*-commutative93.5%
clear-num93.5%
un-div-inv94.2%
Applied egg-rr94.2%
Taylor expanded in y around 0 63.3%
Final simplification66.7%
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 (- 1.0 (/ x y)))))
(*
t_s
(if (<= y -7e+111)
t_2
(if (<= y -4.3e+66)
(* t_m (/ (- x y) z))
(if (<= y 7.2e+41) (/ x (/ (- z y) t_m)) t_2))))))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 * (1.0 - (x / y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -4.3e+66) {
tmp = t_m * ((x - y) / z);
} else if (y <= 7.2e+41) {
tmp = x / ((z - y) / t_m);
} else {
tmp = t_2;
}
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 * (1.0d0 - (x / y))
if (y <= (-7d+111)) then
tmp = t_2
else if (y <= (-4.3d+66)) then
tmp = t_m * ((x - y) / z)
else if (y <= 7.2d+41) then
tmp = x / ((z - y) / t_m)
else
tmp = t_2
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 * (1.0 - (x / y));
double tmp;
if (y <= -7e+111) {
tmp = t_2;
} else if (y <= -4.3e+66) {
tmp = t_m * ((x - y) / z);
} else if (y <= 7.2e+41) {
tmp = x / ((z - y) / t_m);
} else {
tmp = t_2;
}
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 * (1.0 - (x / y)) tmp = 0 if y <= -7e+111: tmp = t_2 elif y <= -4.3e+66: tmp = t_m * ((x - y) / z) elif y <= 7.2e+41: tmp = x / ((z - y) / t_m) else: tmp = t_2 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(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -7e+111) tmp = t_2; elseif (y <= -4.3e+66) tmp = Float64(t_m * Float64(Float64(x - y) / z)); elseif (y <= 7.2e+41) tmp = Float64(x / Float64(Float64(z - y) / t_m)); else tmp = t_2; 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 * (1.0 - (x / y)); tmp = 0.0; if (y <= -7e+111) tmp = t_2; elseif (y <= -4.3e+66) tmp = t_m * ((x - y) / z); elseif (y <= 7.2e+41) tmp = x / ((z - y) / t_m); else tmp = t_2; 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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -4.3e+66], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+41], N[(x / N[(N[(z - y), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], t$95$2]]]), $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 \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{+66}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+41}:\\
\;\;\;\;\frac{x}{\frac{z - y}{t\_m}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -7.0000000000000004e111 or 7.20000000000000051e41 < y Initial program 99.8%
Taylor expanded in z around 0 83.5%
mul-1-neg83.5%
div-sub83.5%
sub-neg83.5%
*-inverses83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in x around 0 76.4%
*-rgt-identity76.4%
*-commutative76.4%
associate-/l*83.5%
associate-*r*83.5%
*-commutative83.5%
distribute-lft-in83.5%
mul-1-neg83.5%
sub-neg83.5%
Simplified83.5%
if -7.0000000000000004e111 < y < -4.30000000000000027e66Initial program 99.9%
Taylor expanded in z around inf 80.8%
if -4.30000000000000027e66 < y < 7.20000000000000051e41Initial program 91.8%
associate-*l/95.0%
associate-/l*93.6%
Simplified93.6%
clear-num92.8%
un-div-inv93.8%
Applied egg-rr93.8%
div-sub92.3%
Applied egg-rr92.3%
Taylor expanded in x around inf 76.3%
div-sub77.8%
Simplified77.8%
Final simplification80.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 (<= z -3.3e-29) (not (<= z 2.7e+81)))
(* (- x y) (/ t_m z))
(* t_m (- 1.0 (/ 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 ((z <= -3.3e-29) || !(z <= 2.7e+81)) {
tmp = (x - y) * (t_m / z);
} else {
tmp = t_m * (1.0 - (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 ((z <= (-3.3d-29)) .or. (.not. (z <= 2.7d+81))) then
tmp = (x - y) * (t_m / z)
else
tmp = t_m * (1.0d0 - (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 ((z <= -3.3e-29) || !(z <= 2.7e+81)) {
tmp = (x - y) * (t_m / z);
} else {
tmp = t_m * (1.0 - (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 (z <= -3.3e-29) or not (z <= 2.7e+81): tmp = (x - y) * (t_m / z) else: tmp = t_m * (1.0 - (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 ((z <= -3.3e-29) || !(z <= 2.7e+81)) tmp = Float64(Float64(x - y) * Float64(t_m / z)); else tmp = Float64(t_m * Float64(1.0 - Float64(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 ((z <= -3.3e-29) || ~((z <= 2.7e+81))) tmp = (x - y) * (t_m / z); else tmp = t_m * (1.0 - (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[Or[LessEqual[z, -3.3e-29], N[Not[LessEqual[z, 2.7e+81]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $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}\;z \leq -3.3 \cdot 10^{-29} \lor \neg \left(z \leq 2.7 \cdot 10^{+81}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if z < -3.30000000000000028e-29 or 2.6999999999999999e81 < z Initial program 96.7%
associate-*l/86.6%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in z around inf 70.9%
*-commutative70.9%
associate-/l*68.1%
Simplified68.1%
if -3.30000000000000028e-29 < z < 2.6999999999999999e81Initial program 94.5%
Taylor expanded in z around 0 75.9%
mul-1-neg75.9%
div-sub76.0%
sub-neg76.0%
*-inverses76.0%
metadata-eval76.0%
Simplified76.0%
Taylor expanded in x around 0 76.2%
*-rgt-identity76.2%
*-commutative76.2%
associate-/l*76.0%
associate-*r*76.0%
*-commutative76.0%
distribute-lft-in76.0%
mul-1-neg76.0%
sub-neg76.0%
Simplified76.0%
Final simplification72.5%
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.2e+46)
(* t_m (/ y (- y z)))
(if (<= y 1.85e+39) (/ (* t_m x) (- z y)) (* t_m (- 1.0 (/ 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 <= -6.2e+46) {
tmp = t_m * (y / (y - z));
} else if (y <= 1.85e+39) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_m * (1.0 - (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 <= (-6.2d+46)) then
tmp = t_m * (y / (y - z))
else if (y <= 1.85d+39) then
tmp = (t_m * x) / (z - y)
else
tmp = t_m * (1.0d0 - (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 <= -6.2e+46) {
tmp = t_m * (y / (y - z));
} else if (y <= 1.85e+39) {
tmp = (t_m * x) / (z - y);
} else {
tmp = t_m * (1.0 - (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 <= -6.2e+46: tmp = t_m * (y / (y - z)) elif y <= 1.85e+39: tmp = (t_m * x) / (z - y) else: tmp = t_m * (1.0 - (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 <= -6.2e+46) tmp = Float64(t_m * Float64(y / Float64(y - z))); elseif (y <= 1.85e+39) tmp = Float64(Float64(t_m * x) / Float64(z - y)); else tmp = Float64(t_m * Float64(1.0 - Float64(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 <= -6.2e+46) tmp = t_m * (y / (y - z)); elseif (y <= 1.85e+39) tmp = (t_m * x) / (z - y); else tmp = t_m * (1.0 - (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, -6.2e+46], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+39], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $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 -6.2 \cdot 10^{+46}:\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+39}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -6.1999999999999995e46Initial program 100.0%
Taylor expanded in x around 0 89.7%
neg-mul-189.7%
distribute-neg-frac289.7%
Simplified89.7%
if -6.1999999999999995e46 < y < 1.85000000000000006e39Initial program 91.7%
associate-*l/95.0%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in x around inf 78.3%
if 1.85000000000000006e39 < y Initial program 99.7%
Taylor expanded in z around 0 77.3%
mul-1-neg77.3%
div-sub77.4%
sub-neg77.4%
*-inverses77.4%
metadata-eval77.4%
Simplified77.4%
Taylor expanded in x around 0 72.2%
*-rgt-identity72.2%
*-commutative72.2%
associate-/l*77.4%
associate-*r*77.4%
*-commutative77.4%
distribute-lft-in77.4%
mul-1-neg77.4%
sub-neg77.4%
Simplified77.4%
Final simplification81.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 -5.2e+101) t_m (if (<= y 3e+35) (* 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 <= -5.2e+101) {
tmp = t_m;
} else if (y <= 3e+35) {
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 <= (-5.2d+101)) then
tmp = t_m
else if (y <= 3d+35) 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 <= -5.2e+101) {
tmp = t_m;
} else if (y <= 3e+35) {
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 <= -5.2e+101: tmp = t_m elif y <= 3e+35: 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 <= -5.2e+101) tmp = t_m; elseif (y <= 3e+35) 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 <= -5.2e+101) tmp = t_m; elseif (y <= 3e+35) 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, -5.2e+101], t$95$m, If[LessEqual[y, 3e+35], 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 -5.2 \cdot 10^{+101}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \frac{t\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -5.2e101 or 2.99999999999999991e35 < y Initial program 99.8%
associate-*l/69.3%
associate-/l*73.0%
Simplified73.0%
Taylor expanded in y around inf 68.8%
if -5.2e101 < y < 2.99999999999999991e35Initial program 92.3%
associate-*l/95.3%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in y around 0 59.4%
*-commutative59.4%
associate-/l*58.0%
Simplified58.0%
Final simplification62.6%
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 -5.2e+101) t_m (if (<= y 4.7e+44) (* t_m (/ x 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 <= -5.2e+101) {
tmp = t_m;
} else if (y <= 4.7e+44) {
tmp = t_m * (x / 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 <= (-5.2d+101)) then
tmp = t_m
else if (y <= 4.7d+44) then
tmp = t_m * (x / 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 <= -5.2e+101) {
tmp = t_m;
} else if (y <= 4.7e+44) {
tmp = t_m * (x / 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 <= -5.2e+101: tmp = t_m elif y <= 4.7e+44: tmp = t_m * (x / 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 <= -5.2e+101) tmp = t_m; elseif (y <= 4.7e+44) tmp = Float64(t_m * Float64(x / 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 <= -5.2e+101) tmp = t_m; elseif (y <= 4.7e+44) tmp = t_m * (x / 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, -5.2e+101], t$95$m, If[LessEqual[y, 4.7e+44], N[(t$95$m * N[(x / 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 -5.2 \cdot 10^{+101}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+44}:\\
\;\;\;\;t\_m \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -5.2e101 or 4.70000000000000018e44 < y Initial program 99.8%
associate-*l/69.3%
associate-/l*73.0%
Simplified73.0%
Taylor expanded in y around inf 68.8%
if -5.2e101 < y < 4.70000000000000018e44Initial program 92.3%
Taylor expanded in y around 0 60.6%
Final simplification64.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 (<= z 5.4e+228) 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 tmp;
if (z <= 5.4e+228) {
tmp = t_m;
} else {
tmp = 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) :: tmp
if (z <= 5.4d+228) then
tmp = t_m
else
tmp = 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 tmp;
if (z <= 5.4e+228) {
tmp = t_m;
} else {
tmp = 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): tmp = 0 if z <= 5.4e+228: tmp = t_m else: tmp = 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) tmp = 0.0 if (z <= 5.4e+228) tmp = t_m; else tmp = 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) tmp = 0.0; if (z <= 5.4e+228) tmp = t_m; else tmp = 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_] := N[(t$95$s * If[LessEqual[z, 5.4e+228], t$95$m, N[(t$95$m * N[(y / 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}\;z \leq 5.4 \cdot 10^{+228}:\\
\;\;\;\;t\_m\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < 5.4000000000000003e228Initial program 95.7%
associate-*l/83.6%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in y around inf 40.6%
if 5.4000000000000003e228 < z Initial program 92.9%
associate-*l/91.6%
associate-/l*87.6%
Simplified87.6%
Taylor expanded in z around inf 85.6%
*-commutative85.6%
associate-/l*87.6%
Simplified87.6%
Taylor expanded in x around 0 61.1%
associate-*r/61.1%
mul-1-neg61.1%
distribute-rgt-neg-out61.1%
associate-/l*69.3%
Simplified69.3%
clear-num69.3%
un-div-inv69.3%
add-sqr-sqrt30.8%
sqrt-unprod53.7%
sqr-neg53.7%
sqrt-unprod23.3%
add-sqr-sqrt49.9%
Applied egg-rr49.9%
associate-/r/50.0%
associate-*l/49.8%
associate-/l*49.9%
Simplified49.9%
Final simplification41.5%
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 95.5%
Final simplification95.5%
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 (/ (- z y) (- 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) {
return t_s * (t_m / ((z - y) / (x - 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 / ((z - y) / (x - 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 / ((z - y) / (x - 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 / ((z - y) / (x - 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(z - y) / Float64(x - 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 / ((z - y) / (x - 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[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{t\_m}{\frac{z - y}{x - y}}
\end{array}
Initial program 95.5%
associate-*l/84.3%
associate-/l*84.6%
Simplified84.6%
associate-*r/84.3%
associate-*l/95.5%
*-commutative95.5%
clear-num95.0%
un-div-inv95.8%
Applied egg-rr95.8%
Final simplification95.8%
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 95.5%
associate-*l/84.3%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in y around inf 37.4%
Final simplification37.4%
(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 2024096
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))