
(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 15 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 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (<= t_m 5.6e-49)
(/ (* t_m (- x y)) (- z y))
(* 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) {
double tmp;
if (t_m <= 5.6e-49) {
tmp = (t_m * (x - y)) / (z - y);
} else {
tmp = t_m * ((x - 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 (t_m <= 5.6d-49) then
tmp = (t_m * (x - y)) / (z - y)
else
tmp = t_m * ((x - 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 (t_m <= 5.6e-49) {
tmp = (t_m * (x - y)) / (z - y);
} else {
tmp = t_m * ((x - 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 t_m <= 5.6e-49: tmp = (t_m * (x - y)) / (z - y) else: tmp = t_m * ((x - 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 (t_m <= 5.6e-49) tmp = Float64(Float64(t_m * Float64(x - y)) / Float64(z - y)); else tmp = Float64(t_m * Float64(Float64(x - y) / 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) tmp = 0.0; if (t_m <= 5.6e-49) tmp = (t_m * (x - y)) / (z - y); else tmp = t_m * ((x - 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[t$95$m, 5.6e-49], N[(N[(t$95$m * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-49}:\\
\;\;\;\;\frac{t\_m \cdot \left(x - y\right)}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z - y}\\
\end{array}
\end{array}
if t < 5.59999999999999995e-49Initial program 95.5%
associate-*l/92.6%
associate-/l*80.1%
Simplified80.1%
associate-*r/92.6%
Applied egg-rr92.6%
if 5.59999999999999995e-49 < t Initial program 96.6%
Final simplification94.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(let* ((t_2 (* t_m (/ y (- y z)))))
(*
t_s
(if (<= y -1.2e-52)
t_2
(if (<= y -5.1e-253)
(* t_m (/ x (- z y)))
(if (<= y 1.35e-189)
(/ (* t_m (- x y)) z)
(if (<= y 8.5e+59) (/ (* 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 * (y / (y - z));
double tmp;
if (y <= -1.2e-52) {
tmp = t_2;
} else if (y <= -5.1e-253) {
tmp = t_m * (x / (z - y));
} else if (y <= 1.35e-189) {
tmp = (t_m * (x - y)) / z;
} else if (y <= 8.5e+59) {
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 * (y / (y - z))
if (y <= (-1.2d-52)) then
tmp = t_2
else if (y <= (-5.1d-253)) then
tmp = t_m * (x / (z - y))
else if (y <= 1.35d-189) then
tmp = (t_m * (x - y)) / z
else if (y <= 8.5d+59) 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 * (y / (y - z));
double tmp;
if (y <= -1.2e-52) {
tmp = t_2;
} else if (y <= -5.1e-253) {
tmp = t_m * (x / (z - y));
} else if (y <= 1.35e-189) {
tmp = (t_m * (x - y)) / z;
} else if (y <= 8.5e+59) {
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 * (y / (y - z)) tmp = 0 if y <= -1.2e-52: tmp = t_2 elif y <= -5.1e-253: tmp = t_m * (x / (z - y)) elif y <= 1.35e-189: tmp = (t_m * (x - y)) / z elif y <= 8.5e+59: 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(y / Float64(y - z))) tmp = 0.0 if (y <= -1.2e-52) tmp = t_2; elseif (y <= -5.1e-253) tmp = Float64(t_m * Float64(x / Float64(z - y))); elseif (y <= 1.35e-189) tmp = Float64(Float64(t_m * Float64(x - y)) / z); elseif (y <= 8.5e+59) 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 * (y / (y - z)); tmp = 0.0; if (y <= -1.2e-52) tmp = t_2; elseif (y <= -5.1e-253) tmp = t_m * (x / (z - y)); elseif (y <= 1.35e-189) tmp = (t_m * (x - y)) / z; elseif (y <= 8.5e+59) 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[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -1.2e-52], t$95$2, If[LessEqual[y, -5.1e-253], N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-189], N[(N[(t$95$m * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 8.5e+59], 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 \frac{y}{y - z}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.1 \cdot 10^{-253}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-189}:\\
\;\;\;\;\frac{t\_m \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+59}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -1.2000000000000001e-52 or 8.4999999999999999e59 < y Initial program 99.8%
Taylor expanded in x around 0 83.1%
neg-mul-183.1%
distribute-neg-frac283.1%
neg-sub083.1%
sub-neg83.1%
+-commutative83.1%
associate--r+83.1%
neg-sub083.1%
remove-double-neg83.1%
Simplified83.1%
if -1.2000000000000001e-52 < y < -5.10000000000000008e-253Initial program 95.8%
Taylor expanded in x around inf 82.1%
if -5.10000000000000008e-253 < y < 1.35e-189Initial program 88.5%
associate-*l/96.2%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in z around inf 92.9%
if 1.35e-189 < y < 8.4999999999999999e59Initial program 94.1%
associate-*l/99.7%
associate-/l*92.3%
Simplified92.3%
Taylor expanded in x around inf 76.6%
Final simplification82.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(let* ((t_2 (* t_m (/ y (- y z)))))
(*
t_s
(if (<= y -8.5e-47)
t_2
(if (<= y -3.7e-125)
(* t_m (/ (- x y) z))
(if (<= y 3.8e+57) (/ (* 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 * (y / (y - z));
double tmp;
if (y <= -8.5e-47) {
tmp = t_2;
} else if (y <= -3.7e-125) {
tmp = t_m * ((x - y) / z);
} else if (y <= 3.8e+57) {
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 * (y / (y - z))
if (y <= (-8.5d-47)) then
tmp = t_2
else if (y <= (-3.7d-125)) then
tmp = t_m * ((x - y) / z)
else if (y <= 3.8d+57) 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 * (y / (y - z));
double tmp;
if (y <= -8.5e-47) {
tmp = t_2;
} else if (y <= -3.7e-125) {
tmp = t_m * ((x - y) / z);
} else if (y <= 3.8e+57) {
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 * (y / (y - z)) tmp = 0 if y <= -8.5e-47: tmp = t_2 elif y <= -3.7e-125: tmp = t_m * ((x - y) / z) elif y <= 3.8e+57: 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(y / Float64(y - z))) tmp = 0.0 if (y <= -8.5e-47) tmp = t_2; elseif (y <= -3.7e-125) tmp = Float64(t_m * Float64(Float64(x - y) / z)); elseif (y <= 3.8e+57) 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 * (y / (y - z)); tmp = 0.0; if (y <= -8.5e-47) tmp = t_2; elseif (y <= -3.7e-125) tmp = t_m * ((x - y) / z); elseif (y <= 3.8e+57) 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[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -8.5e-47], t$95$2, If[LessEqual[y, -3.7e-125], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+57], 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 \frac{y}{y - z}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-125}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+57}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if y < -8.4999999999999999e-47 or 3.7999999999999999e57 < y Initial program 99.8%
Taylor expanded in x around 0 83.5%
neg-mul-183.5%
distribute-neg-frac283.5%
neg-sub083.5%
sub-neg83.5%
+-commutative83.5%
associate--r+83.5%
neg-sub083.5%
remove-double-neg83.5%
Simplified83.5%
if -8.4999999999999999e-47 < y < -3.6999999999999999e-125Initial program 95.0%
Taylor expanded in z around inf 74.7%
if -3.6999999999999999e-125 < y < 3.7999999999999999e57Initial program 93.0%
associate-*l/97.9%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in x around inf 80.2%
Final simplification81.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (or (<= y -4.8e+154) (not (<= y 1e+83)))
(* t_m (/ y (- y z)))
(* (- x y) (/ t_m (- 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 <= -4.8e+154) || !(y <= 1e+83)) {
tmp = t_m * (y / (y - z));
} else {
tmp = (x - y) * (t_m / (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 <= (-4.8d+154)) .or. (.not. (y <= 1d+83))) then
tmp = t_m * (y / (y - z))
else
tmp = (x - y) * (t_m / (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 <= -4.8e+154) || !(y <= 1e+83)) {
tmp = t_m * (y / (y - z));
} else {
tmp = (x - y) * (t_m / (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 <= -4.8e+154) or not (y <= 1e+83): tmp = t_m * (y / (y - z)) else: tmp = (x - y) * (t_m / (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 <= -4.8e+154) || !(y <= 1e+83)) tmp = Float64(t_m * Float64(y / Float64(y - z))); else tmp = Float64(Float64(x - y) * Float64(t_m / 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) tmp = 0.0; if ((y <= -4.8e+154) || ~((y <= 1e+83))) tmp = t_m * (y / (y - z)); else tmp = (x - y) * (t_m / (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[Or[LessEqual[y, -4.8e+154], N[Not[LessEqual[y, 1e+83]], $MachinePrecision]], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / 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 \begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+154} \lor \neg \left(y \leq 10^{+83}\right):\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z - y}\\
\end{array}
\end{array}
if y < -4.8000000000000003e154 or 1.00000000000000003e83 < y Initial program 99.9%
Taylor expanded in x around 0 93.7%
neg-mul-193.7%
distribute-neg-frac293.7%
neg-sub093.7%
sub-neg93.7%
+-commutative93.7%
associate--r+93.7%
neg-sub093.7%
remove-double-neg93.7%
Simplified93.7%
if -4.8000000000000003e154 < y < 1.00000000000000003e83Initial program 94.6%
associate-*l/93.6%
associate-/l*92.1%
Simplified92.1%
Final simplification92.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (or (<= y -6.5e-55) (not (<= y 1.95e+57)))
(* t_m (/ y (- y z)))
(* t_m (/ x (- 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 <= -6.5e-55) || !(y <= 1.95e+57)) {
tmp = t_m * (y / (y - z));
} else {
tmp = t_m * (x / (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 <= (-6.5d-55)) .or. (.not. (y <= 1.95d+57))) then
tmp = t_m * (y / (y - z))
else
tmp = t_m * (x / (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 <= -6.5e-55) || !(y <= 1.95e+57)) {
tmp = t_m * (y / (y - z));
} else {
tmp = t_m * (x / (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 <= -6.5e-55) or not (y <= 1.95e+57): tmp = t_m * (y / (y - z)) else: tmp = t_m * (x / (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 <= -6.5e-55) || !(y <= 1.95e+57)) tmp = Float64(t_m * Float64(y / Float64(y - z))); else tmp = Float64(t_m * Float64(x / 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) tmp = 0.0; if ((y <= -6.5e-55) || ~((y <= 1.95e+57))) tmp = t_m * (y / (y - z)); else tmp = t_m * (x / (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[Or[LessEqual[y, -6.5e-55], N[Not[LessEqual[y, 1.95e+57]], $MachinePrecision]], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(x / 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 \begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-55} \lor \neg \left(y \leq 1.95 \cdot 10^{+57}\right):\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -6.50000000000000006e-55 or 1.94999999999999984e57 < y Initial program 99.8%
Taylor expanded in x around 0 83.1%
neg-mul-183.1%
distribute-neg-frac283.1%
neg-sub083.1%
sub-neg83.1%
+-commutative83.1%
associate--r+83.1%
neg-sub083.1%
remove-double-neg83.1%
Simplified83.1%
if -6.50000000000000006e-55 < y < 1.94999999999999984e57Initial program 93.1%
Taylor expanded in x around inf 76.1%
Final simplification79.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (or (<= y -3.7e+61) (not (<= y 2.75e+41)))
(* t_m (- 1.0 (/ x y)))
(* t_m (/ x (- 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.7e+61) || !(y <= 2.75e+41)) {
tmp = t_m * (1.0 - (x / y));
} else {
tmp = t_m * (x / (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.7d+61)) .or. (.not. (y <= 2.75d+41))) then
tmp = t_m * (1.0d0 - (x / y))
else
tmp = t_m * (x / (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.7e+61) || !(y <= 2.75e+41)) {
tmp = t_m * (1.0 - (x / y));
} else {
tmp = t_m * (x / (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.7e+61) or not (y <= 2.75e+41): tmp = t_m * (1.0 - (x / y)) else: tmp = t_m * (x / (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.7e+61) || !(y <= 2.75e+41)) tmp = Float64(t_m * Float64(1.0 - Float64(x / y))); else tmp = Float64(t_m * Float64(x / 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) tmp = 0.0; if ((y <= -3.7e+61) || ~((y <= 2.75e+41))) tmp = t_m * (1.0 - (x / y)); else tmp = t_m * (x / (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[Or[LessEqual[y, -3.7e+61], N[Not[LessEqual[y, 2.75e+41]], $MachinePrecision]], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(x / 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 \begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+61} \lor \neg \left(y \leq 2.75 \cdot 10^{+41}\right):\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -3.70000000000000003e61 or 2.7500000000000002e41 < y Initial program 99.9%
Taylor expanded in z around 0 78.6%
associate-*r/78.6%
neg-mul-178.6%
neg-sub078.6%
sub-neg78.6%
+-commutative78.6%
associate--r+78.6%
neg-sub078.6%
remove-double-neg78.6%
Simplified78.6%
Taylor expanded in y around 0 78.6%
neg-mul-178.6%
sub-neg78.6%
div-sub78.6%
*-inverses78.6%
Simplified78.6%
if -3.70000000000000003e61 < y < 2.7500000000000002e41Initial program 93.7%
Taylor expanded in x around inf 73.6%
Final simplification75.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (or (<= z -8e-48) (not (<= z 1e-20)))
(* (- 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 <= -8e-48) || !(z <= 1e-20)) {
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 <= (-8d-48)) .or. (.not. (z <= 1d-20))) 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 <= -8e-48) || !(z <= 1e-20)) {
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 <= -8e-48) or not (z <= 1e-20): 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 <= -8e-48) || !(z <= 1e-20)) 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 <= -8e-48) || ~((z <= 1e-20))) 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, -8e-48], N[Not[LessEqual[z, 1e-20]], $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 -8 \cdot 10^{-48} \lor \neg \left(z \leq 10^{-20}\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 < -7.9999999999999998e-48 or 9.99999999999999945e-21 < z Initial program 95.6%
associate-*l/88.8%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in z around inf 72.5%
if -7.9999999999999998e-48 < z < 9.99999999999999945e-21Initial program 96.1%
Taylor expanded in z around 0 76.9%
associate-*r/76.9%
neg-mul-176.9%
neg-sub076.9%
sub-neg76.9%
+-commutative76.9%
associate--r+76.9%
neg-sub076.9%
remove-double-neg76.9%
Simplified76.9%
Taylor expanded in y around 0 76.9%
neg-mul-176.9%
sub-neg76.9%
div-sub76.9%
*-inverses76.9%
Simplified76.9%
Final simplification74.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
:precision binary64
(*
t_s
(if (or (<= y -2.2e+63) (not (<= y 2.4e+41)))
(* t_m (- 1.0 (/ x y)))
(* x (/ t_m (- 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 <= -2.2e+63) || !(y <= 2.4e+41)) {
tmp = t_m * (1.0 - (x / y));
} else {
tmp = x * (t_m / (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 <= (-2.2d+63)) .or. (.not. (y <= 2.4d+41))) then
tmp = t_m * (1.0d0 - (x / y))
else
tmp = x * (t_m / (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 <= -2.2e+63) || !(y <= 2.4e+41)) {
tmp = t_m * (1.0 - (x / y));
} else {
tmp = x * (t_m / (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 <= -2.2e+63) or not (y <= 2.4e+41): tmp = t_m * (1.0 - (x / y)) else: tmp = x * (t_m / (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 <= -2.2e+63) || !(y <= 2.4e+41)) tmp = Float64(t_m * Float64(1.0 - Float64(x / y))); else tmp = Float64(x * Float64(t_m / 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) tmp = 0.0; if ((y <= -2.2e+63) || ~((y <= 2.4e+41))) tmp = t_m * (1.0 - (x / y)); else tmp = x * (t_m / (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[Or[LessEqual[y, -2.2e+63], N[Not[LessEqual[y, 2.4e+41]], $MachinePrecision]], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$m / 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 \begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+63} \lor \neg \left(y \leq 2.4 \cdot 10^{+41}\right):\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t\_m}{z - y}\\
\end{array}
\end{array}
if y < -2.1999999999999999e63 or 2.4000000000000002e41 < y Initial program 99.9%
Taylor expanded in z around 0 78.6%
associate-*r/78.6%
neg-mul-178.6%
neg-sub078.6%
sub-neg78.6%
+-commutative78.6%
associate--r+78.6%
neg-sub078.6%
remove-double-neg78.6%
Simplified78.6%
Taylor expanded in y around 0 78.6%
neg-mul-178.6%
sub-neg78.6%
div-sub78.6%
*-inverses78.6%
Simplified78.6%
if -2.1999999999999999e63 < y < 2.4000000000000002e41Initial program 93.7%
associate-*l/95.4%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in x around inf 71.1%
Final simplification73.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (if (<= y -6.4e+62) t_m (if (<= y 3.1e+82) (* 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 <= -6.4e+62) {
tmp = t_m;
} else if (y <= 3.1e+82) {
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 <= (-6.4d+62)) then
tmp = t_m
else if (y <= 3.1d+82) 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 <= -6.4e+62) {
tmp = t_m;
} else if (y <= 3.1e+82) {
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 <= -6.4e+62: tmp = t_m elif y <= 3.1e+82: 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 <= -6.4e+62) tmp = t_m; elseif (y <= 3.1e+82) 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 <= -6.4e+62) tmp = t_m; elseif (y <= 3.1e+82) 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, -6.4e+62], t$95$m, If[LessEqual[y, 3.1e+82], 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 -6.4 \cdot 10^{+62}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \frac{t\_m}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -6.39999999999999968e62 or 3.10000000000000032e82 < y Initial program 99.9%
associate-*l/75.8%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in y around inf 73.2%
if -6.39999999999999968e62 < y < 3.10000000000000032e82Initial program 94.1%
associate-*l/95.7%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in x around inf 69.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (if (<= y -2.15e+61) t_m (if (<= y 1.4e+40) (/ 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 <= -2.15e+61) {
tmp = t_m;
} else if (y <= 1.4e+40) {
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 <= (-2.15d+61)) then
tmp = t_m
else if (y <= 1.4d+40) 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 <= -2.15e+61) {
tmp = t_m;
} else if (y <= 1.4e+40) {
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 <= -2.15e+61: tmp = t_m elif y <= 1.4e+40: 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 <= -2.15e+61) tmp = t_m; elseif (y <= 1.4e+40) 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 <= -2.15e+61) tmp = t_m; elseif (y <= 1.4e+40) 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, -2.15e+61], t$95$m, If[LessEqual[y, 1.4e+40], 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 -2.15 \cdot 10^{+61}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+40}:\\
\;\;\;\;\frac{t\_m}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -2.1500000000000001e61 or 1.4000000000000001e40 < y Initial program 99.9%
associate-*l/78.7%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in y around inf 69.0%
if -2.1500000000000001e61 < y < 1.4000000000000001e40Initial program 93.7%
associate-*l/95.4%
associate-/l*91.3%
Simplified91.3%
associate-*r/95.4%
associate-*l/93.7%
*-commutative93.7%
clear-num93.4%
un-div-inv93.8%
Applied egg-rr93.8%
Taylor expanded in y around 0 57.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (if (<= y -2.15e+61) t_m (if (<= y 6.2e+41) (* 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 <= -2.15e+61) {
tmp = t_m;
} else if (y <= 6.2e+41) {
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 <= (-2.15d+61)) then
tmp = t_m
else if (y <= 6.2d+41) 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 <= -2.15e+61) {
tmp = t_m;
} else if (y <= 6.2e+41) {
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 <= -2.15e+61: tmp = t_m elif y <= 6.2e+41: 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 <= -2.15e+61) tmp = t_m; elseif (y <= 6.2e+41) 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 <= -2.15e+61) tmp = t_m; elseif (y <= 6.2e+41) 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, -2.15e+61], t$95$m, If[LessEqual[y, 6.2e+41], 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 -2.15 \cdot 10^{+61}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+41}:\\
\;\;\;\;t\_m \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -2.1500000000000001e61 or 6.2e41 < y Initial program 99.9%
associate-*l/78.7%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in y around inf 69.0%
if -2.1500000000000001e61 < y < 6.2e41Initial program 93.7%
Taylor expanded in y around 0 57.6%
Final simplification61.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x y z t_m) :precision binary64 (* t_s (if (<= y -2.7e+61) t_m (if (<= y 4.3e+41) (* 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 <= -2.7e+61) {
tmp = t_m;
} else if (y <= 4.3e+41) {
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 <= (-2.7d+61)) then
tmp = t_m
else if (y <= 4.3d+41) 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 <= -2.7e+61) {
tmp = t_m;
} else if (y <= 4.3e+41) {
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 <= -2.7e+61: tmp = t_m elif y <= 4.3e+41: 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 <= -2.7e+61) tmp = t_m; elseif (y <= 4.3e+41) 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 <= -2.7e+61) tmp = t_m; elseif (y <= 4.3e+41) 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, -2.7e+61], t$95$m, If[LessEqual[y, 4.3e+41], 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 -2.7 \cdot 10^{+61}:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+41}:\\
\;\;\;\;x \cdot \frac{t\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -2.7000000000000002e61 or 4.30000000000000024e41 < y Initial program 99.9%
associate-*l/78.7%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in y around inf 69.0%
if -2.7000000000000002e61 < y < 4.30000000000000024e41Initial program 93.7%
associate-*l/95.4%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in z around inf 68.2%
Taylor expanded in x around inf 54.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) 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.9%
associate-*l/89.5%
associate-/l*84.8%
Simplified84.8%
associate-*r/89.5%
associate-*l/95.9%
*-commutative95.9%
clear-num95.6%
un-div-inv95.9%
Applied egg-rr95.9%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) 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.9%
Final simplification95.9%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) 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.9%
associate-*l/89.5%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in y around inf 30.5%
(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 2024185
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(! :herbie-platform default (/ t (/ (- z y) (- x y))))
(* (/ (- x y) (- z y)) t))