
(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 7.5e-15)
(* (/ -1.0 (- y z)) (/ t_m (/ -1.0 (- y x))))
(/ (- x y) (/ (- z y) t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (t_m <= 7.5e-15) {
tmp = (-1.0 / (y - z)) * (t_m / (-1.0 / (y - x)));
} else {
tmp = (x - y) / ((z - y) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (t_m <= 7.5d-15) then
tmp = ((-1.0d0) / (y - z)) * (t_m / ((-1.0d0) / (y - x)))
else
tmp = (x - y) / ((z - y) / t_m)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if (t_m <= 7.5e-15) {
tmp = (-1.0 / (y - z)) * (t_m / (-1.0 / (y - x)));
} else {
tmp = (x - y) / ((z - y) / t_m);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if t_m <= 7.5e-15: tmp = (-1.0 / (y - z)) * (t_m / (-1.0 / (y - x))) else: tmp = (x - y) / ((z - y) / t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if (t_m <= 7.5e-15) tmp = Float64(Float64(-1.0 / Float64(y - z)) * Float64(t_m / Float64(-1.0 / Float64(y - x)))); else tmp = Float64(Float64(x - y) / Float64(Float64(z - y) / t_m)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if (t_m <= 7.5e-15) tmp = (-1.0 / (y - z)) * (t_m / (-1.0 / (y - x))); else tmp = (x - y) / ((z - y) / t_m); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-15], N[(N[(-1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / N[(-1.0 / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(N[(z - y), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{y - z} \cdot \frac{t\_m}{\frac{-1}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\frac{z - y}{t\_m}}\\
\end{array}
\end{array}
if t < 7.4999999999999996e-15Initial program 96.5%
associate-*l/88.6%
associate-/l*82.6%
Simplified82.6%
associate-*r/88.6%
associate-*l/96.5%
*-commutative96.5%
clear-num96.0%
un-div-inv96.5%
Applied egg-rr96.5%
*-un-lft-identity96.5%
div-inv96.4%
times-frac88.5%
Applied egg-rr88.5%
if 7.4999999999999996e-15 < t Initial program 98.1%
associate-*l/73.8%
associate-/l*98.0%
Simplified98.0%
clear-num97.9%
un-div-inv98.1%
Applied egg-rr98.1%
Final simplification90.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 (<= x -5.2e+105)
(/ t_m (/ (- z y) x))
(if (<= x -5.3e+54)
(* t_m (/ (- y x) y))
(if (<= x -2.4e-25)
(/ (* t_m x) (- z y))
(if (<= x 1.3e+39) (/ t_m (- 1.0 (/ z 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 (x <= -5.2e+105) {
tmp = t_m / ((z - y) / x);
} else if (x <= -5.3e+54) {
tmp = t_m * ((y - x) / y);
} else if (x <= -2.4e-25) {
tmp = (t_m * x) / (z - y);
} else if (x <= 1.3e+39) {
tmp = t_m / (1.0 - (z / 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 (x <= (-5.2d+105)) then
tmp = t_m / ((z - y) / x)
else if (x <= (-5.3d+54)) then
tmp = t_m * ((y - x) / y)
else if (x <= (-2.4d-25)) then
tmp = (t_m * x) / (z - y)
else if (x <= 1.3d+39) then
tmp = t_m / (1.0d0 - (z / 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 (x <= -5.2e+105) {
tmp = t_m / ((z - y) / x);
} else if (x <= -5.3e+54) {
tmp = t_m * ((y - x) / y);
} else if (x <= -2.4e-25) {
tmp = (t_m * x) / (z - y);
} else if (x <= 1.3e+39) {
tmp = t_m / (1.0 - (z / 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 x <= -5.2e+105: tmp = t_m / ((z - y) / x) elif x <= -5.3e+54: tmp = t_m * ((y - x) / y) elif x <= -2.4e-25: tmp = (t_m * x) / (z - y) elif x <= 1.3e+39: tmp = t_m / (1.0 - (z / 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 (x <= -5.2e+105) tmp = Float64(t_m / Float64(Float64(z - y) / x)); elseif (x <= -5.3e+54) tmp = Float64(t_m * Float64(Float64(y - x) / y)); elseif (x <= -2.4e-25) tmp = Float64(Float64(t_m * x) / Float64(z - y)); elseif (x <= 1.3e+39) tmp = Float64(t_m / Float64(1.0 - Float64(z / 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 (x <= -5.2e+105) tmp = t_m / ((z - y) / x); elseif (x <= -5.3e+54) tmp = t_m * ((y - x) / y); elseif (x <= -2.4e-25) tmp = (t_m * x) / (z - y); elseif (x <= 1.3e+39) tmp = t_m / (1.0 - (z / 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[LessEqual[x, -5.2e+105], N[(t$95$m / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.3e+54], N[(t$95$m * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.4e-25], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+39], N[(t$95$m / N[(1.0 - N[(z / 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}\;x \leq -5.2 \cdot 10^{+105}:\\
\;\;\;\;\frac{t\_m}{\frac{z - y}{x}}\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{+54}:\\
\;\;\;\;t\_m \cdot \frac{y - x}{y}\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-25}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+39}:\\
\;\;\;\;\frac{t\_m}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if x < -5.2000000000000004e105Initial program 93.5%
associate-*l/76.9%
associate-/l*83.6%
Simplified83.6%
associate-*r/76.9%
associate-*l/93.5%
*-commutative93.5%
clear-num93.5%
un-div-inv95.3%
Applied egg-rr95.3%
Taylor expanded in x around inf 80.3%
if -5.2000000000000004e105 < x < -5.30000000000000018e54Initial program 100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
if -5.30000000000000018e54 < x < -2.40000000000000009e-25Initial program 99.3%
associate-*l/99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 83.7%
if -2.40000000000000009e-25 < x < 1.3e39Initial program 97.6%
associate-*l/88.6%
associate-/l*87.8%
Simplified87.8%
associate-*r/88.6%
associate-*l/97.6%
*-commutative97.6%
clear-num97.0%
un-div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in x around 0 75.3%
mul-1-neg75.3%
*-commutative75.3%
associate-*r/75.7%
*-commutative75.7%
associate-/r/83.8%
distribute-neg-frac283.8%
div-sub83.8%
sub-neg83.8%
*-inverses83.8%
metadata-eval83.8%
Simplified83.8%
if 1.3e39 < x Initial program 96.5%
Taylor expanded in x around inf 78.5%
Final simplification82.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 (<= x -2.9e+115)
(/ t_m (/ (- z y) x))
(if (<= x -8.8e+50)
(* t_m (/ (- y x) y))
(if (<= x -2.7e-28)
(/ (* t_m x) (- z y))
(if (<= x 3.9e+37) (* 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 (x <= -2.9e+115) {
tmp = t_m / ((z - y) / x);
} else if (x <= -8.8e+50) {
tmp = t_m * ((y - x) / y);
} else if (x <= -2.7e-28) {
tmp = (t_m * x) / (z - y);
} else if (x <= 3.9e+37) {
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 (x <= (-2.9d+115)) then
tmp = t_m / ((z - y) / x)
else if (x <= (-8.8d+50)) then
tmp = t_m * ((y - x) / y)
else if (x <= (-2.7d-28)) then
tmp = (t_m * x) / (z - y)
else if (x <= 3.9d+37) 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 (x <= -2.9e+115) {
tmp = t_m / ((z - y) / x);
} else if (x <= -8.8e+50) {
tmp = t_m * ((y - x) / y);
} else if (x <= -2.7e-28) {
tmp = (t_m * x) / (z - y);
} else if (x <= 3.9e+37) {
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 x <= -2.9e+115: tmp = t_m / ((z - y) / x) elif x <= -8.8e+50: tmp = t_m * ((y - x) / y) elif x <= -2.7e-28: tmp = (t_m * x) / (z - y) elif x <= 3.9e+37: 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 (x <= -2.9e+115) tmp = Float64(t_m / Float64(Float64(z - y) / x)); elseif (x <= -8.8e+50) tmp = Float64(t_m * Float64(Float64(y - x) / y)); elseif (x <= -2.7e-28) tmp = Float64(Float64(t_m * x) / Float64(z - y)); elseif (x <= 3.9e+37) 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 (x <= -2.9e+115) tmp = t_m / ((z - y) / x); elseif (x <= -8.8e+50) tmp = t_m * ((y - x) / y); elseif (x <= -2.7e-28) tmp = (t_m * x) / (z - y); elseif (x <= 3.9e+37) 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[LessEqual[x, -2.9e+115], N[(t$95$m / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8.8e+50], N[(t$95$m * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.7e-28], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e+37], 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}\;x \leq -2.9 \cdot 10^{+115}:\\
\;\;\;\;\frac{t\_m}{\frac{z - y}{x}}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{+50}:\\
\;\;\;\;t\_m \cdot \frac{y - x}{y}\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-28}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+37}:\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if x < -2.90000000000000005e115Initial program 93.5%
associate-*l/76.9%
associate-/l*83.6%
Simplified83.6%
associate-*r/76.9%
associate-*l/93.5%
*-commutative93.5%
clear-num93.5%
un-div-inv95.3%
Applied egg-rr95.3%
Taylor expanded in x around inf 80.3%
if -2.90000000000000005e115 < x < -8.80000000000000067e50Initial program 100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
if -8.80000000000000067e50 < x < -2.6999999999999999e-28Initial program 99.3%
associate-*l/99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 83.7%
if -2.6999999999999999e-28 < x < 3.8999999999999999e37Initial program 97.6%
Taylor expanded in x around 0 83.8%
neg-mul-183.8%
distribute-neg-frac283.8%
Simplified83.8%
if 3.8999999999999999e37 < x Initial program 96.5%
Taylor expanded in x around inf 78.5%
Final simplification82.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 -2e+182)
(* t_m (/ y (- y z)))
(if (<= y 7e+184) (* (- x y) (/ t_m (- z y))) (* t_m (/ (- 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 (y <= -2e+182) {
tmp = t_m * (y / (y - z));
} else if (y <= 7e+184) {
tmp = (x - y) * (t_m / (z - y));
} else {
tmp = t_m * ((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 (y <= (-2d+182)) then
tmp = t_m * (y / (y - z))
else if (y <= 7d+184) then
tmp = (x - y) * (t_m / (z - y))
else
tmp = t_m * ((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 (y <= -2e+182) {
tmp = t_m * (y / (y - z));
} else if (y <= 7e+184) {
tmp = (x - y) * (t_m / (z - y));
} else {
tmp = t_m * ((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 y <= -2e+182: tmp = t_m * (y / (y - z)) elif y <= 7e+184: tmp = (x - y) * (t_m / (z - y)) else: tmp = t_m * ((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 (y <= -2e+182) tmp = Float64(t_m * Float64(y / Float64(y - z))); elseif (y <= 7e+184) tmp = Float64(Float64(x - y) * Float64(t_m / Float64(z - y))); else tmp = Float64(t_m * Float64(Float64(y - 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 <= -2e+182) tmp = t_m * (y / (y - z)); elseif (y <= 7e+184) tmp = (x - y) * (t_m / (z - y)); else tmp = t_m * ((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[y, -2e+182], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+184], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+182}:\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+184}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{y - x}{y}\\
\end{array}
\end{array}
if y < -2.0000000000000001e182Initial program 99.9%
Taylor expanded in x around 0 89.7%
neg-mul-189.7%
distribute-neg-frac289.7%
Simplified89.7%
if -2.0000000000000001e182 < y < 6.99999999999999956e184Initial program 96.0%
associate-*l/91.3%
associate-/l*91.5%
Simplified91.5%
if 6.99999999999999956e184 < y Initial program 99.9%
Taylor expanded in z around 0 98.3%
mul-1-neg98.3%
Simplified98.3%
Final simplification92.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 -6.2e+23) (not (<= y 1.9e-59)))
(- t_m (* t_m (/ x y)))
(/ t_m (/ (- z y) x)))))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+23) || !(y <= 1.9e-59)) {
tmp = t_m - (t_m * (x / y));
} else {
tmp = t_m / ((z - y) / x);
}
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+23)) .or. (.not. (y <= 1.9d-59))) then
tmp = t_m - (t_m * (x / y))
else
tmp = t_m / ((z - y) / x)
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+23) || !(y <= 1.9e-59)) {
tmp = t_m - (t_m * (x / y));
} else {
tmp = t_m / ((z - y) / x);
}
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+23) or not (y <= 1.9e-59): tmp = t_m - (t_m * (x / y)) else: tmp = t_m / ((z - y) / x) 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+23) || !(y <= 1.9e-59)) tmp = Float64(t_m - Float64(t_m * Float64(x / y))); else tmp = Float64(t_m / Float64(Float64(z - y) / x)); 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+23) || ~((y <= 1.9e-59))) tmp = t_m - (t_m * (x / y)); else tmp = t_m / ((z - y) / x); 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.2e+23], N[Not[LessEqual[y, 1.9e-59]], $MachinePrecision]], N[(t$95$m - N[(t$95$m * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m / N[(N[(z - y), $MachinePrecision] / x), $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^{+23} \lor \neg \left(y \leq 1.9 \cdot 10^{-59}\right):\\
\;\;\;\;t\_m - t\_m \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m}{\frac{z - y}{x}}\\
\end{array}
\end{array}
if y < -6.19999999999999941e23 or 1.89999999999999992e-59 < y Initial program 99.8%
associate-*l/80.2%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in z around 0 60.9%
associate-*r/60.9%
neg-mul-160.9%
Simplified60.9%
Taylor expanded in x around 0 71.2%
mul-1-neg71.2%
unsub-neg71.2%
associate-/l*78.2%
Simplified78.2%
if -6.19999999999999941e23 < y < 1.89999999999999992e-59Initial program 93.2%
associate-*l/91.6%
associate-/l*94.2%
Simplified94.2%
associate-*r/91.6%
associate-*l/93.2%
*-commutative93.2%
clear-num92.5%
un-div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in x around inf 77.5%
Final simplification77.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
(if (or (<= y -4100000000000.0) (not (<= y 1.4e-62)))
(- t_m (* t_m (/ 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 <= -4100000000000.0) || !(y <= 1.4e-62)) {
tmp = t_m - (t_m * (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 <= (-4100000000000.0d0)) .or. (.not. (y <= 1.4d-62))) then
tmp = t_m - (t_m * (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 <= -4100000000000.0) || !(y <= 1.4e-62)) {
tmp = t_m - (t_m * (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 <= -4100000000000.0) or not (y <= 1.4e-62): tmp = t_m - (t_m * (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 <= -4100000000000.0) || !(y <= 1.4e-62)) tmp = Float64(t_m - Float64(t_m * 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 <= -4100000000000.0) || ~((y <= 1.4e-62))) tmp = t_m - (t_m * (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, -4100000000000.0], N[Not[LessEqual[y, 1.4e-62]], $MachinePrecision]], N[(t$95$m - N[(t$95$m * 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 -4100000000000 \lor \neg \left(y \leq 1.4 \cdot 10^{-62}\right):\\
\;\;\;\;t\_m - t\_m \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -4.1e12 or 1.40000000000000001e-62 < y Initial program 99.8%
associate-*l/80.2%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in z around 0 60.9%
associate-*r/60.9%
neg-mul-160.9%
Simplified60.9%
Taylor expanded in x around 0 71.2%
mul-1-neg71.2%
unsub-neg71.2%
associate-/l*78.2%
Simplified78.2%
if -4.1e12 < y < 1.40000000000000001e-62Initial program 93.2%
Taylor expanded in x around inf 77.4%
Final simplification77.8%
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 -9.6e+18) (not (<= y 1.35e-58)))
(* t_m (/ (- y 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 <= -9.6e+18) || !(y <= 1.35e-58)) {
tmp = t_m * ((y - 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 <= (-9.6d+18)) .or. (.not. (y <= 1.35d-58))) then
tmp = t_m * ((y - 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 <= -9.6e+18) || !(y <= 1.35e-58)) {
tmp = t_m * ((y - 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 <= -9.6e+18) or not (y <= 1.35e-58): tmp = t_m * ((y - 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 <= -9.6e+18) || !(y <= 1.35e-58)) tmp = Float64(t_m * Float64(Float64(y - 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 <= -9.6e+18) || ~((y <= 1.35e-58))) tmp = t_m * ((y - 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, -9.6e+18], N[Not[LessEqual[y, 1.35e-58]], $MachinePrecision]], N[(t$95$m * N[(N[(y - x), $MachinePrecision] / y), $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 -9.6 \cdot 10^{+18} \lor \neg \left(y \leq 1.35 \cdot 10^{-58}\right):\\
\;\;\;\;t\_m \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -9.6e18 or 1.3499999999999999e-58 < y Initial program 99.8%
Taylor expanded in z around 0 78.2%
mul-1-neg78.2%
Simplified78.2%
Taylor expanded in y around 0 61.7%
mul-1-neg61.7%
distribute-rgt-neg-in61.7%
distribute-lft-in62.6%
associate-/l*78.2%
+-commutative78.2%
unsub-neg78.2%
Simplified78.2%
if -9.6e18 < y < 1.3499999999999999e-58Initial program 93.2%
Taylor expanded in x around inf 77.4%
Final simplification77.8%
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 -1.85e+38) (not (<= y 2.4e-63)))
(* t_m (/ (- y x) y))
(* (- x y) (/ t_m z)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if ((y <= -1.85e+38) || !(y <= 2.4e-63)) {
tmp = t_m * ((y - x) / y);
} else {
tmp = (x - y) * (t_m / z);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if ((y <= (-1.85d+38)) .or. (.not. (y <= 2.4d-63))) then
tmp = t_m * ((y - x) / y)
else
tmp = (x - y) * (t_m / z)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
double tmp;
if ((y <= -1.85e+38) || !(y <= 2.4e-63)) {
tmp = t_m * ((y - x) / y);
} else {
tmp = (x - y) * (t_m / z);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, y, z, t_m): tmp = 0 if (y <= -1.85e+38) or not (y <= 2.4e-63): tmp = t_m * ((y - x) / y) else: tmp = (x - y) * (t_m / z) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, y, z, t_m) tmp = 0.0 if ((y <= -1.85e+38) || !(y <= 2.4e-63)) tmp = Float64(t_m * Float64(Float64(y - x) / y)); else tmp = Float64(Float64(x - y) * Float64(t_m / z)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, y, z, t_m) tmp = 0.0; if ((y <= -1.85e+38) || ~((y <= 2.4e-63))) tmp = t_m * ((y - x) / y); else tmp = (x - y) * (t_m / z); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[Or[LessEqual[y, -1.85e+38], N[Not[LessEqual[y, 2.4e-63]], $MachinePrecision]], N[(t$95$m * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+38} \lor \neg \left(y \leq 2.4 \cdot 10^{-63}\right):\\
\;\;\;\;t\_m \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\
\end{array}
\end{array}
if y < -1.8500000000000001e38 or 2.4000000000000001e-63 < y Initial program 99.8%
Taylor expanded in z around 0 78.7%
mul-1-neg78.7%
Simplified78.7%
Taylor expanded in y around 0 62.1%
mul-1-neg62.1%
distribute-rgt-neg-in62.1%
distribute-lft-in63.0%
associate-/l*78.7%
+-commutative78.7%
unsub-neg78.7%
Simplified78.7%
if -1.8500000000000001e38 < y < 2.4000000000000001e-63Initial program 93.2%
associate-*l/91.7%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in z around inf 73.2%
*-commutative73.2%
associate-/l*75.7%
Simplified75.7%
Final simplification77.3%
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 -1.9e-70) (not (<= y 1.02e-58)))
(* t_m (/ (- y x) y))
(* 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 tmp;
if ((y <= -1.9e-70) || !(y <= 1.02e-58)) {
tmp = t_m * ((y - x) / y);
} 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) :: tmp
if ((y <= (-1.9d-70)) .or. (.not. (y <= 1.02d-58))) then
tmp = t_m * ((y - x) / y)
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 tmp;
if ((y <= -1.9e-70) || !(y <= 1.02e-58)) {
tmp = t_m * ((y - x) / y);
} 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): tmp = 0 if (y <= -1.9e-70) or not (y <= 1.02e-58): tmp = t_m * ((y - x) / y) 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) tmp = 0.0 if ((y <= -1.9e-70) || !(y <= 1.02e-58)) tmp = Float64(t_m * Float64(Float64(y - x) / y)); 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) tmp = 0.0; if ((y <= -1.9e-70) || ~((y <= 1.02e-58))) tmp = t_m * ((y - x) / y); 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_] := N[(t$95$s * If[Or[LessEqual[y, -1.9e-70], N[Not[LessEqual[y, 1.02e-58]], $MachinePrecision]], N[(t$95$m * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-70} \lor \neg \left(y \leq 1.02 \cdot 10^{-58}\right):\\
\;\;\;\;t\_m \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -1.8999999999999999e-70 or 1.0199999999999999e-58 < y Initial program 99.8%
Taylor expanded in z around 0 74.0%
mul-1-neg74.0%
Simplified74.0%
Taylor expanded in y around 0 59.5%
mul-1-neg59.5%
distribute-rgt-neg-in59.5%
distribute-lft-in60.3%
associate-/l*74.0%
+-commutative74.0%
unsub-neg74.0%
Simplified74.0%
if -1.8999999999999999e-70 < y < 1.0199999999999999e-58Initial program 91.9%
Taylor expanded in y around 0 72.4%
Final simplification73.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 -4e+20)
(- t_m (* t_m (/ x y)))
(if (<= y 1.75e-58) (/ t_m (/ (- z y) x)) (* t_m (/ (- 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 (y <= -4e+20) {
tmp = t_m - (t_m * (x / y));
} else if (y <= 1.75e-58) {
tmp = t_m / ((z - y) / x);
} else {
tmp = t_m * ((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 (y <= (-4d+20)) then
tmp = t_m - (t_m * (x / y))
else if (y <= 1.75d-58) then
tmp = t_m / ((z - y) / x)
else
tmp = t_m * ((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 (y <= -4e+20) {
tmp = t_m - (t_m * (x / y));
} else if (y <= 1.75e-58) {
tmp = t_m / ((z - y) / x);
} else {
tmp = t_m * ((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 y <= -4e+20: tmp = t_m - (t_m * (x / y)) elif y <= 1.75e-58: tmp = t_m / ((z - y) / x) else: tmp = t_m * ((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 (y <= -4e+20) tmp = Float64(t_m - Float64(t_m * Float64(x / y))); elseif (y <= 1.75e-58) tmp = Float64(t_m / Float64(Float64(z - y) / x)); else tmp = Float64(t_m * Float64(Float64(y - 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 <= -4e+20) tmp = t_m - (t_m * (x / y)); elseif (y <= 1.75e-58) tmp = t_m / ((z - y) / x); else tmp = t_m * ((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[y, -4e+20], N[(t$95$m - N[(t$95$m * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-58], N[(t$95$m / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+20}:\\
\;\;\;\;t\_m - t\_m \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-58}:\\
\;\;\;\;\frac{t\_m}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_m \cdot \frac{y - x}{y}\\
\end{array}
\end{array}
if y < -4e20Initial program 99.8%
associate-*l/83.6%
associate-/l*75.1%
Simplified75.1%
Taylor expanded in z around 0 58.0%
associate-*r/58.0%
neg-mul-158.0%
Simplified58.0%
Taylor expanded in x around 0 75.1%
mul-1-neg75.1%
unsub-neg75.1%
associate-/l*78.3%
Simplified78.3%
if -4e20 < y < 1.75e-58Initial program 93.2%
associate-*l/91.6%
associate-/l*94.2%
Simplified94.2%
associate-*r/91.6%
associate-*l/93.2%
*-commutative93.2%
clear-num92.5%
un-div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in x around inf 77.5%
if 1.75e-58 < y Initial program 99.9%
Taylor expanded in z around 0 78.1%
mul-1-neg78.1%
Simplified78.1%
Final simplification77.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 (if (<= y -66000000000000.0) t_m (if (<= y 1.85e-59) (* 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 <= -66000000000000.0) {
tmp = t_m;
} else if (y <= 1.85e-59) {
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 <= (-66000000000000.0d0)) then
tmp = t_m
else if (y <= 1.85d-59) 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 <= -66000000000000.0) {
tmp = t_m;
} else if (y <= 1.85e-59) {
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 <= -66000000000000.0: tmp = t_m elif y <= 1.85e-59: 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 <= -66000000000000.0) tmp = t_m; elseif (y <= 1.85e-59) 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 <= -66000000000000.0) tmp = t_m; elseif (y <= 1.85e-59) 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, -66000000000000.0], t$95$m, If[LessEqual[y, 1.85e-59], 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 -66000000000000:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-59}:\\
\;\;\;\;t\_m \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -6.6e13 or 1.85e-59 < y Initial program 99.8%
associate-*l/80.2%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in y around inf 59.2%
if -6.6e13 < y < 1.85e-59Initial program 93.2%
Taylor expanded in y around 0 67.4%
Final simplification63.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 (<= y -10500000000000.0) t_m (if (<= y 1.75e-58) (* 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 <= -10500000000000.0) {
tmp = t_m;
} else if (y <= 1.75e-58) {
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 <= (-10500000000000.0d0)) then
tmp = t_m
else if (y <= 1.75d-58) 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 <= -10500000000000.0) {
tmp = t_m;
} else if (y <= 1.75e-58) {
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 <= -10500000000000.0: tmp = t_m elif y <= 1.75e-58: 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 <= -10500000000000.0) tmp = t_m; elseif (y <= 1.75e-58) 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 <= -10500000000000.0) tmp = t_m; elseif (y <= 1.75e-58) 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, -10500000000000.0], t$95$m, If[LessEqual[y, 1.75e-58], 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 -10500000000000:\\
\;\;\;\;t\_m\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \frac{t\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_m\\
\end{array}
\end{array}
if y < -1.05e13 or 1.75e-58 < y Initial program 99.8%
associate-*l/80.2%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in y around inf 59.2%
if -1.05e13 < y < 1.75e-58Initial program 93.2%
associate-*l/91.6%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in y around 0 62.8%
*-commutative62.8%
associate-/l*65.3%
Simplified65.3%
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 96.8%
associate-*l/85.5%
associate-/l*85.9%
Simplified85.9%
associate-*r/85.5%
associate-*l/96.8%
*-commutative96.8%
clear-num96.5%
un-div-inv96.8%
Applied egg-rr96.8%
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 96.8%
Final simplification96.8%
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 96.8%
associate-*l/85.5%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in y around inf 36.7%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024103
(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))