
(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 15 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 (/ (* (/ t1 (- (- t1) u)) (sqrt v_m)) (/ (+ t1 u) (sqrt v_m)))))
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 * (((t1 / (-t1 - u)) * sqrt(v_m)) / ((t1 + u) / sqrt(v_m)));
}
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 * (((t1 / (-t1 - u)) * sqrt(v_m)) / ((t1 + u) / sqrt(v_m)))
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 * (((t1 / (-t1 - u)) * Math.sqrt(v_m)) / ((t1 + u) / Math.sqrt(v_m)));
}
v\_m = math.fabs(v) v\_s = math.copysign(1.0, v) def code(v_s, u, v_m, t1): return v_s * (((t1 / (-t1 - u)) * math.sqrt(v_m)) / ((t1 + u) / math.sqrt(v_m)))
v\_m = abs(v) v\_s = copysign(1.0, v) function code(v_s, u, v_m, t1) return Float64(v_s * Float64(Float64(Float64(t1 / Float64(Float64(-t1) - u)) * sqrt(v_m)) / Float64(Float64(t1 + u) / sqrt(v_m)))) end
v\_m = abs(v); v\_s = sign(v) * abs(1.0); function tmp = code(v_s, u, v_m, t1) tmp = v_s * (((t1 / (-t1 - u)) * sqrt(v_m)) / ((t1 + u) / sqrt(v_m))); 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[(N[(N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision] * N[Sqrt[v$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] / N[Sqrt[v$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \frac{\frac{t1}{\left(-t1\right) - u} \cdot \sqrt{v\_m}}{\frac{t1 + u}{\sqrt{v\_m}}}
\end{array}
Initial program 74.9%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
clear-num96.6%
associate-/r/97.0%
Applied egg-rr97.0%
*-commutative97.0%
associate-*l/97.2%
*-un-lft-identity97.2%
clear-num96.6%
frac-2neg96.6%
frac-times84.2%
*-un-lft-identity84.2%
sub-neg84.2%
distribute-neg-in84.2%
+-commutative84.2%
remove-double-neg84.2%
Applied egg-rr84.2%
neg-mul-184.2%
add-sqr-sqrt44.2%
times-frac44.2%
associate-*l/39.4%
sqrt-div39.4%
sqrt-unprod21.6%
add-sqr-sqrt31.3%
associate-*l/28.7%
sqrt-div29.1%
sqrt-unprod24.5%
add-sqr-sqrt52.9%
Applied egg-rr52.9%
associate-*l/52.9%
associate-/r/52.6%
associate-*r*52.6%
mul-1-neg52.6%
Simplified52.6%
Final simplification52.6%
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) u) (/ v_m u))) (t_2 (/ v_m (- (- t1) (* u 2.0)))))
(*
v_s
(if (<= t1 -58.0)
t_2
(if (<= t1 -5e-254)
t_1
(if (<= t1 1.45e-273)
(/ (* v_m (/ t1 u)) (- t1 u))
(if (<= t1 9e-63) t_1 t_2)))))))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 / u) * (v_m / u);
double t_2 = v_m / (-t1 - (u * 2.0));
double tmp;
if (t1 <= -58.0) {
tmp = t_2;
} else if (t1 <= -5e-254) {
tmp = t_1;
} else if (t1 <= 1.45e-273) {
tmp = (v_m * (t1 / u)) / (t1 - u);
} else if (t1 <= 9e-63) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (-t1 / u) * (v_m / u)
t_2 = v_m / (-t1 - (u * 2.0d0))
if (t1 <= (-58.0d0)) then
tmp = t_2
else if (t1 <= (-5d-254)) then
tmp = t_1
else if (t1 <= 1.45d-273) then
tmp = (v_m * (t1 / u)) / (t1 - u)
else if (t1 <= 9d-63) then
tmp = t_1
else
tmp = t_2
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 / u) * (v_m / u);
double t_2 = v_m / (-t1 - (u * 2.0));
double tmp;
if (t1 <= -58.0) {
tmp = t_2;
} else if (t1 <= -5e-254) {
tmp = t_1;
} else if (t1 <= 1.45e-273) {
tmp = (v_m * (t1 / u)) / (t1 - u);
} else if (t1 <= 9e-63) {
tmp = t_1;
} else {
tmp = t_2;
}
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 / u) * (v_m / u) t_2 = v_m / (-t1 - (u * 2.0)) tmp = 0 if t1 <= -58.0: tmp = t_2 elif t1 <= -5e-254: tmp = t_1 elif t1 <= 1.45e-273: tmp = (v_m * (t1 / u)) / (t1 - u) elif t1 <= 9e-63: tmp = t_1 else: tmp = t_2 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(Float64(Float64(-t1) / u) * Float64(v_m / u)) t_2 = Float64(v_m / Float64(Float64(-t1) - Float64(u * 2.0))) tmp = 0.0 if (t1 <= -58.0) tmp = t_2; elseif (t1 <= -5e-254) tmp = t_1; elseif (t1 <= 1.45e-273) tmp = Float64(Float64(v_m * Float64(t1 / u)) / Float64(t1 - u)); elseif (t1 <= 9e-63) tmp = t_1; else tmp = t_2; 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 / u) * (v_m / u); t_2 = v_m / (-t1 - (u * 2.0)); tmp = 0.0; if (t1 <= -58.0) tmp = t_2; elseif (t1 <= -5e-254) tmp = t_1; elseif (t1 <= 1.45e-273) tmp = (v_m * (t1 / u)) / (t1 - u); elseif (t1 <= 9e-63) tmp = t_1; else tmp = t_2; 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[(N[((-t1) / u), $MachinePrecision] * N[(v$95$m / u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(v$95$m / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[t1, -58.0], t$95$2, If[LessEqual[t1, -5e-254], t$95$1, If[LessEqual[t1, 1.45e-273], N[(N[(v$95$m * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 9e-63], t$95$1, t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
\begin{array}{l}
t_1 := \frac{-t1}{u} \cdot \frac{v\_m}{u}\\
t_2 := \frac{v\_m}{\left(-t1\right) - u \cdot 2}\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;t1 \leq -58:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq -5 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 1.45 \cdot 10^{-273}:\\
\;\;\;\;\frac{v\_m \cdot \frac{t1}{u}}{t1 - u}\\
\mathbf{elif}\;t1 \leq 9 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if t1 < -58 or 8.9999999999999999e-63 < t1 Initial program 69.3%
associate-/l*68.1%
distribute-lft-neg-out68.1%
distribute-rgt-neg-in68.1%
associate-/r*81.9%
distribute-neg-frac281.9%
Simplified81.9%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times95.5%
*-un-lft-identity95.5%
frac-2neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
+-commutative95.5%
remove-double-neg95.5%
add-sqr-sqrt49.1%
sqrt-unprod40.0%
sqr-neg40.0%
sqrt-unprod19.6%
add-sqr-sqrt36.8%
add-sqr-sqrt15.1%
sqrt-unprod54.0%
Applied egg-rr95.5%
Taylor expanded in u around 0 85.8%
*-commutative85.8%
Simplified85.8%
if -58 < t1 < -5.0000000000000003e-254 or 1.44999999999999993e-273 < t1 < 8.9999999999999999e-63Initial program 81.4%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in t1 around 0 83.5%
associate-*r/83.5%
mul-1-neg83.5%
Simplified83.5%
Taylor expanded in t1 around 0 84.5%
if -5.0000000000000003e-254 < t1 < 1.44999999999999993e-273Initial program 85.2%
associate-/l*75.4%
distribute-lft-neg-out75.4%
distribute-rgt-neg-in75.4%
associate-/r*75.4%
distribute-neg-frac275.4%
Simplified75.4%
Taylor expanded in t1 around 0 75.4%
associate-*r/75.4%
clear-num75.3%
un-div-inv77.2%
add-sqr-sqrt37.3%
sqrt-unprod63.8%
sqr-neg63.8%
sqrt-unprod26.5%
add-sqr-sqrt42.6%
Applied egg-rr42.6%
frac-2neg42.6%
div-inv42.6%
associate-/r/42.7%
distribute-rgt-neg-in42.7%
add-sqr-sqrt21.1%
sqrt-unprod58.7%
sqr-neg58.7%
sqrt-unprod57.6%
add-sqr-sqrt99.5%
distribute-neg-in99.5%
add-sqr-sqrt41.9%
sqrt-unprod99.5%
sqr-neg99.5%
sqrt-unprod57.6%
add-sqr-sqrt99.5%
sub-neg99.5%
Applied egg-rr99.5%
associate-*r/99.8%
*-rgt-identity99.8%
*-commutative99.8%
Simplified99.8%
Final simplification86.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 (<= u -7.9e-163) (not (<= u 1.35e-156)))
(* t1 (/ (/ v_m (- (- t1) u)) (+ t1 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 <= -7.9e-163) || !(u <= 1.35e-156)) {
tmp = t1 * ((v_m / (-t1 - u)) / (t1 + 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 <= (-7.9d-163)) .or. (.not. (u <= 1.35d-156))) then
tmp = t1 * ((v_m / (-t1 - u)) / (t1 + 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 <= -7.9e-163) || !(u <= 1.35e-156)) {
tmp = t1 * ((v_m / (-t1 - u)) / (t1 + 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 <= -7.9e-163) or not (u <= 1.35e-156): tmp = t1 * ((v_m / (-t1 - u)) / (t1 + 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 <= -7.9e-163) || !(u <= 1.35e-156)) tmp = Float64(t1 * Float64(Float64(v_m / Float64(Float64(-t1) - u)) / Float64(t1 + 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 <= -7.9e-163) || ~((u <= 1.35e-156))) tmp = t1 * ((v_m / (-t1 - u)) / (t1 + 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, -7.9e-163], N[Not[LessEqual[u, 1.35e-156]], $MachinePrecision]], N[(t1 * N[(N[(v$95$m / N[((-t1) - u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $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 -7.9 \cdot 10^{-163} \lor \neg \left(u \leq 1.35 \cdot 10^{-156}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v\_m}{\left(-t1\right) - u}}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\end{array}
\end{array}
if u < -7.90000000000000049e-163 or 1.35000000000000006e-156 < u Initial program 78.6%
associate-/l*79.6%
distribute-lft-neg-out79.6%
distribute-rgt-neg-in79.6%
associate-/r*89.8%
distribute-neg-frac289.8%
Simplified89.8%
if -7.90000000000000049e-163 < u < 1.35000000000000006e-156Initial program 66.0%
associate-/l*61.8%
distribute-lft-neg-out61.8%
distribute-rgt-neg-in61.8%
associate-/r*73.9%
distribute-neg-frac273.9%
Simplified73.9%
Taylor expanded in t1 around inf 95.1%
associate-*r/95.1%
neg-mul-195.1%
Simplified95.1%
Final simplification91.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 -5.8e-103)
(* (- t1) (/ (/ v_m u) (+ t1 u)))
(if (<= u 13000000000000.0)
(/ v_m (- t1))
(* (/ t1 u) (/ 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 <= -5.8e-103) {
tmp = -t1 * ((v_m / u) / (t1 + u));
} else if (u <= 13000000000000.0) {
tmp = v_m / -t1;
} else {
tmp = (t1 / u) * (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 <= (-5.8d-103)) then
tmp = -t1 * ((v_m / u) / (t1 + u))
else if (u <= 13000000000000.0d0) then
tmp = v_m / -t1
else
tmp = (t1 / u) * (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 <= -5.8e-103) {
tmp = -t1 * ((v_m / u) / (t1 + u));
} else if (u <= 13000000000000.0) {
tmp = v_m / -t1;
} else {
tmp = (t1 / u) * (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 <= -5.8e-103: tmp = -t1 * ((v_m / u) / (t1 + u)) elif u <= 13000000000000.0: tmp = v_m / -t1 else: tmp = (t1 / u) * (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 <= -5.8e-103) tmp = Float64(Float64(-t1) * Float64(Float64(v_m / u) / Float64(t1 + u))); elseif (u <= 13000000000000.0) tmp = Float64(v_m / Float64(-t1)); else tmp = Float64(Float64(t1 / u) * 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 <= -5.8e-103) tmp = -t1 * ((v_m / u) / (t1 + u)); elseif (u <= 13000000000000.0) tmp = v_m / -t1; else tmp = (t1 / u) * (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[LessEqual[u, -5.8e-103], N[((-t1) * N[(N[(v$95$m / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 13000000000000.0], N[(v$95$m / (-t1)), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v$95$m / N[((-t1) - u), $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}\;u \leq -5.8 \cdot 10^{-103}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v\_m}{u}}{t1 + u}\\
\mathbf{elif}\;u \leq 13000000000000:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v\_m}{\left(-t1\right) - u}\\
\end{array}
\end{array}
if u < -5.7999999999999997e-103Initial program 80.1%
associate-/l*83.9%
distribute-lft-neg-out83.9%
distribute-rgt-neg-in83.9%
associate-/r*92.9%
distribute-neg-frac292.9%
Simplified92.9%
Taylor expanded in t1 around 0 81.4%
if -5.7999999999999997e-103 < u < 1.3e13Initial program 69.9%
associate-/l*66.4%
distribute-lft-neg-out66.4%
distribute-rgt-neg-in66.4%
associate-/r*77.7%
distribute-neg-frac277.7%
Simplified77.7%
Taylor expanded in t1 around inf 84.4%
associate-*r/84.4%
neg-mul-184.4%
Simplified84.4%
if 1.3e13 < u Initial program 77.5%
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 86.4%
associate-*r/86.4%
mul-1-neg86.4%
Simplified86.4%
Final simplification83.9%
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) u)))
(*
v_s
(if (<= u -5.8e-103)
(/ t1 (* t_1 (/ u v_m)))
(if (<= u 1.1e+14) (/ v_m (- t1)) (* (/ t1 u) (/ v_m t_1)))))))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 - u;
double tmp;
if (u <= -5.8e-103) {
tmp = t1 / (t_1 * (u / v_m));
} else if (u <= 1.1e+14) {
tmp = v_m / -t1;
} else {
tmp = (t1 / u) * (v_m / t_1);
}
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 - u
if (u <= (-5.8d-103)) then
tmp = t1 / (t_1 * (u / v_m))
else if (u <= 1.1d+14) then
tmp = v_m / -t1
else
tmp = (t1 / u) * (v_m / t_1)
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 - u;
double tmp;
if (u <= -5.8e-103) {
tmp = t1 / (t_1 * (u / v_m));
} else if (u <= 1.1e+14) {
tmp = v_m / -t1;
} else {
tmp = (t1 / u) * (v_m / t_1);
}
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 - u tmp = 0 if u <= -5.8e-103: tmp = t1 / (t_1 * (u / v_m)) elif u <= 1.1e+14: tmp = v_m / -t1 else: tmp = (t1 / u) * (v_m / t_1) 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(Float64(-t1) - u) tmp = 0.0 if (u <= -5.8e-103) tmp = Float64(t1 / Float64(t_1 * Float64(u / v_m))); elseif (u <= 1.1e+14) tmp = Float64(v_m / Float64(-t1)); else tmp = Float64(Float64(t1 / u) * Float64(v_m / t_1)); 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 - u; tmp = 0.0; if (u <= -5.8e-103) tmp = t1 / (t_1 * (u / v_m)); elseif (u <= 1.1e+14) tmp = v_m / -t1; else tmp = (t1 / u) * (v_m / t_1); 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) - u), $MachinePrecision]}, N[(v$95$s * If[LessEqual[u, -5.8e-103], N[(t1 / N[(t$95$1 * N[(u / v$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.1e+14], N[(v$95$m / (-t1)), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v$95$m / t$95$1), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
\begin{array}{l}
t_1 := \left(-t1\right) - u\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;u \leq -5.8 \cdot 10^{-103}:\\
\;\;\;\;\frac{t1}{t\_1 \cdot \frac{u}{v\_m}}\\
\mathbf{elif}\;u \leq 1.1 \cdot 10^{+14}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v\_m}{t\_1}\\
\end{array}
\end{array}
\end{array}
if u < -5.7999999999999997e-103Initial program 80.1%
times-frac99.3%
distribute-frac-neg99.3%
distribute-neg-frac299.3%
+-commutative99.3%
distribute-neg-in99.3%
unsub-neg99.3%
Simplified99.3%
clear-num99.0%
associate-/r/99.2%
Applied egg-rr99.2%
*-commutative99.2%
associate-*l/99.3%
*-un-lft-identity99.3%
clear-num99.0%
frac-2neg99.0%
frac-times91.8%
*-un-lft-identity91.8%
sub-neg91.8%
distribute-neg-in91.8%
+-commutative91.8%
remove-double-neg91.8%
Applied egg-rr91.8%
Taylor expanded in t1 around 0 81.5%
if -5.7999999999999997e-103 < u < 1.1e14Initial program 69.9%
associate-/l*66.4%
distribute-lft-neg-out66.4%
distribute-rgt-neg-in66.4%
associate-/r*77.7%
distribute-neg-frac277.7%
Simplified77.7%
Taylor expanded in t1 around inf 84.4%
associate-*r/84.4%
neg-mul-184.4%
Simplified84.4%
if 1.1e14 < u Initial program 77.5%
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 86.4%
associate-*r/86.4%
mul-1-neg86.4%
Simplified86.4%
Final simplification83.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 (<= u -5.6e-103)
(* (- t1) (/ (/ v_m u) (+ t1 u)))
(if (<= u 3.2e+33) (/ v_m (- t1)) (/ (* t1 (/ v_m 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 (u <= -5.6e-103) {
tmp = -t1 * ((v_m / u) / (t1 + u));
} else if (u <= 3.2e+33) {
tmp = v_m / -t1;
} else {
tmp = (t1 * (v_m / 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 (u <= (-5.6d-103)) then
tmp = -t1 * ((v_m / u) / (t1 + u))
else if (u <= 3.2d+33) then
tmp = v_m / -t1
else
tmp = (t1 * (v_m / 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 (u <= -5.6e-103) {
tmp = -t1 * ((v_m / u) / (t1 + u));
} else if (u <= 3.2e+33) {
tmp = v_m / -t1;
} else {
tmp = (t1 * (v_m / 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 u <= -5.6e-103: tmp = -t1 * ((v_m / u) / (t1 + u)) elif u <= 3.2e+33: tmp = v_m / -t1 else: tmp = (t1 * (v_m / 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 (u <= -5.6e-103) tmp = Float64(Float64(-t1) * Float64(Float64(v_m / u) / Float64(t1 + u))); elseif (u <= 3.2e+33) tmp = Float64(v_m / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v_m / 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 (u <= -5.6e-103) tmp = -t1 * ((v_m / u) / (t1 + u)); elseif (u <= 3.2e+33) tmp = v_m / -t1; else tmp = (t1 * (v_m / 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[u, -5.6e-103], N[((-t1) * N[(N[(v$95$m / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.2e+33], N[(v$95$m / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v$95$m / u), $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}\;u \leq -5.6 \cdot 10^{-103}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v\_m}{u}}{t1 + u}\\
\mathbf{elif}\;u \leq 3.2 \cdot 10^{+33}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v\_m}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -5.60000000000000046e-103Initial program 80.1%
associate-/l*83.9%
distribute-lft-neg-out83.9%
distribute-rgt-neg-in83.9%
associate-/r*92.9%
distribute-neg-frac292.9%
Simplified92.9%
Taylor expanded in t1 around 0 81.4%
if -5.60000000000000046e-103 < u < 3.20000000000000017e33Initial program 70.1%
associate-/l*66.7%
distribute-lft-neg-out66.7%
distribute-rgt-neg-in66.7%
associate-/r*78.4%
distribute-neg-frac278.4%
Simplified78.4%
Taylor expanded in t1 around inf 84.1%
associate-*r/84.1%
neg-mul-184.1%
Simplified84.1%
if 3.20000000000000017e33 < u Initial program 77.7%
times-frac98.2%
distribute-frac-neg98.2%
distribute-neg-frac298.2%
+-commutative98.2%
distribute-neg-in98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in t1 around 0 87.1%
associate-*r/87.1%
mul-1-neg87.1%
Simplified87.1%
associate-*r/85.5%
distribute-frac-neg85.5%
distribute-lft-neg-out85.5%
associate-/r/87.1%
distribute-frac-neg287.1%
frac-2neg87.1%
distribute-neg-frac87.1%
frac-2neg87.1%
div-inv87.1%
clear-num87.1%
distribute-neg-in87.1%
add-sqr-sqrt41.9%
sqrt-unprod87.5%
sqr-neg87.5%
sqrt-unprod45.0%
add-sqr-sqrt87.1%
sub-neg87.1%
Applied egg-rr87.1%
Final simplification83.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 -60.0) (not (<= t1 1.45e-10)))
(/ 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 <= -60.0) || !(t1 <= 1.45e-10)) {
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 <= (-60.0d0)) .or. (.not. (t1 <= 1.45d-10))) 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 <= -60.0) || !(t1 <= 1.45e-10)) {
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 <= -60.0) or not (t1 <= 1.45e-10): 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 <= -60.0) || !(t1 <= 1.45e-10)) tmp = Float64(v_m / Float64(Float64(-t1) - u)); else tmp = Float64(Float64(Float64(-t1) / 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 <= -60.0) || ~((t1 <= 1.45e-10))) 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, -60.0], N[Not[LessEqual[t1, 1.45e-10]], $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 -60 \lor \neg \left(t1 \leq 1.45 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{v\_m}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v\_m}{u}\\
\end{array}
\end{array}
if t1 < -60 or 1.4499999999999999e-10 < t1 Initial program 67.4%
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 86.6%
if -60 < t1 < 1.4499999999999999e-10Initial program 82.9%
times-frac94.3%
distribute-frac-neg94.3%
distribute-neg-frac294.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
Simplified94.3%
Taylor expanded in t1 around 0 79.8%
associate-*r/79.8%
mul-1-neg79.8%
Simplified79.8%
Taylor expanded in t1 around 0 82.2%
Final simplification84.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 -66.0) (not (<= t1 4.6e-63)))
(/ v_m (- (- t1) (* u 2.0)))
(* (/ (- 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 <= -66.0) || !(t1 <= 4.6e-63)) {
tmp = v_m / (-t1 - (u * 2.0));
} 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 <= (-66.0d0)) .or. (.not. (t1 <= 4.6d-63))) then
tmp = v_m / (-t1 - (u * 2.0d0))
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 <= -66.0) || !(t1 <= 4.6e-63)) {
tmp = v_m / (-t1 - (u * 2.0));
} 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 <= -66.0) or not (t1 <= 4.6e-63): tmp = v_m / (-t1 - (u * 2.0)) 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 <= -66.0) || !(t1 <= 4.6e-63)) tmp = Float64(v_m / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(Float64(-t1) / 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 <= -66.0) || ~((t1 <= 4.6e-63))) tmp = v_m / (-t1 - (u * 2.0)); 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, -66.0], N[Not[LessEqual[t1, 4.6e-63]], $MachinePrecision]], N[(v$95$m / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $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 -66 \lor \neg \left(t1 \leq 4.6 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{v\_m}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v\_m}{u}\\
\end{array}
\end{array}
if t1 < -66 or 4.6e-63 < t1 Initial program 69.3%
associate-/l*68.1%
distribute-lft-neg-out68.1%
distribute-rgt-neg-in68.1%
associate-/r*81.9%
distribute-neg-frac281.9%
Simplified81.9%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times95.5%
*-un-lft-identity95.5%
frac-2neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
+-commutative95.5%
remove-double-neg95.5%
add-sqr-sqrt49.1%
sqrt-unprod40.0%
sqr-neg40.0%
sqrt-unprod19.6%
add-sqr-sqrt36.8%
add-sqr-sqrt15.1%
sqrt-unprod54.0%
Applied egg-rr95.5%
Taylor expanded in u around 0 85.8%
*-commutative85.8%
Simplified85.8%
if -66 < t1 < 4.6e-63Initial program 82.0%
times-frac93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
+-commutative93.8%
distribute-neg-in93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in t1 around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
Simplified82.1%
Taylor expanded in t1 around 0 83.0%
Final simplification84.6%
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 -2.8e+61) (not (<= u 1.25e+96)))
(* (/ v_m u) -0.5)
(/ 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 <= -2.8e+61) || !(u <= 1.25e+96)) {
tmp = (v_m / u) * -0.5;
} 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 <= (-2.8d+61)) .or. (.not. (u <= 1.25d+96))) then
tmp = (v_m / u) * (-0.5d0)
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 <= -2.8e+61) || !(u <= 1.25e+96)) {
tmp = (v_m / u) * -0.5;
} 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 <= -2.8e+61) or not (u <= 1.25e+96): tmp = (v_m / u) * -0.5 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 <= -2.8e+61) || !(u <= 1.25e+96)) tmp = Float64(Float64(v_m / u) * -0.5); 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 <= -2.8e+61) || ~((u <= 1.25e+96))) tmp = (v_m / u) * -0.5; 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, -2.8e+61], N[Not[LessEqual[u, 1.25e+96]], $MachinePrecision]], N[(N[(v$95$m / u), $MachinePrecision] * -0.5), $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 -2.8 \cdot 10^{+61} \lor \neg \left(u \leq 1.25 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{v\_m}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\end{array}
\end{array}
if u < -2.8000000000000001e61 or 1.2500000000000001e96 < u Initial program 80.9%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*93.4%
distribute-neg-frac293.4%
Simplified93.4%
associate-*r/99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*l/98.8%
clear-num98.8%
frac-2neg98.8%
frac-times85.4%
*-un-lft-identity85.4%
frac-2neg85.4%
sub-neg85.4%
distribute-neg-in85.4%
+-commutative85.4%
remove-double-neg85.4%
add-sqr-sqrt44.2%
sqrt-unprod72.3%
sqr-neg72.3%
sqrt-unprod36.8%
add-sqr-sqrt73.6%
add-sqr-sqrt35.6%
sqrt-unprod75.8%
Applied egg-rr85.4%
Taylor expanded in u around 0 48.9%
*-commutative48.9%
Simplified48.9%
Taylor expanded in t1 around 0 41.6%
if -2.8000000000000001e61 < u < 1.2500000000000001e96Initial program 71.8%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*80.8%
distribute-neg-frac280.8%
Simplified80.8%
Taylor expanded in t1 around inf 72.9%
associate-*r/72.9%
neg-mul-172.9%
Simplified72.9%
Final simplification62.0%
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 -2.8e+61)
(* (/ v_m u) -0.5)
(if (<= u 7e+95) (/ v_m (- t1)) (/ 1.0 (/ u v_m))))))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 <= -2.8e+61) {
tmp = (v_m / u) * -0.5;
} else if (u <= 7e+95) {
tmp = v_m / -t1;
} else {
tmp = 1.0 / (u / v_m);
}
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 <= (-2.8d+61)) then
tmp = (v_m / u) * (-0.5d0)
else if (u <= 7d+95) then
tmp = v_m / -t1
else
tmp = 1.0d0 / (u / v_m)
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 <= -2.8e+61) {
tmp = (v_m / u) * -0.5;
} else if (u <= 7e+95) {
tmp = v_m / -t1;
} else {
tmp = 1.0 / (u / v_m);
}
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 <= -2.8e+61: tmp = (v_m / u) * -0.5 elif u <= 7e+95: tmp = v_m / -t1 else: tmp = 1.0 / (u / v_m) 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 <= -2.8e+61) tmp = Float64(Float64(v_m / u) * -0.5); elseif (u <= 7e+95) tmp = Float64(v_m / Float64(-t1)); else tmp = Float64(1.0 / Float64(u / v_m)); 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 <= -2.8e+61) tmp = (v_m / u) * -0.5; elseif (u <= 7e+95) tmp = v_m / -t1; else tmp = 1.0 / (u / v_m); 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, -2.8e+61], N[(N[(v$95$m / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 7e+95], N[(v$95$m / (-t1)), $MachinePrecision], N[(1.0 / N[(u / v$95$m), $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 -2.8 \cdot 10^{+61}:\\
\;\;\;\;\frac{v\_m}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 7 \cdot 10^{+95}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v\_m}}\\
\end{array}
\end{array}
if u < -2.8000000000000001e61Initial program 83.3%
associate-/l*83.5%
distribute-lft-neg-out83.5%
distribute-rgt-neg-in83.5%
associate-/r*95.5%
distribute-neg-frac295.5%
Simplified95.5%
associate-*r/99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*l/99.8%
clear-num99.8%
frac-2neg99.8%
frac-times83.8%
*-un-lft-identity83.8%
frac-2neg83.8%
sub-neg83.8%
distribute-neg-in83.8%
+-commutative83.8%
remove-double-neg83.8%
add-sqr-sqrt48.4%
sqrt-unprod68.9%
sqr-neg68.9%
sqrt-unprod31.0%
add-sqr-sqrt73.1%
add-sqr-sqrt68.9%
sqrt-unprod73.3%
Applied egg-rr83.8%
Taylor expanded in u around 0 50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in t1 around 0 40.2%
if -2.8000000000000001e61 < u < 6.99999999999999999e95Initial program 71.8%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*80.8%
distribute-neg-frac280.8%
Simplified80.8%
Taylor expanded in t1 around inf 72.9%
associate-*r/72.9%
neg-mul-172.9%
Simplified72.9%
if 6.99999999999999999e95 < u Initial program 78.3%
associate-/l*76.5%
distribute-lft-neg-out76.5%
distribute-rgt-neg-in76.5%
associate-/r*91.1%
distribute-neg-frac291.1%
Simplified91.1%
Taylor expanded in t1 around 0 90.5%
Taylor expanded in v around 0 78.3%
associate-*r/78.3%
mul-1-neg78.3%
distribute-lft-neg-out78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in u around 0 51.8%
clear-num53.8%
inv-pow53.8%
*-commutative53.8%
times-frac44.9%
add-sqr-sqrt17.5%
sqrt-unprod53.2%
sqr-neg53.2%
sqrt-unprod27.1%
add-sqr-sqrt44.9%
Applied egg-rr44.9%
unpow-144.9%
*-inverses44.9%
*-rgt-identity44.9%
Simplified44.9%
Final simplification62.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 -2.8e+61) (not (<= u 1.2e+96))) (/ 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 <= -2.8e+61) || !(u <= 1.2e+96)) {
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 <= (-2.8d+61)) .or. (.not. (u <= 1.2d+96))) 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 <= -2.8e+61) || !(u <= 1.2e+96)) {
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 <= -2.8e+61) or not (u <= 1.2e+96): 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 <= -2.8e+61) || !(u <= 1.2e+96)) 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 <= -2.8e+61) || ~((u <= 1.2e+96))) 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, -2.8e+61], N[Not[LessEqual[u, 1.2e+96]], $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 -2.8 \cdot 10^{+61} \lor \neg \left(u \leq 1.2 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{v\_m}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\end{array}
\end{array}
if u < -2.8000000000000001e61 or 1.19999999999999996e96 < u Initial program 80.9%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*93.4%
distribute-neg-frac293.4%
Simplified93.4%
Taylor expanded in t1 around 0 92.1%
associate-*r/92.3%
clear-num92.2%
un-div-inv92.3%
add-sqr-sqrt45.1%
sqrt-unprod78.0%
sqr-neg78.0%
sqrt-unprod35.9%
add-sqr-sqrt70.3%
Applied egg-rr70.3%
Taylor expanded in t1 around inf 41.3%
if -2.8000000000000001e61 < u < 1.19999999999999996e96Initial program 71.8%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*80.8%
distribute-neg-frac280.8%
Simplified80.8%
Taylor expanded in t1 around inf 72.9%
associate-*r/72.9%
neg-mul-172.9%
Simplified72.9%
Final simplification61.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 (<= u -2.8e+61) (not (<= u 1.02e+96)))
(/ 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 <= -2.8e+61) || !(u <= 1.02e+96)) {
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 <= (-2.8d+61)) .or. (.not. (u <= 1.02d+96))) 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 <= -2.8e+61) || !(u <= 1.02e+96)) {
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 <= -2.8e+61) or not (u <= 1.02e+96): 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 <= -2.8e+61) || !(u <= 1.02e+96)) tmp = Float64(v_m / Float64(-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 <= -2.8e+61) || ~((u <= 1.02e+96))) 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, -2.8e+61], N[Not[LessEqual[u, 1.02e+96]], $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 -2.8 \cdot 10^{+61} \lor \neg \left(u \leq 1.02 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{v\_m}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v\_m}{-t1}\\
\end{array}
\end{array}
if u < -2.8000000000000001e61 or 1.02000000000000001e96 < u Initial program 80.9%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*93.4%
distribute-neg-frac293.4%
Simplified93.4%
Taylor expanded in t1 around 0 92.1%
Taylor expanded in t1 around inf 41.5%
associate-*r/41.5%
mul-1-neg41.5%
Simplified41.5%
if -2.8000000000000001e61 < u < 1.02000000000000001e96Initial program 71.8%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*80.8%
distribute-neg-frac280.8%
Simplified80.8%
Taylor expanded in t1 around inf 72.9%
associate-*r/72.9%
neg-mul-172.9%
Simplified72.9%
Final simplification62.0%
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 (* (/ t1 (+ t1 u)) (/ 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 * ((t1 / (t1 + u)) * (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 * ((t1 / (t1 + u)) * (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 * ((t1 / (t1 + u)) * (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 * ((t1 / (t1 + u)) * (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(Float64(t1 / Float64(t1 + u)) * 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 * ((t1 / (t1 + u)) * (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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v$95$m / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \left(\frac{t1}{t1 + u} \cdot \frac{v\_m}{\left(-t1\right) - u}\right)
\end{array}
Initial program 74.9%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Final simplification97.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.9%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 63.7%
Final simplification63.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 (/ 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) {
return v_s * (v_m / 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 / 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 / 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 / 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 / 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 / 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 / u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)
\\
v\_s \cdot \frac{v\_m}{u}
\end{array}
Initial program 74.9%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*85.1%
distribute-neg-frac285.1%
Simplified85.1%
Taylor expanded in t1 around 0 55.2%
associate-*r/52.5%
clear-num52.7%
un-div-inv52.8%
add-sqr-sqrt27.7%
sqrt-unprod48.2%
sqr-neg48.2%
sqrt-unprod16.7%
add-sqr-sqrt31.1%
Applied egg-rr31.1%
Taylor expanded in t1 around inf 18.2%
Final simplification18.2%
herbie shell --seed 2024059
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))