
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (<= v_m 5e+124)
(* (/ t1 (* t1 (- -1.0 (/ u t1)))) (/ v_m (+ t1 u)))
(/ (* v_m (/ t1 (- (- t1) u))) (+ t1 u)))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if (v_m <= 5e+124) {
tmp = (t1 / (t1 * (-1.0 - (u / t1)))) * (v_m / (t1 + u));
} else {
tmp = (v_m * (t1 / (-t1 - u))) / (t1 + u);
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if (v_m <= 5d+124) then
tmp = (t1 / (t1 * ((-1.0d0) - (u / t1)))) * (v_m / (t1 + u))
else
tmp = (v_m * (t1 / (-t1 - u))) / (t1 + u)
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if (v_m <= 5e+124) {
tmp = (t1 / (t1 * (-1.0 - (u / t1)))) * (v_m / (t1 + u));
} else {
tmp = (v_m * (t1 / (-t1 - u))) / (t1 + u);
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if v_m <= 5e+124: tmp = (t1 / (t1 * (-1.0 - (u / t1)))) * (v_m / (t1 + u)) else: tmp = (v_m * (t1 / (-t1 - u))) / (t1 + u) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if (v_m <= 5e+124) tmp = Float64(Float64(t1 / Float64(t1 * Float64(-1.0 - Float64(u / t1)))) * Float64(v_m / Float64(t1 + u))); else tmp = Float64(Float64(v_m * Float64(t1 / Float64(Float64(-t1) - u))) / Float64(t1 + u)); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if (v_m <= 5e+124) tmp = (t1 / (t1 * (-1.0 - (u / t1)))) * (v_m / (t1 + u)); else tmp = (v_m * (t1 / (-t1 - u))) / (t1 + u); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[LessEqual[v$95$m, 5e+124], N[(N[(t1 / N[(t1 * N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(v$95$m / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v$95$m * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;v\_m \leq 5 \cdot 10^{+124}:\\
\;\;\;\;\frac{t1}{t1 \cdot \left(-1 - \frac{u}{t1}\right)} \cdot \frac{v\_m}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m \cdot \frac{t1}{\left(-t1\right) - u}}{t1 + u}\\
\end{array}
\end{array}
if v < 4.9999999999999996e124Initial program 77.6%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around -inf 97.3%
associate-*r*97.3%
mul-1-neg97.3%
Simplified97.3%
if 4.9999999999999996e124 < v Initial program 61.0%
associate-*l/71.6%
*-commutative71.6%
Simplified71.6%
associate-*r/61.0%
*-commutative61.0%
times-frac95.5%
frac-2neg95.5%
+-commutative95.5%
distribute-neg-in95.5%
sub-neg95.5%
associate-*r/99.7%
add-sqr-sqrt53.2%
sqrt-unprod31.4%
sqr-neg31.4%
sqrt-unprod9.7%
add-sqr-sqrt12.8%
sub-neg12.8%
+-commutative12.8%
add-sqr-sqrt3.0%
sqrt-unprod29.7%
sqr-neg29.7%
sqrt-unprod28.5%
add-sqr-sqrt9.4%
sqrt-unprod37.3%
sqr-neg37.3%
Applied egg-rr99.7%
Final simplification97.7%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (or (<= t1 -1e-82) (not (<= t1 2.3e-113)))
(/ (* v_m (/ t1 (- (- t1) u))) t1)
(/ (- v_m) (* u (/ u t1))))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1e-82) || !(t1 <= 2.3e-113)) {
tmp = (v_m * (t1 / (-t1 - u))) / t1;
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1d-82)) .or. (.not. (t1 <= 2.3d-113))) then
tmp = (v_m * (t1 / (-t1 - u))) / t1
else
tmp = -v_m / (u * (u / t1))
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1e-82) || !(t1 <= 2.3e-113)) {
tmp = (v_m * (t1 / (-t1 - u))) / t1;
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (t1 <= -1e-82) or not (t1 <= 2.3e-113): tmp = (v_m * (t1 / (-t1 - u))) / t1 else: tmp = -v_m / (u * (u / t1)) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((t1 <= -1e-82) || !(t1 <= 2.3e-113)) tmp = Float64(Float64(v_m * Float64(t1 / Float64(Float64(-t1) - u))) / t1); else tmp = Float64(Float64(-v_m) / Float64(u * Float64(u / t1))); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((t1 <= -1e-82) || ~((t1 <= 2.3e-113))) tmp = (v_m * (t1 / (-t1 - u))) / t1; else tmp = -v_m / (u * (u / t1)); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[t1, -1e-82], N[Not[LessEqual[t1, 2.3e-113]], $MachinePrecision]], N[(N[(v$95$m * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[((-v$95$m) / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -1 \cdot 10^{-82} \lor \neg \left(t1 \leq 2.3 \cdot 10^{-113}\right):\\
\;\;\;\;\frac{v\_m \cdot \frac{t1}{\left(-t1\right) - u}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v\_m}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -1e-82 or 2.30000000000000008e-113 < t1 Initial program 67.7%
associate-*l/75.9%
*-commutative75.9%
Simplified75.9%
associate-*r/67.7%
*-commutative67.7%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt48.0%
sqrt-unprod35.6%
sqr-neg35.6%
sqrt-unprod15.3%
add-sqr-sqrt36.0%
sub-neg36.0%
+-commutative36.0%
add-sqr-sqrt20.7%
sqrt-unprod54.0%
sqr-neg54.0%
sqrt-unprod41.8%
add-sqr-sqrt15.8%
sqrt-unprod43.5%
sqr-neg43.5%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 80.9%
if -1e-82 < t1 < 2.30000000000000008e-113Initial program 84.1%
times-frac93.1%
distribute-frac-neg93.1%
distribute-neg-frac293.1%
+-commutative93.1%
distribute-neg-in93.1%
unsub-neg93.1%
Simplified93.1%
Taylor expanded in t1 around 0 80.7%
Taylor expanded in t1 around 0 82.6%
associate-*r/82.6%
mul-1-neg82.6%
Simplified82.6%
clear-num82.6%
frac-2neg82.6%
frac-times86.0%
*-un-lft-identity86.0%
add-sqr-sqrt41.9%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod22.6%
add-sqr-sqrt41.1%
add-sqr-sqrt18.8%
sqrt-unprod46.2%
sqr-neg46.2%
sqrt-unprod43.3%
add-sqr-sqrt86.0%
Applied egg-rr86.0%
Final simplification83.1%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (or (<= t1 -1.2e-82) (not (<= t1 2.1e-106)))
(* (/ t1 (- (- t1) u)) (/ v_m t1))
(/ (- v_m) (* u (/ u t1))))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.2e-82) || !(t1 <= 2.1e-106)) {
tmp = (t1 / (-t1 - u)) * (v_m / t1);
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.2d-82)) .or. (.not. (t1 <= 2.1d-106))) then
tmp = (t1 / (-t1 - u)) * (v_m / t1)
else
tmp = -v_m / (u * (u / t1))
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.2e-82) || !(t1 <= 2.1e-106)) {
tmp = (t1 / (-t1 - u)) * (v_m / t1);
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (t1 <= -1.2e-82) or not (t1 <= 2.1e-106): tmp = (t1 / (-t1 - u)) * (v_m / t1) else: tmp = -v_m / (u * (u / t1)) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((t1 <= -1.2e-82) || !(t1 <= 2.1e-106)) tmp = Float64(Float64(t1 / Float64(Float64(-t1) - u)) * Float64(v_m / t1)); else tmp = Float64(Float64(-v_m) / Float64(u * Float64(u / t1))); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((t1 <= -1.2e-82) || ~((t1 <= 2.1e-106))) tmp = (t1 / (-t1 - u)) * (v_m / t1); else tmp = -v_m / (u * (u / t1)); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[t1, -1.2e-82], N[Not[LessEqual[t1, 2.1e-106]], $MachinePrecision]], N[(N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision] * N[(v$95$m / t1), $MachinePrecision]), $MachinePrecision], N[((-v$95$m) / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -1.2 \cdot 10^{-82} \lor \neg \left(t1 \leq 2.1 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{t1}{\left(-t1\right) - u} \cdot \frac{v\_m}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v\_m}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -1.20000000000000004e-82 or 2.10000000000000003e-106 < t1 Initial program 67.9%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 80.1%
if -1.20000000000000004e-82 < t1 < 2.10000000000000003e-106Initial program 83.5%
times-frac93.3%
distribute-frac-neg93.3%
distribute-neg-frac293.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in t1 around 0 80.2%
Taylor expanded in t1 around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
Simplified82.1%
clear-num82.1%
frac-2neg82.1%
frac-times85.5%
*-un-lft-identity85.5%
add-sqr-sqrt41.2%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod23.1%
add-sqr-sqrt41.3%
add-sqr-sqrt18.5%
sqrt-unprod46.3%
sqr-neg46.3%
sqrt-unprod43.5%
add-sqr-sqrt85.5%
Applied egg-rr85.5%
Final simplification82.5%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (or (<= t1 -3.2e-78) (not (<= t1 2.8e-106)))
(/ v_m (- (- t1) (* u 2.0)))
(/ (- v_m) (* u (/ u t1))))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -3.2e-78) || !(t1 <= 2.8e-106)) {
tmp = v_m / (-t1 - (u * 2.0));
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.2d-78)) .or. (.not. (t1 <= 2.8d-106))) then
tmp = v_m / (-t1 - (u * 2.0d0))
else
tmp = -v_m / (u * (u / t1))
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -3.2e-78) || !(t1 <= 2.8e-106)) {
tmp = v_m / (-t1 - (u * 2.0));
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (t1 <= -3.2e-78) or not (t1 <= 2.8e-106): tmp = v_m / (-t1 - (u * 2.0)) else: tmp = -v_m / (u * (u / t1)) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((t1 <= -3.2e-78) || !(t1 <= 2.8e-106)) tmp = Float64(v_m / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(-v_m) / Float64(u * Float64(u / t1))); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((t1 <= -3.2e-78) || ~((t1 <= 2.8e-106))) tmp = v_m / (-t1 - (u * 2.0)); else tmp = -v_m / (u * (u / t1)); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[t1, -3.2e-78], N[Not[LessEqual[t1, 2.8e-106]], $MachinePrecision]], N[(v$95$m / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v$95$m) / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -3.2 \cdot 10^{-78} \lor \neg \left(t1 \leq 2.8 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{v\_m}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v\_m}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -3.2e-78 or 2.79999999999999988e-106 < t1 Initial program 67.9%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
associate-*r/67.9%
*-commutative67.9%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt48.7%
sqrt-unprod35.4%
sqr-neg35.4%
sqrt-unprod14.8%
add-sqr-sqrt35.8%
sub-neg35.8%
+-commutative35.8%
add-sqr-sqrt21.0%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-unprod41.0%
add-sqr-sqrt15.3%
sqrt-unprod42.7%
sqr-neg42.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 99.9%
Taylor expanded in v around 0 95.9%
associate-*r/95.9%
mul-1-neg95.9%
Simplified95.9%
Taylor expanded in u around 0 79.1%
*-commutative79.1%
Simplified79.1%
if -3.2e-78 < t1 < 2.79999999999999988e-106Initial program 83.5%
times-frac93.3%
distribute-frac-neg93.3%
distribute-neg-frac293.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in t1 around 0 80.2%
Taylor expanded in t1 around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
Simplified82.1%
clear-num82.1%
frac-2neg82.1%
frac-times85.5%
*-un-lft-identity85.5%
add-sqr-sqrt41.2%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod23.1%
add-sqr-sqrt41.3%
add-sqr-sqrt18.5%
sqrt-unprod46.3%
sqr-neg46.3%
sqrt-unprod43.5%
add-sqr-sqrt85.5%
Applied egg-rr85.5%
Final simplification81.9%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (or (<= t1 -1.5e-78) (not (<= t1 2.2e-106)))
(/ v_m (- (- t1) u))
(/ (- v_m) (* u (/ u t1))))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.5e-78) || !(t1 <= 2.2e-106)) {
tmp = v_m / (-t1 - u);
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.5d-78)) .or. (.not. (t1 <= 2.2d-106))) then
tmp = v_m / (-t1 - u)
else
tmp = -v_m / (u * (u / t1))
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.5e-78) || !(t1 <= 2.2e-106)) {
tmp = v_m / (-t1 - u);
} else {
tmp = -v_m / (u * (u / t1));
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (t1 <= -1.5e-78) or not (t1 <= 2.2e-106): tmp = v_m / (-t1 - u) else: tmp = -v_m / (u * (u / t1)) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((t1 <= -1.5e-78) || !(t1 <= 2.2e-106)) tmp = Float64(v_m / Float64(Float64(-t1) - u)); else tmp = Float64(Float64(-v_m) / Float64(u * Float64(u / t1))); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((t1 <= -1.5e-78) || ~((t1 <= 2.2e-106))) tmp = v_m / (-t1 - u); else tmp = -v_m / (u * (u / t1)); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[t1, -1.5e-78], N[Not[LessEqual[t1, 2.2e-106]], $MachinePrecision]], N[(v$95$m / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[((-v$95$m) / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -1.5 \cdot 10^{-78} \lor \neg \left(t1 \leq 2.2 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{v\_m}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v\_m}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -1.49999999999999994e-78 or 2.19999999999999994e-106 < t1 Initial program 67.9%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
associate-*r/67.9%
*-commutative67.9%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt48.7%
sqrt-unprod35.4%
sqr-neg35.4%
sqrt-unprod14.8%
add-sqr-sqrt35.8%
sub-neg35.8%
+-commutative35.8%
add-sqr-sqrt21.0%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-unprod41.0%
add-sqr-sqrt15.3%
sqrt-unprod42.7%
sqr-neg42.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 78.8%
mul-1-neg78.8%
Simplified78.8%
if -1.49999999999999994e-78 < t1 < 2.19999999999999994e-106Initial program 83.5%
times-frac93.3%
distribute-frac-neg93.3%
distribute-neg-frac293.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in t1 around 0 80.2%
Taylor expanded in t1 around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
Simplified82.1%
clear-num82.1%
frac-2neg82.1%
frac-times85.5%
*-un-lft-identity85.5%
add-sqr-sqrt41.2%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod23.1%
add-sqr-sqrt41.3%
add-sqr-sqrt18.5%
sqrt-unprod46.3%
sqr-neg46.3%
sqrt-unprod43.5%
add-sqr-sqrt85.5%
Applied egg-rr85.5%
Final simplification81.7%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (or (<= t1 -1.25e-78) (not (<= t1 2.8e-106)))
(/ v_m (- (- t1) u))
(* (/ t1 (- u)) (/ v_m u)))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.25e-78) || !(t1 <= 2.8e-106)) {
tmp = v_m / (-t1 - u);
} else {
tmp = (t1 / -u) * (v_m / u);
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.25d-78)) .or. (.not. (t1 <= 2.8d-106))) then
tmp = v_m / (-t1 - u)
else
tmp = (t1 / -u) * (v_m / u)
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.25e-78) || !(t1 <= 2.8e-106)) {
tmp = v_m / (-t1 - u);
} else {
tmp = (t1 / -u) * (v_m / u);
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (t1 <= -1.25e-78) or not (t1 <= 2.8e-106): tmp = v_m / (-t1 - u) else: tmp = (t1 / -u) * (v_m / u) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((t1 <= -1.25e-78) || !(t1 <= 2.8e-106)) tmp = Float64(v_m / Float64(Float64(-t1) - u)); else tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v_m / u)); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((t1 <= -1.25e-78) || ~((t1 <= 2.8e-106))) tmp = v_m / (-t1 - u); else tmp = (t1 / -u) * (v_m / u); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[t1, -1.25e-78], N[Not[LessEqual[t1, 2.8e-106]], $MachinePrecision]], N[(v$95$m / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v$95$m / u), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -1.25 \cdot 10^{-78} \lor \neg \left(t1 \leq 2.8 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{v\_m}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v\_m}{u}\\
\end{array}
\end{array}
if t1 < -1.2499999999999999e-78 or 2.79999999999999988e-106 < t1 Initial program 67.9%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
associate-*r/67.9%
*-commutative67.9%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt48.7%
sqrt-unprod35.4%
sqr-neg35.4%
sqrt-unprod14.8%
add-sqr-sqrt35.8%
sub-neg35.8%
+-commutative35.8%
add-sqr-sqrt21.0%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-unprod41.0%
add-sqr-sqrt15.3%
sqrt-unprod42.7%
sqr-neg42.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 78.8%
mul-1-neg78.8%
Simplified78.8%
if -1.2499999999999999e-78 < t1 < 2.79999999999999988e-106Initial program 83.5%
times-frac93.3%
distribute-frac-neg93.3%
distribute-neg-frac293.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in t1 around 0 80.2%
Taylor expanded in t1 around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
Simplified82.1%
Final simplification80.3%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (or (<= u -3.7e+25) (not (<= u 1.25e+131)))
(/ t1 (* u (/ u v_m)))
(/ v_m (- (- t1) u)))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((u <= -3.7e+25) || !(u <= 1.25e+131)) {
tmp = t1 / (u * (u / v_m));
} else {
tmp = v_m / (-t1 - u);
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.7d+25)) .or. (.not. (u <= 1.25d+131))) then
tmp = t1 / (u * (u / v_m))
else
tmp = v_m / (-t1 - u)
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((u <= -3.7e+25) || !(u <= 1.25e+131)) {
tmp = t1 / (u * (u / v_m));
} else {
tmp = v_m / (-t1 - u);
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (u <= -3.7e+25) or not (u <= 1.25e+131): tmp = t1 / (u * (u / v_m)) else: tmp = v_m / (-t1 - u) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((u <= -3.7e+25) || !(u <= 1.25e+131)) tmp = Float64(t1 / Float64(u * Float64(u / v_m))); else tmp = Float64(v_m / Float64(Float64(-t1) - u)); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((u <= -3.7e+25) || ~((u <= 1.25e+131))) tmp = t1 / (u * (u / v_m)); else tmp = v_m / (-t1 - u); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[u, -3.7e+25], N[Not[LessEqual[u, 1.25e+131]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v$95$m / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;u \leq -3.7 \cdot 10^{+25} \lor \neg \left(u \leq 1.25 \cdot 10^{+131}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{\left(-t1\right) - u}\\
\end{array}
\end{array}
if u < -3.6999999999999999e25 or 1.24999999999999999e131 < u Initial program 79.5%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in t1 around 0 88.1%
Taylor expanded in t1 around 0 88.1%
associate-*r/88.1%
mul-1-neg88.1%
Simplified88.1%
*-commutative88.1%
clear-num88.1%
frac-times85.4%
*-un-lft-identity85.4%
add-sqr-sqrt46.8%
sqrt-unprod65.2%
sqr-neg65.2%
sqrt-unprod31.0%
add-sqr-sqrt71.2%
Applied egg-rr71.2%
if -3.6999999999999999e25 < u < 1.24999999999999999e131Initial program 72.2%
associate-*l/82.1%
*-commutative82.1%
Simplified82.1%
associate-*r/72.2%
*-commutative72.2%
times-frac95.8%
frac-2neg95.8%
+-commutative95.8%
distribute-neg-in95.8%
sub-neg95.8%
associate-*r/96.8%
add-sqr-sqrt48.2%
sqrt-unprod31.3%
sqr-neg31.3%
sqrt-unprod11.4%
add-sqr-sqrt20.1%
sub-neg20.1%
+-commutative20.1%
add-sqr-sqrt8.7%
sqrt-unprod38.3%
sqr-neg38.3%
sqrt-unprod35.1%
add-sqr-sqrt11.8%
sqrt-unprod43.6%
sqr-neg43.6%
Applied egg-rr96.8%
Taylor expanded in t1 around inf 66.9%
mul-1-neg66.9%
Simplified66.9%
Final simplification68.4%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (<= u -3.7e+25)
(/ t1 (* u (/ u v_m)))
(if (<= u 1.2e+131) (/ v_m (- (- t1) u)) (/ (* v_m t1) (* u u))))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if (u <= -3.7e+25) {
tmp = t1 / (u * (u / v_m));
} else if (u <= 1.2e+131) {
tmp = v_m / (-t1 - u);
} else {
tmp = (v_m * t1) / (u * u);
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-3.7d+25)) then
tmp = t1 / (u * (u / v_m))
else if (u <= 1.2d+131) then
tmp = v_m / (-t1 - u)
else
tmp = (v_m * t1) / (u * u)
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if (u <= -3.7e+25) {
tmp = t1 / (u * (u / v_m));
} else if (u <= 1.2e+131) {
tmp = v_m / (-t1 - u);
} else {
tmp = (v_m * t1) / (u * u);
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if u <= -3.7e+25: tmp = t1 / (u * (u / v_m)) elif u <= 1.2e+131: tmp = v_m / (-t1 - u) else: tmp = (v_m * t1) / (u * u) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if (u <= -3.7e+25) tmp = Float64(t1 / Float64(u * Float64(u / v_m))); elseif (u <= 1.2e+131) tmp = Float64(v_m / Float64(Float64(-t1) - u)); else tmp = Float64(Float64(v_m * t1) / Float64(u * u)); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if (u <= -3.7e+25) tmp = t1 / (u * (u / v_m)); elseif (u <= 1.2e+131) tmp = v_m / (-t1 - u); else tmp = (v_m * t1) / (u * u); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[LessEqual[u, -3.7e+25], N[(t1 / N[(u * N[(u / v$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.2e+131], N[(v$95$m / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(N[(v$95$m * t1), $MachinePrecision] / N[(u * u), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;u \leq -3.7 \cdot 10^{+25}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v\_m}}\\
\mathbf{elif}\;u \leq 1.2 \cdot 10^{+131}:\\
\;\;\;\;\frac{v\_m}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m \cdot t1}{u \cdot u}\\
\end{array}
\end{array}
if u < -3.6999999999999999e25Initial program 81.6%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around 0 82.8%
Taylor expanded in t1 around 0 82.8%
associate-*r/82.8%
mul-1-neg82.8%
Simplified82.8%
*-commutative82.8%
clear-num82.8%
frac-times82.4%
*-un-lft-identity82.4%
add-sqr-sqrt42.9%
sqrt-unprod58.7%
sqr-neg58.7%
sqrt-unprod30.2%
add-sqr-sqrt65.4%
Applied egg-rr65.4%
if -3.6999999999999999e25 < u < 1.2e131Initial program 72.2%
associate-*l/82.1%
*-commutative82.1%
Simplified82.1%
associate-*r/72.2%
*-commutative72.2%
times-frac95.8%
frac-2neg95.8%
+-commutative95.8%
distribute-neg-in95.8%
sub-neg95.8%
associate-*r/96.8%
add-sqr-sqrt48.2%
sqrt-unprod31.3%
sqr-neg31.3%
sqrt-unprod11.4%
add-sqr-sqrt20.1%
sub-neg20.1%
+-commutative20.1%
add-sqr-sqrt8.7%
sqrt-unprod38.3%
sqr-neg38.3%
sqrt-unprod35.1%
add-sqr-sqrt11.8%
sqrt-unprod43.6%
sqr-neg43.6%
Applied egg-rr96.8%
Taylor expanded in t1 around inf 66.9%
mul-1-neg66.9%
Simplified66.9%
if 1.2e131 < u Initial program 77.3%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around 0 93.8%
Taylor expanded in t1 around 0 93.7%
associate-*r/93.7%
mul-1-neg93.7%
Simplified93.7%
frac-2neg93.7%
frac-times77.3%
remove-double-neg77.3%
Applied egg-rr77.3%
neg-sub077.3%
sub-neg77.3%
add-sqr-sqrt0.0%
sqrt-unprod77.3%
sqr-neg77.3%
sqrt-unprod77.3%
add-sqr-sqrt77.3%
Applied egg-rr77.3%
+-lft-identity77.3%
Simplified77.3%
Final simplification68.4%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(let* ((t_1 (/ t1 (- (- t1) u))))
(*
v_s
(if (<= v_m 1e+121) (* (/ v_m (+ t1 u)) t_1) (/ (* v_m t_1) (+ t1 u))))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double t_1 = t1 / (-t1 - u);
double tmp;
if (v_m <= 1e+121) {
tmp = (v_m / (t1 + u)) * t_1;
} else {
tmp = (v_m * t_1) / (t1 + u);
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = t1 / (-t1 - u)
if (v_m <= 1d+121) then
tmp = (v_m / (t1 + u)) * t_1
else
tmp = (v_m * t_1) / (t1 + u)
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double t_1 = t1 / (-t1 - u);
double tmp;
if (v_m <= 1e+121) {
tmp = (v_m / (t1 + u)) * t_1;
} else {
tmp = (v_m * t_1) / (t1 + u);
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): t_1 = t1 / (-t1 - u) tmp = 0 if v_m <= 1e+121: tmp = (v_m / (t1 + u)) * t_1 else: tmp = (v_m * t_1) / (t1 + u) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) t_1 = Float64(t1 / Float64(Float64(-t1) - u)) tmp = 0.0 if (v_m <= 1e+121) tmp = Float64(Float64(v_m / Float64(t1 + u)) * t_1); else tmp = Float64(Float64(v_m * t_1) / Float64(t1 + u)); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) t_1 = t1 / (-t1 - u); tmp = 0.0; if (v_m <= 1e+121) tmp = (v_m / (t1 + u)) * t_1; else tmp = (v_m * t_1) / (t1 + u); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := Block[{t$95$1 = N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[v$95$m, 1e+121], N[(N[(v$95$m / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(v$95$m * t$95$1), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
\begin{array}{l}
t_1 := \frac{t1}{\left(-t1\right) - u}\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;v\_m \leq 10^{+121}:\\
\;\;\;\;\frac{v\_m}{t1 + u} \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m \cdot t\_1}{t1 + u}\\
\end{array}
\end{array}
\end{array}
if v < 1.00000000000000004e121Initial program 77.4%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
if 1.00000000000000004e121 < v Initial program 61.9%
associate-*l/72.2%
*-commutative72.2%
Simplified72.2%
associate-*r/61.9%
*-commutative61.9%
times-frac95.5%
frac-2neg95.5%
+-commutative95.5%
distribute-neg-in95.5%
sub-neg95.5%
associate-*r/99.7%
add-sqr-sqrt52.0%
sqrt-unprod30.8%
sqr-neg30.8%
sqrt-unprod9.6%
add-sqr-sqrt12.5%
sub-neg12.5%
+-commutative12.5%
add-sqr-sqrt3.0%
sqrt-unprod29.1%
sqr-neg29.1%
sqrt-unprod27.9%
add-sqr-sqrt9.1%
sqrt-unprod38.7%
sqr-neg38.7%
Applied egg-rr99.7%
Final simplification97.7%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (<= t1 -8e-125)
(* (/ v_m (+ t1 u)) (/ t1 (- (- t1) u)))
(/ v_m (* (+ t1 u) (- -1.0 (/ u t1)))))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if (t1 <= -8e-125) {
tmp = (v_m / (t1 + u)) * (t1 / (-t1 - u));
} else {
tmp = v_m / ((t1 + u) * (-1.0 - (u / t1)));
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-8d-125)) then
tmp = (v_m / (t1 + u)) * (t1 / (-t1 - u))
else
tmp = v_m / ((t1 + u) * ((-1.0d0) - (u / t1)))
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if (t1 <= -8e-125) {
tmp = (v_m / (t1 + u)) * (t1 / (-t1 - u));
} else {
tmp = v_m / ((t1 + u) * (-1.0 - (u / t1)));
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if t1 <= -8e-125: tmp = (v_m / (t1 + u)) * (t1 / (-t1 - u)) else: tmp = v_m / ((t1 + u) * (-1.0 - (u / t1))) return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if (t1 <= -8e-125) tmp = Float64(Float64(v_m / Float64(t1 + u)) * Float64(t1 / Float64(Float64(-t1) - u))); else tmp = Float64(v_m / Float64(Float64(t1 + u) * Float64(-1.0 - Float64(u / t1)))); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if (t1 <= -8e-125) tmp = (v_m / (t1 + u)) * (t1 / (-t1 - u)); else tmp = v_m / ((t1 + u) * (-1.0 - (u / t1))); end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[LessEqual[t1, -8e-125], N[(N[(v$95$m / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v$95$m / N[(N[(t1 + u), $MachinePrecision] * N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -8 \cdot 10^{-125}:\\
\;\;\;\;\frac{v\_m}{t1 + u} \cdot \frac{t1}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{\left(t1 + u\right) \cdot \left(-1 - \frac{u}{t1}\right)}\\
\end{array}
\end{array}
if t1 < -8.0000000000000001e-125Initial program 70.3%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
if -8.0000000000000001e-125 < t1 Initial program 76.8%
associate-*l/83.2%
*-commutative83.2%
Simplified83.2%
associate-*r/76.8%
*-commutative76.8%
times-frac95.7%
frac-2neg95.7%
+-commutative95.7%
distribute-neg-in95.7%
sub-neg95.7%
associate-*r/96.6%
add-sqr-sqrt27.7%
sqrt-unprod36.0%
sqr-neg36.0%
sqrt-unprod26.6%
add-sqr-sqrt36.6%
sub-neg36.6%
+-commutative36.6%
add-sqr-sqrt10.0%
sqrt-unprod53.5%
sqr-neg53.5%
sqrt-unprod51.1%
add-sqr-sqrt20.6%
sqrt-unprod57.2%
sqr-neg57.2%
Applied egg-rr96.6%
Taylor expanded in t1 around inf 96.6%
Taylor expanded in v around 0 98.4%
associate-*r/98.4%
mul-1-neg98.4%
Simplified98.4%
Taylor expanded in v around 0 98.4%
associate-/r*96.6%
+-commutative96.6%
associate-/r*98.4%
neg-mul-198.4%
distribute-neg-frac298.4%
*-commutative98.4%
distribute-rgt-neg-in98.4%
distribute-neg-in98.4%
metadata-eval98.4%
unsub-neg98.4%
Simplified98.4%
Final simplification98.8%
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
:precision binary64
(*
v_s
(if (or (<= u -1.3e+204) (not (<= u 3.6e+115)))
(/ (- v_m) u)
(/ v_m (- t1)))))v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((u <= -1.3e+204) || !(u <= 3.6e+115)) {
tmp = -v_m / u;
} else {
tmp = v_m / -t1;
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.3d+204)) .or. (.not. (u <= 3.6d+115))) then
tmp = -v_m / u
else
tmp = v_m / -t1
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((u <= -1.3e+204) || !(u <= 3.6e+115)) {
tmp = -v_m / u;
} else {
tmp = v_m / -t1;
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (u <= -1.3e+204) or not (u <= 3.6e+115): tmp = -v_m / u else: tmp = v_m / -t1 return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((u <= -1.3e+204) || !(u <= 3.6e+115)) tmp = Float64(Float64(-v_m) / u); else tmp = Float64(v_m / Float64(-t1)); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((u <= -1.3e+204) || ~((u <= 3.6e+115))) tmp = -v_m / u; else tmp = v_m / -t1; end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[u, -1.3e+204], N[Not[LessEqual[u, 3.6e+115]], $MachinePrecision]], N[((-v$95$m) / u), $MachinePrecision], N[(v$95$m / (-t1)), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{+204} \lor \neg \left(u \leq 3.6 \cdot 10^{+115}\right):\\
\;\;\;\;\frac{-v\_m}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\end{array}
\end{array}
if u < -1.3000000000000001e204 or 3.6000000000000001e115 < u Initial program 77.9%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around 0 94.4%
Taylor expanded in t1 around inf 43.3%
associate-*r/43.3%
mul-1-neg43.3%
Simplified43.3%
if -1.3000000000000001e204 < u < 3.6000000000000001e115Initial program 73.7%
associate-*l/81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in t1 around inf 62.5%
associate-*r/62.5%
neg-mul-162.5%
Simplified62.5%
Final simplification57.5%
v\_m = (fabs.f64 v) v\_s = (copysign.f64 #s(literal 1 binary64) v) (FPCore (v_s u v_m t1) :precision binary64 (* v_s (if (or (<= u -1.3e+204) (not (<= u 1.05e+117))) (/ v_m u) (/ v_m (- t1)))))
v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((u <= -1.3e+204) || !(u <= 1.05e+117)) {
tmp = v_m / u;
} else {
tmp = v_m / -t1;
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.3d+204)) .or. (.not. (u <= 1.05d+117))) then
tmp = v_m / u
else
tmp = v_m / -t1
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((u <= -1.3e+204) || !(u <= 1.05e+117)) {
tmp = v_m / u;
} else {
tmp = v_m / -t1;
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (u <= -1.3e+204) or not (u <= 1.05e+117): tmp = v_m / u else: tmp = v_m / -t1 return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((u <= -1.3e+204) || !(u <= 1.05e+117)) tmp = Float64(v_m / u); else tmp = Float64(v_m / Float64(-t1)); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((u <= -1.3e+204) || ~((u <= 1.05e+117))) tmp = v_m / u; else tmp = v_m / -t1; end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[u, -1.3e+204], N[Not[LessEqual[u, 1.05e+117]], $MachinePrecision]], N[(v$95$m / u), $MachinePrecision], N[(v$95$m / (-t1)), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{+204} \lor \neg \left(u \leq 1.05 \cdot 10^{+117}\right):\\
\;\;\;\;\frac{v\_m}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\end{array}
\end{array}
if u < -1.3000000000000001e204 or 1.0500000000000001e117 < u Initial program 77.9%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around 0 94.4%
Taylor expanded in t1 around inf 43.3%
associate-*r/43.3%
mul-1-neg43.3%
Simplified43.3%
add-sqr-sqrt26.8%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod16.2%
add-sqr-sqrt43.0%
div-inv43.0%
Applied egg-rr43.0%
associate-*r/43.0%
*-rgt-identity43.0%
Simplified43.0%
if -1.3000000000000001e204 < u < 1.0500000000000001e117Initial program 73.7%
associate-*l/81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in t1 around inf 62.5%
associate-*r/62.5%
neg-mul-162.5%
Simplified62.5%
Final simplification57.4%
v\_m = (fabs.f64 v) v\_s = (copysign.f64 #s(literal 1 binary64) v) (FPCore (v_s u v_m t1) :precision binary64 (* v_s (if (or (<= t1 -1.06e+170) (not (<= t1 7.8e+87))) (/ v_m t1) (/ v_m u))))
v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.06e+170) || !(t1 <= 7.8e+87)) {
tmp = v_m / t1;
} else {
tmp = v_m / u;
}
return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.06d+170)) .or. (.not. (t1 <= 7.8d+87))) then
tmp = v_m / t1
else
tmp = v_m / u
end if
code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
double tmp;
if ((t1 <= -1.06e+170) || !(t1 <= 7.8e+87)) {
tmp = v_m / t1;
} else {
tmp = v_m / u;
}
return v_s * tmp;
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): tmp = 0 if (t1 <= -1.06e+170) or not (t1 <= 7.8e+87): tmp = v_m / t1 else: tmp = v_m / u return v_s * tmp
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) tmp = 0.0 if ((t1 <= -1.06e+170) || !(t1 <= 7.8e+87)) tmp = Float64(v_m / t1); else tmp = Float64(v_m / u); end return Float64(v_s * tmp) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp_2 = code(v_s, u, v_m, t1) tmp = 0.0; if ((t1 <= -1.06e+170) || ~((t1 <= 7.8e+87))) tmp = v_m / t1; else tmp = v_m / u; end tmp_2 = v_s * tmp; end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[Or[LessEqual[t1, -1.06e+170], N[Not[LessEqual[t1, 7.8e+87]], $MachinePrecision]], N[(v$95$m / t1), $MachinePrecision], N[(v$95$m / u), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -1.06 \cdot 10^{+170} \lor \neg \left(t1 \leq 7.8 \cdot 10^{+87}\right):\\
\;\;\;\;\frac{v\_m}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{u}\\
\end{array}
\end{array}
if t1 < -1.05999999999999998e170 or 7.80000000000000039e87 < t1 Initial program 46.4%
associate-*l/52.3%
*-commutative52.3%
Simplified52.3%
Taylor expanded in t1 around inf 89.7%
associate-*r/89.7%
neg-mul-189.7%
Simplified89.7%
div-inv89.5%
add-sqr-sqrt42.4%
sqrt-unprod50.6%
sqr-neg50.6%
sqrt-unprod17.2%
add-sqr-sqrt39.8%
Applied egg-rr39.8%
associate-*r/39.8%
*-rgt-identity39.8%
Simplified39.8%
if -1.05999999999999998e170 < t1 < 7.80000000000000039e87Initial program 83.9%
times-frac96.0%
distribute-frac-neg96.0%
distribute-neg-frac296.0%
+-commutative96.0%
distribute-neg-in96.0%
unsub-neg96.0%
Simplified96.0%
Taylor expanded in t1 around 0 65.6%
Taylor expanded in t1 around inf 21.1%
associate-*r/21.1%
mul-1-neg21.1%
Simplified21.1%
add-sqr-sqrt12.2%
sqrt-unprod24.1%
sqr-neg24.1%
sqrt-unprod7.1%
add-sqr-sqrt18.1%
div-inv18.1%
Applied egg-rr18.1%
associate-*r/18.1%
*-rgt-identity18.1%
Simplified18.1%
Final simplification23.3%
v\_m = (fabs.f64 v) v\_s = (copysign.f64 #s(literal 1 binary64) v) (FPCore (v_s u v_m t1) :precision binary64 (* v_s (/ v_m (* (+ t1 u) (- -1.0 (/ u t1))))))
v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
return v_s * (v_m / ((t1 + u) * (-1.0 - (u / t1))));
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
code = v_s * (v_m / ((t1 + u) * ((-1.0d0) - (u / t1))))
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
return v_s * (v_m / ((t1 + u) * (-1.0 - (u / t1))));
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): return v_s * (v_m / ((t1 + u) * (-1.0 - (u / t1))))
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) return Float64(v_s * Float64(v_m / Float64(Float64(t1 + u) * Float64(-1.0 - Float64(u / t1))))) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp = code(v_s, u, v_m, t1) tmp = v_s * (v_m / ((t1 + u) * (-1.0 - (u / t1)))); end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * N[(v$95$m / N[(N[(t1 + u), $MachinePrecision] * N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \frac{v\_m}{\left(t1 + u\right) \cdot \left(-1 - \frac{u}{t1}\right)}
\end{array}
Initial program 74.8%
associate-*l/80.8%
*-commutative80.8%
Simplified80.8%
associate-*r/74.8%
*-commutative74.8%
times-frac97.0%
frac-2neg97.0%
+-commutative97.0%
distribute-neg-in97.0%
sub-neg97.0%
associate-*r/97.6%
add-sqr-sqrt49.9%
sqrt-unprod43.8%
sqr-neg43.8%
sqrt-unprod18.4%
add-sqr-sqrt38.3%
sub-neg38.3%
+-commutative38.3%
add-sqr-sqrt19.9%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod35.4%
add-sqr-sqrt14.2%
sqrt-unprod39.5%
sqr-neg39.5%
Applied egg-rr97.6%
Taylor expanded in t1 around inf 97.6%
Taylor expanded in v around 0 96.2%
associate-*r/96.2%
mul-1-neg96.2%
Simplified96.2%
Taylor expanded in v around 0 96.2%
associate-/r*97.7%
+-commutative97.7%
associate-/r*96.2%
neg-mul-196.2%
distribute-neg-frac296.2%
*-commutative96.2%
distribute-rgt-neg-in96.2%
distribute-neg-in96.2%
metadata-eval96.2%
unsub-neg96.2%
Simplified96.2%
Final simplification96.2%
v\_m = (fabs.f64 v) v\_s = (copysign.f64 #s(literal 1 binary64) v) (FPCore (v_s u v_m t1) :precision binary64 (* v_s (/ v_m (- (- t1) u))))
v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
return v_s * (v_m / (-t1 - u));
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
code = v_s * (v_m / (-t1 - u))
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
return v_s * (v_m / (-t1 - u));
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): return v_s * (v_m / (-t1 - u))
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) return Float64(v_s * Float64(v_m / Float64(Float64(-t1) - u))) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp = code(v_s, u, v_m, t1) tmp = v_s * (v_m / (-t1 - u)); end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * N[(v$95$m / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \frac{v\_m}{\left(-t1\right) - u}
\end{array}
Initial program 74.8%
associate-*l/80.8%
*-commutative80.8%
Simplified80.8%
associate-*r/74.8%
*-commutative74.8%
times-frac97.0%
frac-2neg97.0%
+-commutative97.0%
distribute-neg-in97.0%
sub-neg97.0%
associate-*r/97.6%
add-sqr-sqrt49.9%
sqrt-unprod43.8%
sqr-neg43.8%
sqrt-unprod18.4%
add-sqr-sqrt38.3%
sub-neg38.3%
+-commutative38.3%
add-sqr-sqrt19.9%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod35.4%
add-sqr-sqrt14.2%
sqrt-unprod39.5%
sqr-neg39.5%
Applied egg-rr97.6%
Taylor expanded in t1 around inf 59.1%
mul-1-neg59.1%
Simplified59.1%
Final simplification59.1%
v\_m = (fabs.f64 v) v\_s = (copysign.f64 #s(literal 1 binary64) v) (FPCore (v_s u v_m t1) :precision binary64 (* v_s (/ v_m t1)))
v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
return v_s * (v_m / t1);
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
real(8), intent (in) :: v_s
real(8), intent (in) :: u
real(8), intent (in) :: v_m
real(8), intent (in) :: t1
code = v_s * (v_m / t1)
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
return v_s * (v_m / t1);
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): return v_s * (v_m / t1)
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) return Float64(v_s * Float64(v_m / t1)) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp = code(v_s, u, v_m, t1) tmp = v_s * (v_m / t1); end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * N[(v$95$m / t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \frac{v\_m}{t1}
\end{array}
Initial program 74.8%
associate-*l/80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in t1 around inf 50.2%
associate-*r/50.2%
neg-mul-150.2%
Simplified50.2%
div-inv50.1%
add-sqr-sqrt24.0%
sqrt-unprod31.6%
sqr-neg31.6%
sqrt-unprod5.4%
add-sqr-sqrt13.6%
Applied egg-rr13.6%
associate-*r/13.6%
*-rgt-identity13.6%
Simplified13.6%
herbie shell --seed 2024181
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))