
(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}
(FPCore (u v t1) :precision binary64 (* (/ (- v) (+ t1 u)) (/ t1 (+ t1 u))))
double code(double u, double v, double t1) {
return (-v / (t1 + u)) * (t1 / (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 = (-v / (t1 + u)) * (t1 / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-v / (t1 + u)) * (t1 / (t1 + u));
}
def code(u, v, t1): return (-v / (t1 + u)) * (t1 / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-v) / Float64(t1 + u)) * Float64(t1 / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-v / (t1 + u)) * (t1 / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u} \cdot \frac{t1}{t1 + u}
\end{array}
Initial program 75.8%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (- v) (/ t1 (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -4.7e+141)
(/ (- v) t1)
(if (<= t1 -1.25e-109)
t_1
(if (<= t1 2.05e-116)
(/ t1 (* u (/ u (- v))))
(if (<= t1 6.2e+151) t_1 (/ (- (* 2.0 (* u (/ v t1))) v) t1)))))))
double code(double u, double v, double t1) {
double t_1 = -v * (t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -4.7e+141) {
tmp = -v / t1;
} else if (t1 <= -1.25e-109) {
tmp = t_1;
} else if (t1 <= 2.05e-116) {
tmp = t1 / (u * (u / -v));
} else if (t1 <= 6.2e+151) {
tmp = t_1;
} else {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -v * (t1 / ((t1 + u) * (t1 + u)))
if (t1 <= (-4.7d+141)) then
tmp = -v / t1
else if (t1 <= (-1.25d-109)) then
tmp = t_1
else if (t1 <= 2.05d-116) then
tmp = t1 / (u * (u / -v))
else if (t1 <= 6.2d+151) then
tmp = t_1
else
tmp = ((2.0d0 * (u * (v / t1))) - v) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v * (t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -4.7e+141) {
tmp = -v / t1;
} else if (t1 <= -1.25e-109) {
tmp = t_1;
} else if (t1 <= 2.05e-116) {
tmp = t1 / (u * (u / -v));
} else if (t1 <= 6.2e+151) {
tmp = t_1;
} else {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
}
return tmp;
}
def code(u, v, t1): t_1 = -v * (t1 / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -4.7e+141: tmp = -v / t1 elif t1 <= -1.25e-109: tmp = t_1 elif t1 <= 2.05e-116: tmp = t1 / (u * (u / -v)) elif t1 <= 6.2e+151: tmp = t_1 else: tmp = ((2.0 * (u * (v / t1))) - v) / t1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) * Float64(t1 / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -4.7e+141) tmp = Float64(Float64(-v) / t1); elseif (t1 <= -1.25e-109) tmp = t_1; elseif (t1 <= 2.05e-116) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); elseif (t1 <= 6.2e+151) tmp = t_1; else tmp = Float64(Float64(Float64(2.0 * Float64(u * Float64(v / t1))) - v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v * (t1 / ((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -4.7e+141) tmp = -v / t1; elseif (t1 <= -1.25e-109) tmp = t_1; elseif (t1 <= 2.05e-116) tmp = t1 / (u * (u / -v)); elseif (t1 <= 6.2e+151) tmp = t_1; else tmp = ((2.0 * (u * (v / t1))) - v) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -4.7e+141], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, -1.25e-109], t$95$1, If[LessEqual[t1, 2.05e-116], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.2e+151], t$95$1, N[(N[(N[(2.0 * N[(u * N[(v / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / t1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -4.7 \cdot 10^{+141}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 2.05 \cdot 10^{-116}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{elif}\;t1 \leq 6.2 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(u \cdot \frac{v}{t1}\right) - v}{t1}\\
\end{array}
\end{array}
if t1 < -4.69999999999999979e141Initial program 54.9%
associate-*l/55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in t1 around inf 91.4%
associate-*r/91.4%
neg-mul-191.4%
Simplified91.4%
if -4.69999999999999979e141 < t1 < -1.25000000000000005e-109 or 2.0499999999999999e-116 < t1 < 6.2000000000000004e151Initial program 84.7%
associate-*l/92.2%
*-commutative92.2%
Simplified92.2%
if -1.25000000000000005e-109 < t1 < 2.0499999999999999e-116Initial program 83.1%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in t1 around 0 90.0%
*-commutative90.0%
clear-num89.9%
frac-2neg89.9%
frac-times90.7%
*-un-lft-identity90.7%
neg-sub090.7%
add-sqr-sqrt48.3%
sqrt-unprod76.8%
sqr-neg76.8%
sqrt-unprod30.4%
add-sqr-sqrt59.9%
associate-+l-59.9%
neg-sub059.9%
add-sqr-sqrt29.6%
sqrt-unprod71.0%
sqr-neg71.0%
sqrt-unprod42.3%
add-sqr-sqrt90.7%
+-commutative90.7%
Applied egg-rr90.7%
Taylor expanded in t1 around 0 95.0%
if 6.2000000000000004e151 < t1 Initial program 38.8%
associate-*l/40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in t1 around inf 85.4%
+-commutative85.4%
neg-mul-185.4%
unsub-neg85.4%
associate-/l*89.5%
Simplified89.5%
Final simplification92.9%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.5e+152)
(/ (- v) (+ t1 (* u 2.0)))
(if (<= t1 2.7e+144)
(* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))
(/ (- (* 2.0 (* u (/ v t1))) v) t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.5e+152) {
tmp = -v / (t1 + (u * 2.0));
} else if (t1 <= 2.7e+144) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.5d+152)) then
tmp = -v / (t1 + (u * 2.0d0))
else if (t1 <= 2.7d+144) then
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
else
tmp = ((2.0d0 * (u * (v / t1))) - v) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.5e+152) {
tmp = -v / (t1 + (u * 2.0));
} else if (t1 <= 2.7e+144) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.5e+152: tmp = -v / (t1 + (u * 2.0)) elif t1 <= 2.7e+144: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = ((2.0 * (u * (v / t1))) - v) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.5e+152) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); elseif (t1 <= 2.7e+144) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(Float64(Float64(2.0 * Float64(u * Float64(v / t1))) - v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.5e+152) tmp = -v / (t1 + (u * 2.0)); elseif (t1 <= 2.7e+144) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = ((2.0 * (u * (v / t1))) - v) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.5e+152], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.7e+144], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(u * N[(v / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.5 \cdot 10^{+152}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{elif}\;t1 \leq 2.7 \cdot 10^{+144}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(u \cdot \frac{v}{t1}\right) - v}{t1}\\
\end{array}
\end{array}
if t1 < -1.49999999999999995e152Initial program 53.9%
associate-*l/54.9%
*-commutative54.9%
Simplified54.9%
associate-*r/53.9%
times-frac100.0%
*-commutative100.0%
frac-2neg100.0%
remove-double-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
clear-num100.0%
frac-2neg100.0%
frac-times100.0%
*-un-lft-identity100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
sub-neg100.0%
+-commutative100.0%
add-sqr-sqrt99.5%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
Applied egg-rr100.0%
Taylor expanded in u around 0 96.7%
*-commutative96.7%
Simplified96.7%
if -1.49999999999999995e152 < t1 < 2.70000000000000015e144Initial program 83.3%
associate-/l*88.7%
Simplified88.7%
associate-/r*95.3%
div-inv95.3%
Applied egg-rr95.3%
associate-*r/95.3%
*-rgt-identity95.3%
Simplified95.3%
if 2.70000000000000015e144 < t1 Initial program 38.8%
associate-*l/40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in t1 around inf 85.4%
+-commutative85.4%
neg-mul-185.4%
unsub-neg85.4%
associate-/l*89.5%
Simplified89.5%
Final simplification94.9%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -2.9e+131)
(/ (- v) t1)
(if (<= t1 4.8e+143)
(* t1 (/ (- v) (* (+ t1 u) (+ t1 u))))
(/ (- (* 2.0 (* u (/ v t1))) v) t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.9e+131) {
tmp = -v / t1;
} else if (t1 <= 4.8e+143) {
tmp = t1 * (-v / ((t1 + u) * (t1 + u)));
} else {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2.9d+131)) then
tmp = -v / t1
else if (t1 <= 4.8d+143) then
tmp = t1 * (-v / ((t1 + u) * (t1 + u)))
else
tmp = ((2.0d0 * (u * (v / t1))) - v) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.9e+131) {
tmp = -v / t1;
} else if (t1 <= 4.8e+143) {
tmp = t1 * (-v / ((t1 + u) * (t1 + u)));
} else {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.9e+131: tmp = -v / t1 elif t1 <= 4.8e+143: tmp = t1 * (-v / ((t1 + u) * (t1 + u))) else: tmp = ((2.0 * (u * (v / t1))) - v) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.9e+131) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 4.8e+143) tmp = Float64(t1 * Float64(Float64(-v) / Float64(Float64(t1 + u) * Float64(t1 + u)))); else tmp = Float64(Float64(Float64(2.0 * Float64(u * Float64(v / t1))) - v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.9e+131) tmp = -v / t1; elseif (t1 <= 4.8e+143) tmp = t1 * (-v / ((t1 + u) * (t1 + u))); else tmp = ((2.0 * (u * (v / t1))) - v) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.9e+131], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 4.8e+143], N[(t1 * N[((-v) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(u * N[(v / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.9 \cdot 10^{+131}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 4.8 \cdot 10^{+143}:\\
\;\;\;\;t1 \cdot \frac{-v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(u \cdot \frac{v}{t1}\right) - v}{t1}\\
\end{array}
\end{array}
if t1 < -2.9000000000000001e131Initial program 54.9%
associate-*l/55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in t1 around inf 91.4%
associate-*r/91.4%
neg-mul-191.4%
Simplified91.4%
if -2.9000000000000001e131 < t1 < 4.79999999999999959e143Initial program 83.9%
associate-/l*89.9%
Simplified89.9%
if 4.79999999999999959e143 < t1 Initial program 38.8%
associate-*l/40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in t1 around inf 85.4%
+-commutative85.4%
neg-mul-185.4%
unsub-neg85.4%
associate-/l*89.5%
Simplified89.5%
Final simplification90.0%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.05e+21) (/ (- v) t1) (if (<= t1 9.2e-29) (/ t1 (* u (/ u (- v)))) (/ (- v) (+ t1 (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.05e+21) {
tmp = -v / t1;
} else if (t1 <= 9.2e-29) {
tmp = t1 / (u * (u / -v));
} else {
tmp = -v / (t1 + (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2.05d+21)) then
tmp = -v / t1
else if (t1 <= 9.2d-29) then
tmp = t1 / (u * (u / -v))
else
tmp = -v / (t1 + (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.05e+21) {
tmp = -v / t1;
} else if (t1 <= 9.2e-29) {
tmp = t1 / (u * (u / -v));
} else {
tmp = -v / (t1 + (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.05e+21: tmp = -v / t1 elif t1 <= 9.2e-29: tmp = t1 / (u * (u / -v)) else: tmp = -v / (t1 + (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.05e+21) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 9.2e-29) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); else tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.05e+21) tmp = -v / t1; elseif (t1 <= 9.2e-29) tmp = t1 / (u * (u / -v)); else tmp = -v / (t1 + (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.05e+21], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 9.2e-29], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 9.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\end{array}
\end{array}
if t1 < -2.05e21Initial program 61.7%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 87.9%
associate-*r/87.9%
neg-mul-187.9%
Simplified87.9%
if -2.05e21 < t1 < 9.19999999999999965e-29Initial program 86.5%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 82.5%
*-commutative82.5%
clear-num82.5%
frac-2neg82.5%
frac-times83.1%
*-un-lft-identity83.1%
neg-sub083.1%
add-sqr-sqrt46.7%
sqrt-unprod70.5%
sqr-neg70.5%
sqrt-unprod25.7%
add-sqr-sqrt54.5%
associate-+l-54.5%
neg-sub054.5%
add-sqr-sqrt28.9%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod36.2%
add-sqr-sqrt83.1%
+-commutative83.1%
Applied egg-rr83.1%
Taylor expanded in t1 around 0 85.9%
if 9.19999999999999965e-29 < t1 Initial program 62.6%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
associate-*r/62.6%
times-frac99.8%
*-commutative99.8%
frac-2neg99.8%
remove-double-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
clear-num99.8%
frac-2neg99.8%
frac-times95.2%
*-un-lft-identity95.2%
+-commutative95.2%
distribute-neg-in95.2%
sub-neg95.2%
sub-neg95.2%
+-commutative95.2%
add-sqr-sqrt0.0%
sqrt-unprod36.7%
sqr-neg36.7%
sqrt-unprod38.6%
add-sqr-sqrt15.7%
sqrt-unprod26.6%
sqr-neg26.6%
Applied egg-rr95.2%
Taylor expanded in u around 0 77.8%
*-commutative77.8%
Simplified77.8%
Final simplification84.5%
(FPCore (u v t1) :precision binary64 (if (<= t1 -3.5e+24) (/ (- v) t1) (if (<= t1 9e-29) (/ t1 (* u (/ u (- v)))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.5e+24) {
tmp = -v / t1;
} else if (t1 <= 9e-29) {
tmp = t1 / (u * (u / -v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-3.5d+24)) then
tmp = -v / t1
else if (t1 <= 9d-29) then
tmp = t1 / (u * (u / -v))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.5e+24) {
tmp = -v / t1;
} else if (t1 <= 9e-29) {
tmp = t1 / (u * (u / -v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3.5e+24: tmp = -v / t1 elif t1 <= 9e-29: tmp = t1 / (u * (u / -v)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3.5e+24) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 9e-29) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -3.5e+24) tmp = -v / t1; elseif (t1 <= 9e-29) tmp = t1 / (u * (u / -v)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3.5e+24], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 9e-29], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 9 \cdot 10^{-29}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -3.5000000000000002e24Initial program 61.7%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 87.9%
associate-*r/87.9%
neg-mul-187.9%
Simplified87.9%
if -3.5000000000000002e24 < t1 < 8.9999999999999996e-29Initial program 86.5%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 82.5%
*-commutative82.5%
clear-num82.5%
frac-2neg82.5%
frac-times83.1%
*-un-lft-identity83.1%
neg-sub083.1%
add-sqr-sqrt46.7%
sqrt-unprod70.5%
sqr-neg70.5%
sqrt-unprod25.7%
add-sqr-sqrt54.5%
associate-+l-54.5%
neg-sub054.5%
add-sqr-sqrt28.9%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod36.2%
add-sqr-sqrt83.1%
+-commutative83.1%
Applied egg-rr83.1%
Taylor expanded in t1 around 0 85.9%
if 8.9999999999999996e-29 < t1 Initial program 62.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 77.7%
mul-1-neg77.7%
neg-sub077.7%
+-commutative77.7%
Applied egg-rr77.7%
neg-sub077.7%
distribute-neg-frac77.7%
Simplified77.7%
Final simplification84.4%
(FPCore (u v t1) :precision binary64 (if (<= t1 -3e+25) (/ (- v) t1) (if (<= t1 8.5e-29) (* t1 (/ (/ v u) (- u))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3e+25) {
tmp = -v / t1;
} else if (t1 <= 8.5e-29) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-3d+25)) then
tmp = -v / t1
else if (t1 <= 8.5d-29) then
tmp = t1 * ((v / u) / -u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3e+25) {
tmp = -v / t1;
} else if (t1 <= 8.5e-29) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3e+25: tmp = -v / t1 elif t1 <= 8.5e-29: tmp = t1 * ((v / u) / -u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3e+25) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 8.5e-29) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -3e+25) tmp = -v / t1; elseif (t1 <= 8.5e-29) tmp = t1 * ((v / u) / -u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3e+25], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 8.5e-29], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3 \cdot 10^{+25}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 8.5 \cdot 10^{-29}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -3.00000000000000006e25Initial program 61.7%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 87.9%
associate-*r/87.9%
neg-mul-187.9%
Simplified87.9%
if -3.00000000000000006e25 < t1 < 8.5000000000000001e-29Initial program 86.5%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 82.5%
Taylor expanded in v around 0 73.1%
mul-1-neg73.1%
associate-/l*79.1%
distribute-rgt-neg-in79.1%
Simplified79.1%
Taylor expanded in t1 around 0 81.9%
associate-/r*85.9%
distribute-neg-frac285.9%
Applied egg-rr85.9%
if 8.5000000000000001e-29 < t1 Initial program 62.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 77.7%
mul-1-neg77.7%
neg-sub077.7%
+-commutative77.7%
Applied egg-rr77.7%
neg-sub077.7%
distribute-neg-frac77.7%
Simplified77.7%
Final simplification84.4%
(FPCore (u v t1) :precision binary64 (if (<= t1 -3.75e+25) (/ (- v) t1) (if (<= t1 9e-29) (* t1 (/ (- v) (* u u))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.75e+25) {
tmp = -v / t1;
} else if (t1 <= 9e-29) {
tmp = t1 * (-v / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-3.75d+25)) then
tmp = -v / t1
else if (t1 <= 9d-29) then
tmp = t1 * (-v / (u * u))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.75e+25) {
tmp = -v / t1;
} else if (t1 <= 9e-29) {
tmp = t1 * (-v / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3.75e+25: tmp = -v / t1 elif t1 <= 9e-29: tmp = t1 * (-v / (u * u)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3.75e+25) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 9e-29) tmp = Float64(t1 * Float64(Float64(-v) / Float64(u * u))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -3.75e+25) tmp = -v / t1; elseif (t1 <= 9e-29) tmp = t1 * (-v / (u * u)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3.75e+25], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 9e-29], N[(t1 * N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.75 \cdot 10^{+25}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 9 \cdot 10^{-29}:\\
\;\;\;\;t1 \cdot \frac{-v}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -3.74999999999999996e25Initial program 61.7%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 87.9%
associate-*r/87.9%
neg-mul-187.9%
Simplified87.9%
if -3.74999999999999996e25 < t1 < 8.9999999999999996e-29Initial program 86.5%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 82.5%
Taylor expanded in v around 0 73.1%
mul-1-neg73.1%
associate-/l*79.1%
distribute-rgt-neg-in79.1%
Simplified79.1%
Taylor expanded in t1 around 0 81.9%
if 8.9999999999999996e-29 < t1 Initial program 62.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 77.7%
mul-1-neg77.7%
neg-sub077.7%
+-commutative77.7%
Applied egg-rr77.7%
neg-sub077.7%
distribute-neg-frac77.7%
Simplified77.7%
Final simplification82.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.85e+84) (not (<= u 0.25))) (* t1 (/ (/ v u) u)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.85e+84) || !(u <= 0.25)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.85d+84)) .or. (.not. (u <= 0.25d0))) then
tmp = t1 * ((v / u) / u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.85e+84) || !(u <= 0.25)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.85e+84) or not (u <= 0.25): tmp = t1 * ((v / u) / u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.85e+84) || !(u <= 0.25)) tmp = Float64(t1 * Float64(Float64(v / u) / u)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.85e+84) || ~((u <= 0.25))) tmp = t1 * ((v / u) / u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.85e+84], N[Not[LessEqual[u, 0.25]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.85 \cdot 10^{+84} \lor \neg \left(u \leq 0.25\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.85e84 or 0.25 < u Initial program 81.5%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 87.6%
Taylor expanded in v around 0 79.3%
mul-1-neg79.3%
associate-/l*81.5%
distribute-rgt-neg-in81.5%
Simplified81.5%
Taylor expanded in t1 around 0 78.1%
add-sqr-sqrt66.3%
sqrt-unprod72.9%
sqr-neg72.9%
sqrt-unprod61.0%
add-sqr-sqrt67.7%
associate-/r*67.5%
Applied egg-rr67.5%
if -1.85e84 < u < 0.25Initial program 71.1%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 69.3%
mul-1-neg69.3%
neg-sub069.3%
+-commutative69.3%
Applied egg-rr69.3%
neg-sub069.3%
distribute-neg-frac69.3%
Simplified69.3%
Final simplification68.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.95e+72) (not (<= u 4.8e+130))) (/ 1.0 (/ u v)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.95e+72) || !(u <= 4.8e+130)) {
tmp = 1.0 / (u / v);
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.95d+72)) .or. (.not. (u <= 4.8d+130))) then
tmp = 1.0d0 / (u / v)
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.95e+72) || !(u <= 4.8e+130)) {
tmp = 1.0 / (u / v);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.95e+72) or not (u <= 4.8e+130): tmp = 1.0 / (u / v) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.95e+72) || !(u <= 4.8e+130)) tmp = Float64(1.0 / Float64(u / v)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.95e+72) || ~((u <= 4.8e+130))) tmp = 1.0 / (u / v); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.95e+72], N[Not[LessEqual[u, 4.8e+130]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.95 \cdot 10^{+72} \lor \neg \left(u \leq 4.8 \cdot 10^{+130}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.9500000000000001e72 or 4.80000000000000048e130 < u Initial program 79.2%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 35.6%
Taylor expanded in t1 around 0 29.3%
associate-*r/29.3%
mul-1-neg29.3%
Simplified29.3%
add-sqr-sqrt13.3%
sqrt-unprod31.2%
sqr-neg31.2%
sqrt-unprod16.1%
add-sqr-sqrt29.7%
clear-num31.7%
inv-pow31.7%
Applied egg-rr31.7%
unpow-131.7%
Simplified31.7%
if -2.9500000000000001e72 < u < 4.80000000000000048e130Initial program 73.8%
associate-*l/81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in t1 around inf 64.3%
associate-*r/64.3%
neg-mul-164.3%
Simplified64.3%
Final simplification52.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.8e+170) (not (<= u 7.2e+131))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.8e+170) || !(u <= 7.2e+131)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.8d+170)) .or. (.not. (u <= 7.2d+131))) then
tmp = v / u
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.8e+170) || !(u <= 7.2e+131)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.8e+170) or not (u <= 7.2e+131): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.8e+170) || !(u <= 7.2e+131)) tmp = Float64(v / u); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.8e+170) || ~((u <= 7.2e+131))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.8e+170], N[Not[LessEqual[u, 7.2e+131]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.8 \cdot 10^{+170} \lor \neg \left(u \leq 7.2 \cdot 10^{+131}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.80000000000000015e170 or 7.20000000000000063e131 < u Initial program 77.1%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around inf 34.8%
Taylor expanded in t1 around 0 31.9%
associate-*r/31.9%
mul-1-neg31.9%
Simplified31.9%
div-inv31.9%
add-sqr-sqrt13.5%
sqrt-unprod31.7%
sqr-neg31.7%
sqrt-unprod18.5%
add-sqr-sqrt32.4%
Applied egg-rr32.4%
associate-*r/32.4%
*-rgt-identity32.4%
Simplified32.4%
if -2.80000000000000015e170 < u < 7.20000000000000063e131Initial program 75.3%
associate-*l/80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in t1 around inf 59.3%
associate-*r/59.3%
neg-mul-159.3%
Simplified59.3%
Final simplification52.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -6.5e+29) (not (<= t1 9.2e+167))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -6.5e+29) || !(t1 <= 9.2e+167)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-6.5d+29)) .or. (.not. (t1 <= 9.2d+167))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -6.5e+29) || !(t1 <= 9.2e+167)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -6.5e+29) or not (t1 <= 9.2e+167): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -6.5e+29) || !(t1 <= 9.2e+167)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -6.5e+29) || ~((t1 <= 9.2e+167))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -6.5e+29], N[Not[LessEqual[t1, 9.2e+167]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.5 \cdot 10^{+29} \lor \neg \left(t1 \leq 9.2 \cdot 10^{+167}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -6.49999999999999971e29 or 9.19999999999999952e167 < t1 Initial program 52.7%
associate-*l/58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in t1 around inf 88.8%
associate-*r/88.8%
neg-mul-188.8%
Simplified88.8%
neg-sub088.8%
sub-neg88.8%
add-sqr-sqrt38.4%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod22.1%
add-sqr-sqrt36.6%
Applied egg-rr36.6%
+-lft-identity36.6%
Simplified36.6%
if -6.49999999999999971e29 < t1 < 9.19999999999999952e167Initial program 85.1%
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 inf 40.4%
Taylor expanded in t1 around 0 16.8%
associate-*r/16.8%
mul-1-neg16.8%
Simplified16.8%
div-inv16.8%
add-sqr-sqrt7.8%
sqrt-unprod23.9%
sqr-neg23.9%
sqrt-unprod8.6%
add-sqr-sqrt17.5%
Applied egg-rr17.5%
associate-*r/17.5%
*-rgt-identity17.5%
Simplified17.5%
Final simplification23.0%
(FPCore (u v t1) :precision binary64 (if (<= v 1.05e-221) (/ v (+ t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if (v <= 1.05e-221) {
tmp = v / (t1 + u);
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (v <= 1.05d-221) then
tmp = v / (t1 + u)
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (v <= 1.05e-221) {
tmp = v / (t1 + u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 1.05e-221: tmp = v / (t1 + u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 1.05e-221) tmp = Float64(v / Float64(t1 + u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 1.05e-221) tmp = v / (t1 + u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 1.05e-221], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 1.05 \cdot 10^{-221}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if v < 1.05e-221Initial program 77.1%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 56.4%
associate-*r/56.4%
neg-mul-156.4%
add-sqr-sqrt45.5%
sqrt-unprod58.2%
sqr-neg58.2%
sqrt-unprod10.8%
add-sqr-sqrt28.0%
+-commutative28.0%
Applied egg-rr28.0%
if 1.05e-221 < v Initial program 74.2%
associate-*l/77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in t1 around inf 49.6%
associate-*r/49.6%
neg-mul-149.6%
Simplified49.6%
Final simplification38.0%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
return -v / (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 = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return -v / (t1 + u);
}
def code(u, v, t1): return -v / (t1 + u)
function code(u, v, t1) return Float64(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 75.8%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 54.3%
mul-1-neg54.3%
neg-sub054.3%
+-commutative54.3%
Applied egg-rr54.3%
neg-sub054.3%
distribute-neg-frac54.3%
Simplified54.3%
Final simplification54.3%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 75.8%
associate-*l/79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in t1 around inf 46.1%
associate-*r/46.1%
neg-mul-146.1%
Simplified46.1%
neg-sub046.1%
sub-neg46.1%
add-sqr-sqrt20.6%
sqrt-unprod36.5%
sqr-neg36.5%
sqrt-unprod7.2%
add-sqr-sqrt12.2%
Applied egg-rr12.2%
+-lft-identity12.2%
Simplified12.2%
herbie shell --seed 2024170
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))