
(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 17 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 (* (/ t1 (- (- t1) u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (t1 / (-t1 - u)) * (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 = (t1 / (-t1 - u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (t1 / (-t1 - u)) * (v / (t1 + u));
}
def code(u, v, t1): return (t1 / (-t1 - u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(t1 / Float64(Float64(-t1) - u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (t1 / (-t1 - u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{\left(-t1\right) - u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 73.5%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- t1) u))))
(if (<= t1 -3.8e+69)
t_1
(if (<= t1 2.25e+139)
(* t1 (/ t_1 (+ t1 u)))
(* (/ v (+ t1 u)) (/ (- u t1) t1))))))
double code(double u, double v, double t1) {
double t_1 = v / (-t1 - u);
double tmp;
if (t1 <= -3.8e+69) {
tmp = t_1;
} else if (t1 <= 2.25e+139) {
tmp = t1 * (t_1 / (t1 + u));
} else {
tmp = (v / (t1 + u)) * ((u - t1) / 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 - u)
if (t1 <= (-3.8d+69)) then
tmp = t_1
else if (t1 <= 2.25d+139) then
tmp = t1 * (t_1 / (t1 + u))
else
tmp = (v / (t1 + u)) * ((u - t1) / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (-t1 - u);
double tmp;
if (t1 <= -3.8e+69) {
tmp = t_1;
} else if (t1 <= 2.25e+139) {
tmp = t1 * (t_1 / (t1 + u));
} else {
tmp = (v / (t1 + u)) * ((u - t1) / t1);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-t1 - u) tmp = 0 if t1 <= -3.8e+69: tmp = t_1 elif t1 <= 2.25e+139: tmp = t1 * (t_1 / (t1 + u)) else: tmp = (v / (t1 + u)) * ((u - t1) / t1) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-t1) - u)) tmp = 0.0 if (t1 <= -3.8e+69) tmp = t_1; elseif (t1 <= 2.25e+139) tmp = Float64(t1 * Float64(t_1 / Float64(t1 + u))); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u - t1) / t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-t1 - u); tmp = 0.0; if (t1 <= -3.8e+69) tmp = t_1; elseif (t1 <= 2.25e+139) tmp = t1 * (t_1 / (t1 + u)); else tmp = (v / (t1 + u)) * ((u - t1) / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.8e+69], t$95$1, If[LessEqual[t1, 2.25e+139], N[(t1 * N[(t$95$1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-t1\right) - u}\\
\mathbf{if}\;t1 \leq -3.8 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 2.25 \cdot 10^{+139}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{u - t1}{t1}\\
\end{array}
\end{array}
if t1 < -3.80000000000000028e69Initial program 56.6%
associate-/l*53.7%
distribute-lft-neg-out53.7%
distribute-rgt-neg-in53.7%
associate-/r*61.7%
distribute-neg-frac261.7%
Simplified61.7%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 90.9%
mul-1-neg90.9%
Simplified90.9%
if -3.80000000000000028e69 < t1 < 2.25e139Initial program 82.4%
associate-/l*87.1%
distribute-lft-neg-out87.1%
distribute-rgt-neg-in87.1%
associate-/r*92.2%
distribute-neg-frac292.2%
Simplified92.2%
if 2.25e139 < t1 Initial program 50.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 89.7%
Taylor expanded in t1 around 0 89.7%
mul-1-neg89.7%
sub-neg89.7%
Simplified89.7%
Final simplification91.6%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -20000.0)
(/ v (- (- t1) u))
(if (<= t1 3.6e+21)
(* (/ t1 (- u)) (/ v u))
(* (/ v (+ t1 u)) (/ (- u t1) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -20000.0) {
tmp = v / (-t1 - u);
} else if (t1 <= 3.6e+21) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (v / (t1 + u)) * ((u - t1) / 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 <= (-20000.0d0)) then
tmp = v / (-t1 - u)
else if (t1 <= 3.6d+21) then
tmp = (t1 / -u) * (v / u)
else
tmp = (v / (t1 + u)) * ((u - t1) / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -20000.0) {
tmp = v / (-t1 - u);
} else if (t1 <= 3.6e+21) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (v / (t1 + u)) * ((u - t1) / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -20000.0: tmp = v / (-t1 - u) elif t1 <= 3.6e+21: tmp = (t1 / -u) * (v / u) else: tmp = (v / (t1 + u)) * ((u - t1) / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -20000.0) tmp = Float64(v / Float64(Float64(-t1) - u)); elseif (t1 <= 3.6e+21) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u - t1) / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -20000.0) tmp = v / (-t1 - u); elseif (t1 <= 3.6e+21) tmp = (t1 / -u) * (v / u); else tmp = (v / (t1 + u)) * ((u - t1) / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -20000.0], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.6e+21], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -20000:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{elif}\;t1 \leq 3.6 \cdot 10^{+21}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{u - t1}{t1}\\
\end{array}
\end{array}
if t1 < -2e4Initial program 62.0%
associate-/l*59.5%
distribute-lft-neg-out59.5%
distribute-rgt-neg-in59.5%
associate-/r*67.5%
distribute-neg-frac267.5%
Simplified67.5%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 89.6%
mul-1-neg89.6%
Simplified89.6%
if -2e4 < t1 < 3.6e21Initial program 85.9%
times-frac95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in t1 around 0 78.1%
Taylor expanded in t1 around 0 79.1%
associate-*r/79.1%
mul-1-neg79.1%
Simplified79.1%
if 3.6e21 < t1 Initial program 57.1%
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 84.4%
Taylor expanded in t1 around 0 84.4%
mul-1-neg84.4%
sub-neg84.4%
Simplified84.4%
Final simplification82.8%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -56000000.0)
(/ v (- (- t1) u))
(if (<= t1 6.5e+21)
(* (/ t1 (- u)) (/ v u))
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -56000000.0) {
tmp = v / (-t1 - u);
} else if (t1 <= 6.5e+21) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (v / (t1 + u)) * ((u / t1) + -1.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 <= (-56000000.0d0)) then
tmp = v / (-t1 - u)
else if (t1 <= 6.5d+21) then
tmp = (t1 / -u) * (v / u)
else
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -56000000.0) {
tmp = v / (-t1 - u);
} else if (t1 <= 6.5e+21) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -56000000.0: tmp = v / (-t1 - u) elif t1 <= 6.5e+21: tmp = (t1 / -u) * (v / u) else: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -56000000.0) tmp = Float64(v / Float64(Float64(-t1) - u)); elseif (t1 <= 6.5e+21) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -56000000.0) tmp = v / (-t1 - u); elseif (t1 <= 6.5e+21) tmp = (t1 / -u) * (v / u); else tmp = (v / (t1 + u)) * ((u / t1) + -1.0); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -56000000.0], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.5e+21], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -56000000:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{elif}\;t1 \leq 6.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\end{array}
\end{array}
if t1 < -5.6e7Initial program 62.0%
associate-/l*59.5%
distribute-lft-neg-out59.5%
distribute-rgt-neg-in59.5%
associate-/r*67.5%
distribute-neg-frac267.5%
Simplified67.5%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 89.6%
mul-1-neg89.6%
Simplified89.6%
if -5.6e7 < t1 < 6.5e21Initial program 85.9%
times-frac95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in t1 around 0 78.1%
Taylor expanded in t1 around 0 79.1%
associate-*r/79.1%
mul-1-neg79.1%
Simplified79.1%
if 6.5e21 < t1 Initial program 57.1%
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 84.4%
Final simplification82.8%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -25000.0)
(/ v (- (- t1) u))
(if (<= t1 5.8e-116)
(* (/ t1 (- u)) (/ v u))
(/ (/ t1 (/ (+ t1 u) v)) (- t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -25000.0) {
tmp = v / (-t1 - u);
} else if (t1 <= 5.8e-116) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (t1 / ((t1 + u) / 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 <= (-25000.0d0)) then
tmp = v / (-t1 - u)
else if (t1 <= 5.8d-116) then
tmp = (t1 / -u) * (v / u)
else
tmp = (t1 / ((t1 + u) / v)) / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -25000.0) {
tmp = v / (-t1 - u);
} else if (t1 <= 5.8e-116) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (t1 / ((t1 + u) / v)) / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -25000.0: tmp = v / (-t1 - u) elif t1 <= 5.8e-116: tmp = (t1 / -u) * (v / u) else: tmp = (t1 / ((t1 + u) / v)) / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -25000.0) tmp = Float64(v / Float64(Float64(-t1) - u)); elseif (t1 <= 5.8e-116) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(Float64(t1 / Float64(Float64(t1 + u) / v)) / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -25000.0) tmp = v / (-t1 - u); elseif (t1 <= 5.8e-116) tmp = (t1 / -u) * (v / u); else tmp = (t1 / ((t1 + u) / v)) / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -25000.0], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.8e-116], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / (-t1)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -25000:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{elif}\;t1 \leq 5.8 \cdot 10^{-116}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{\frac{t1 + u}{v}}}{-t1}\\
\end{array}
\end{array}
if t1 < -25000Initial program 62.0%
associate-/l*59.5%
distribute-lft-neg-out59.5%
distribute-rgt-neg-in59.5%
associate-/r*67.5%
distribute-neg-frac267.5%
Simplified67.5%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 89.6%
mul-1-neg89.6%
Simplified89.6%
if -25000 < t1 < 5.7999999999999996e-116Initial program 82.8%
times-frac94.7%
distribute-frac-neg94.7%
distribute-neg-frac294.7%
+-commutative94.7%
distribute-neg-in94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in t1 around 0 82.7%
Taylor expanded in t1 around 0 82.9%
associate-*r/82.9%
mul-1-neg82.9%
Simplified82.9%
if 5.7999999999999996e-116 < t1 Initial program 69.7%
associate-/l*76.7%
distribute-lft-neg-out76.7%
distribute-rgt-neg-in76.7%
associate-/r*87.2%
distribute-neg-frac287.2%
Simplified87.2%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
frac-2neg99.9%
metadata-eval99.9%
/-rgt-identity99.9%
clear-num99.2%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in t1 around inf 77.8%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -27000.0) (not (<= t1 1.45e-103))) (/ v (- (- t1) u)) (* (/ t1 (- u)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -27000.0) || !(t1 <= 1.45e-103)) {
tmp = v / (-t1 - u);
} else {
tmp = (t1 / -u) * (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 <= (-27000.0d0)) .or. (.not. (t1 <= 1.45d-103))) then
tmp = v / (-t1 - u)
else
tmp = (t1 / -u) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -27000.0) || !(t1 <= 1.45e-103)) {
tmp = v / (-t1 - u);
} else {
tmp = (t1 / -u) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -27000.0) or not (t1 <= 1.45e-103): tmp = v / (-t1 - u) else: tmp = (t1 / -u) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -27000.0) || !(t1 <= 1.45e-103)) tmp = Float64(v / Float64(Float64(-t1) - u)); else tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -27000.0) || ~((t1 <= 1.45e-103))) tmp = v / (-t1 - u); else tmp = (t1 / -u) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -27000.0], N[Not[LessEqual[t1, 1.45e-103]], $MachinePrecision]], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -27000 \lor \neg \left(t1 \leq 1.45 \cdot 10^{-103}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if t1 < -27000 or 1.4499999999999999e-103 < t1 Initial program 66.2%
associate-/l*69.3%
distribute-lft-neg-out69.3%
distribute-rgt-neg-in69.3%
associate-/r*78.8%
distribute-neg-frac278.8%
Simplified78.8%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 82.2%
mul-1-neg82.2%
Simplified82.2%
if -27000 < t1 < 1.4499999999999999e-103Initial program 83.0%
times-frac94.7%
distribute-frac-neg94.7%
distribute-neg-frac294.7%
+-commutative94.7%
distribute-neg-in94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in t1 around 0 82.8%
Taylor expanded in t1 around 0 83.1%
associate-*r/83.1%
mul-1-neg83.1%
Simplified83.1%
Final simplification82.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -150000.0) (not (<= t1 1.45e-103))) (/ v (- (- t1) u)) (* t1 (/ (/ (- v) u) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -150000.0) || !(t1 <= 1.45e-103)) {
tmp = v / (-t1 - u);
} else {
tmp = t1 * ((-v / u) / 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 <= (-150000.0d0)) .or. (.not. (t1 <= 1.45d-103))) then
tmp = v / (-t1 - u)
else
tmp = t1 * ((-v / u) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -150000.0) || !(t1 <= 1.45e-103)) {
tmp = v / (-t1 - u);
} else {
tmp = t1 * ((-v / u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -150000.0) or not (t1 <= 1.45e-103): tmp = v / (-t1 - u) else: tmp = t1 * ((-v / u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -150000.0) || !(t1 <= 1.45e-103)) tmp = Float64(v / Float64(Float64(-t1) - u)); else tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -150000.0) || ~((t1 <= 1.45e-103))) tmp = v / (-t1 - u); else tmp = t1 * ((-v / u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -150000.0], N[Not[LessEqual[t1, 1.45e-103]], $MachinePrecision]], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -150000 \lor \neg \left(t1 \leq 1.45 \cdot 10^{-103}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\end{array}
\end{array}
if t1 < -1.5e5 or 1.4499999999999999e-103 < t1 Initial program 66.2%
associate-/l*69.3%
distribute-lft-neg-out69.3%
distribute-rgt-neg-in69.3%
associate-/r*78.8%
distribute-neg-frac278.8%
Simplified78.8%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 82.2%
mul-1-neg82.2%
Simplified82.2%
if -1.5e5 < t1 < 1.4499999999999999e-103Initial program 83.0%
associate-/l*85.2%
distribute-lft-neg-out85.2%
distribute-rgt-neg-in85.2%
associate-/r*91.4%
distribute-neg-frac291.4%
Simplified91.4%
Taylor expanded in t1 around 0 81.8%
Taylor expanded in t1 around 0 82.0%
neg-mul-182.0%
Simplified82.0%
Final simplification82.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.5e-141) (not (<= t1 2.2e-111))) (/ v (- (- t1) u)) (/ v (* u (/ u t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.5e-141) || !(t1 <= 2.2e-111)) {
tmp = v / (-t1 - u);
} else {
tmp = v / (u * (u / 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 <= (-4.5d-141)) .or. (.not. (t1 <= 2.2d-111))) then
tmp = v / (-t1 - u)
else
tmp = v / (u * (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.5e-141) || !(t1 <= 2.2e-111)) {
tmp = v / (-t1 - u);
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.5e-141) or not (t1 <= 2.2e-111): tmp = v / (-t1 - u) else: tmp = v / (u * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.5e-141) || !(t1 <= 2.2e-111)) tmp = Float64(v / Float64(Float64(-t1) - u)); else tmp = Float64(v / Float64(u * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.5e-141) || ~((t1 <= 2.2e-111))) tmp = v / (-t1 - u); else tmp = v / (u * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.5e-141], N[Not[LessEqual[t1, 2.2e-111]], $MachinePrecision]], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.5 \cdot 10^{-141} \lor \neg \left(t1 \leq 2.2 \cdot 10^{-111}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -4.5e-141 or 2.2e-111 < t1 Initial program 70.4%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*80.4%
distribute-neg-frac280.4%
Simplified80.4%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 77.2%
mul-1-neg77.2%
Simplified77.2%
if -4.5e-141 < t1 < 2.2e-111Initial program 79.8%
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 86.3%
Taylor expanded in t1 around 0 86.3%
associate-*r/86.3%
mul-1-neg86.3%
Simplified86.3%
clear-num85.2%
frac-times84.1%
*-un-lft-identity84.1%
add-sqr-sqrt34.4%
sqrt-unprod47.4%
sqr-neg47.4%
sqrt-unprod27.1%
add-sqr-sqrt45.6%
Applied egg-rr45.6%
Final simplification66.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9.2e-142) (not (<= t1 2.1e-112))) (/ v (- (- t1) u)) (/ t1 (* u (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.2e-142) || !(t1 <= 2.1e-112)) {
tmp = v / (-t1 - u);
} else {
tmp = t1 / (u * (u / v));
}
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 <= (-9.2d-142)) .or. (.not. (t1 <= 2.1d-112))) then
tmp = v / (-t1 - u)
else
tmp = t1 / (u * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.2e-142) || !(t1 <= 2.1e-112)) {
tmp = v / (-t1 - u);
} else {
tmp = t1 / (u * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9.2e-142) or not (t1 <= 2.1e-112): tmp = v / (-t1 - u) else: tmp = t1 / (u * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9.2e-142) || !(t1 <= 2.1e-112)) tmp = Float64(v / Float64(Float64(-t1) - u)); else tmp = Float64(t1 / Float64(u * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -9.2e-142) || ~((t1 <= 2.1e-112))) tmp = v / (-t1 - u); else tmp = t1 / (u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9.2e-142], N[Not[LessEqual[t1, 2.1e-112]], $MachinePrecision]], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.2 \cdot 10^{-142} \lor \neg \left(t1 \leq 2.1 \cdot 10^{-112}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -9.20000000000000009e-142 or 2.1000000000000001e-112 < t1 Initial program 70.4%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*80.4%
distribute-neg-frac280.4%
Simplified80.4%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 77.2%
mul-1-neg77.2%
Simplified77.2%
if -9.20000000000000009e-142 < t1 < 2.1000000000000001e-112Initial program 79.8%
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 86.3%
Taylor expanded in t1 around 0 86.3%
associate-*r/86.3%
mul-1-neg86.3%
Simplified86.3%
*-commutative86.3%
clear-num86.2%
frac-times86.9%
*-un-lft-identity86.9%
add-sqr-sqrt38.7%
sqrt-unprod47.1%
sqr-neg47.1%
sqrt-unprod27.0%
add-sqr-sqrt45.4%
Applied egg-rr45.4%
Final simplification66.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.6e+186) (not (<= u 1.1e+161))) (/ 1.0 (/ u v)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.6e+186) || !(u <= 1.1e+161)) {
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 <= (-1.6d+186)) .or. (.not. (u <= 1.1d+161))) 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 <= -1.6e+186) || !(u <= 1.1e+161)) {
tmp = 1.0 / (u / v);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.6e+186) or not (u <= 1.1e+161): tmp = 1.0 / (u / v) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.6e+186) || !(u <= 1.1e+161)) 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 <= -1.6e+186) || ~((u <= 1.1e+161))) tmp = 1.0 / (u / v); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.6e+186], N[Not[LessEqual[u, 1.1e+161]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.6 \cdot 10^{+186} \lor \neg \left(u \leq 1.1 \cdot 10^{+161}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.6e186 or 1.1e161 < u Initial program 81.4%
Taylor expanded in t1 around inf 58.2%
associate-/l*56.8%
add-sqr-sqrt26.0%
sqrt-unprod57.3%
sqr-neg57.3%
sqrt-unprod30.9%
add-sqr-sqrt57.0%
*-commutative57.0%
Applied egg-rr57.0%
associate-*r/58.3%
*-commutative58.3%
associate-*r/57.0%
associate-/r*56.8%
*-inverses56.8%
Simplified56.8%
Taylor expanded in t1 around 0 56.8%
clear-num58.4%
inv-pow58.4%
Applied egg-rr58.4%
unpow-158.4%
Simplified58.4%
if -1.6e186 < u < 1.1e161Initial program 71.0%
associate-/l*74.5%
distribute-lft-neg-out74.5%
distribute-rgt-neg-in74.5%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
Taylor expanded in t1 around inf 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
Final simplification60.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.4e+186) (not (<= u 1.15e+161))) (/ (- v) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+186) || !(u <= 1.15e+161)) {
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 <= (-3.4d+186)) .or. (.not. (u <= 1.15d+161))) 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 <= -3.4e+186) || !(u <= 1.15e+161)) {
tmp = -v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.4e+186) or not (u <= 1.15e+161): tmp = -v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.4e+186) || !(u <= 1.15e+161)) tmp = Float64(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 <= -3.4e+186) || ~((u <= 1.15e+161))) tmp = -v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e+186], N[Not[LessEqual[u, 1.15e+161]], $MachinePrecision]], N[((-v) / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+186} \lor \neg \left(u \leq 1.15 \cdot 10^{+161}\right):\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.40000000000000005e186 or 1.15e161 < u Initial program 81.4%
associate-/l*81.7%
distribute-lft-neg-out81.7%
distribute-rgt-neg-in81.7%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
Taylor expanded in t1 around 0 89.3%
Taylor expanded in t1 around inf 57.1%
neg-mul-157.1%
distribute-neg-frac57.1%
Simplified57.1%
if -3.40000000000000005e186 < u < 1.15e161Initial program 71.0%
associate-/l*74.5%
distribute-lft-neg-out74.5%
distribute-rgt-neg-in74.5%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
Taylor expanded in t1 around inf 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
Final simplification60.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.5e+187) (not (<= u 1.15e+161))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.5e+187) || !(u <= 1.15e+161)) {
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 <= (-1.5d+187)) .or. (.not. (u <= 1.15d+161))) 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 <= -1.5e+187) || !(u <= 1.15e+161)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.5e+187) or not (u <= 1.15e+161): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.5e+187) || !(u <= 1.15e+161)) 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 <= -1.5e+187) || ~((u <= 1.15e+161))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.5e+187], N[Not[LessEqual[u, 1.15e+161]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.5 \cdot 10^{+187} \lor \neg \left(u \leq 1.15 \cdot 10^{+161}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.5e187 or 1.15e161 < u Initial program 81.4%
Taylor expanded in t1 around inf 58.2%
associate-/l*56.8%
add-sqr-sqrt26.0%
sqrt-unprod57.3%
sqr-neg57.3%
sqrt-unprod30.9%
add-sqr-sqrt57.0%
*-commutative57.0%
Applied egg-rr57.0%
associate-*r/58.3%
*-commutative58.3%
associate-*r/57.0%
associate-/r*56.8%
*-inverses56.8%
Simplified56.8%
Taylor expanded in t1 around 0 56.8%
if -1.5e187 < u < 1.15e161Initial program 71.0%
associate-/l*74.5%
distribute-lft-neg-out74.5%
distribute-rgt-neg-in74.5%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
Taylor expanded in t1 around inf 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
Final simplification60.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -350000000.0) (not (<= t1 9.2e+213))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -350000000.0) || !(t1 <= 9.2e+213)) {
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 <= (-350000000.0d0)) .or. (.not. (t1 <= 9.2d+213))) 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 <= -350000000.0) || !(t1 <= 9.2e+213)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -350000000.0) or not (t1 <= 9.2e+213): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -350000000.0) || !(t1 <= 9.2e+213)) 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 <= -350000000.0) || ~((t1 <= 9.2e+213))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -350000000.0], N[Not[LessEqual[t1, 9.2e+213]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -350000000 \lor \neg \left(t1 \leq 9.2 \cdot 10^{+213}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.5e8 or 9.19999999999999992e213 < t1 Initial program 59.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 89.5%
Taylor expanded in u around inf 34.9%
if -3.5e8 < t1 < 9.19999999999999992e213Initial program 79.0%
Taylor expanded in t1 around inf 42.6%
associate-/l*41.5%
add-sqr-sqrt9.8%
sqrt-unprod30.0%
sqr-neg30.0%
sqrt-unprod16.3%
add-sqr-sqrt22.9%
*-commutative22.9%
Applied egg-rr22.9%
associate-*r/26.6%
*-commutative26.6%
associate-*r/23.0%
associate-/r*23.0%
*-inverses23.0%
Simplified23.0%
Taylor expanded in t1 around 0 23.1%
Final simplification26.5%
(FPCore (u v t1) :precision binary64 (/ -1.0 (/ (- t1 u) v)))
double code(double u, double v, double t1) {
return -1.0 / ((t1 - u) / v);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-1.0d0) / ((t1 - u) / v)
end function
public static double code(double u, double v, double t1) {
return -1.0 / ((t1 - u) / v);
}
def code(u, v, t1): return -1.0 / ((t1 - u) / v)
function code(u, v, t1) return Float64(-1.0 / Float64(Float64(t1 - u) / v)) end
function tmp = code(u, v, t1) tmp = -1.0 / ((t1 - u) / v); end
code[u_, v_, t1_] := N[(-1.0 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{\frac{t1 - u}{v}}
\end{array}
Initial program 73.5%
Taylor expanded in t1 around inf 47.2%
associate-/l*45.5%
add-sqr-sqrt20.5%
sqrt-unprod28.7%
sqr-neg28.7%
sqrt-unprod14.0%
add-sqr-sqrt26.9%
*-commutative26.9%
Applied egg-rr26.9%
associate-*r/29.4%
*-commutative29.4%
associate-*r/26.9%
associate-/r*26.8%
*-inverses26.8%
Simplified26.8%
add-sqr-sqrt11.8%
sqrt-prod42.7%
sqr-neg42.7%
sqrt-unprod31.1%
add-sqr-sqrt60.5%
+-commutative60.5%
distribute-neg-in60.5%
sub-neg60.5%
add-sqr-sqrt32.0%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod28.1%
add-sqr-sqrt60.4%
Applied egg-rr60.4%
un-div-inv60.6%
sub-neg60.6%
add-sqr-sqrt29.5%
sqrt-unprod37.3%
sqr-neg37.3%
sqrt-unprod13.9%
add-sqr-sqrt26.8%
+-commutative26.8%
clear-num27.2%
frac-2neg27.2%
metadata-eval27.2%
distribute-neg-frac27.2%
distribute-neg-in27.2%
add-sqr-sqrt13.1%
sqrt-unprod39.6%
sqr-neg39.6%
sqrt-unprod30.9%
add-sqr-sqrt60.7%
sub-neg60.7%
Applied egg-rr60.7%
(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(v / Float64(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}{\left(-t1\right) - u}
\end{array}
Initial program 73.5%
associate-/l*76.3%
distribute-lft-neg-out76.3%
distribute-rgt-neg-in76.3%
associate-/r*84.3%
distribute-neg-frac284.3%
Simplified84.3%
associate-*r/97.2%
neg-mul-197.2%
associate-/r*97.2%
Applied egg-rr97.2%
Taylor expanded in t1 around inf 60.7%
mul-1-neg60.7%
Simplified60.7%
Final simplification60.7%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - 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 / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 73.5%
Taylor expanded in t1 around inf 47.2%
associate-/l*45.5%
add-sqr-sqrt20.5%
sqrt-unprod28.7%
sqr-neg28.7%
sqrt-unprod14.0%
add-sqr-sqrt26.9%
*-commutative26.9%
Applied egg-rr26.9%
associate-*r/29.4%
*-commutative29.4%
associate-*r/26.9%
associate-/r*26.8%
*-inverses26.8%
Simplified26.8%
add-sqr-sqrt11.8%
sqrt-prod42.7%
sqr-neg42.7%
sqrt-unprod31.1%
add-sqr-sqrt60.5%
+-commutative60.5%
distribute-neg-in60.5%
sub-neg60.5%
add-sqr-sqrt32.0%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod28.1%
add-sqr-sqrt60.4%
Applied egg-rr60.4%
Taylor expanded in v around 0 60.6%
(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 73.5%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in t1 around inf 52.7%
Taylor expanded in u around inf 13.8%
herbie shell --seed 2024146
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))