
(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 (* (/ (- 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(Float64(-t1) / 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}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 68.8%
times-frac99.6%
distribute-frac-neg99.6%
distribute-neg-frac299.6%
+-commutative99.6%
distribute-neg-in99.6%
unsub-neg99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ v (- (* (+ t1 u) (+ t1 u)))))))
(if (<= t1 -8.8e+92)
(/ v (- u t1))
(if (<= t1 -1.9e-124)
t_1
(if (<= t1 3e-163)
(* (/ t1 (- u)) (/ v u))
(if (<= t1 2.4e+124) t_1 (* (/ v (+ t1 u)) (+ (/ u t1) -1.0))))))))
double code(double u, double v, double t1) {
double t_1 = t1 * (v / -((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -8.8e+92) {
tmp = v / (u - t1);
} else if (t1 <= -1.9e-124) {
tmp = t_1;
} else if (t1 <= 3e-163) {
tmp = (t1 / -u) * (v / u);
} else if (t1 <= 2.4e+124) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t1 * (v / -((t1 + u) * (t1 + u)))
if (t1 <= (-8.8d+92)) then
tmp = v / (u - t1)
else if (t1 <= (-1.9d-124)) then
tmp = t_1
else if (t1 <= 3d-163) then
tmp = (t1 / -u) * (v / u)
else if (t1 <= 2.4d+124) then
tmp = t_1
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 t_1 = t1 * (v / -((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -8.8e+92) {
tmp = v / (u - t1);
} else if (t1 <= -1.9e-124) {
tmp = t_1;
} else if (t1 <= 3e-163) {
tmp = (t1 / -u) * (v / u);
} else if (t1 <= 2.4e+124) {
tmp = t_1;
} else {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * (v / -((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -8.8e+92: tmp = v / (u - t1) elif t1 <= -1.9e-124: tmp = t_1 elif t1 <= 3e-163: tmp = (t1 / -u) * (v / u) elif t1 <= 2.4e+124: tmp = t_1 else: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(v / Float64(-Float64(Float64(t1 + u) * Float64(t1 + u))))) tmp = 0.0 if (t1 <= -8.8e+92) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -1.9e-124) tmp = t_1; elseif (t1 <= 3e-163) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); elseif (t1 <= 2.4e+124) tmp = t_1; 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) t_1 = t1 * (v / -((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -8.8e+92) tmp = v / (u - t1); elseif (t1 <= -1.9e-124) tmp = t_1; elseif (t1 <= 3e-163) tmp = (t1 / -u) * (v / u); elseif (t1 <= 2.4e+124) tmp = t_1; else tmp = (v / (t1 + u)) * ((u / t1) + -1.0); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(v / (-N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -8.8e+92], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.9e-124], t$95$1, If[LessEqual[t1, 3e-163], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.4e+124], t$95$1, N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{v}{-\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -8.8 \cdot 10^{+92}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -1.9 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 3 \cdot 10^{-163}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{elif}\;t1 \leq 2.4 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\end{array}
\end{array}
if t1 < -8.79999999999999969e92Initial program 56.3%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 87.9%
*-commutative87.9%
clear-num86.5%
frac-times73.9%
*-un-lft-identity73.9%
add-sqr-sqrt38.1%
sqrt-unprod74.0%
sqr-neg74.0%
sqrt-unprod35.9%
add-sqr-sqrt74.0%
Applied egg-rr74.0%
associate-/l/86.7%
associate-/r/88.0%
/-rgt-identity88.0%
times-frac88.1%
*-rgt-identity88.1%
associate-*r/88.1%
times-frac56.3%
*-commutative56.3%
times-frac88.1%
*-inverses88.1%
*-lft-identity88.1%
Simplified88.1%
if -8.79999999999999969e92 < t1 < -1.90000000000000006e-124 or 3.0000000000000002e-163 < t1 < 2.40000000000000006e124Initial program 83.8%
associate-/l*89.0%
Simplified89.0%
if -1.90000000000000006e-124 < t1 < 3.0000000000000002e-163Initial program 71.7%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around 0 88.4%
Taylor expanded in t1 around 0 89.0%
associate-*r/89.0%
mul-1-neg89.0%
Simplified89.0%
if 2.40000000000000006e124 < t1 Initial program 38.6%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.4%
Final simplification89.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ t1 u))))
(if (<= t1 -3.8e+200)
(/ v (- u t1))
(if (<= t1 3.4e+124)
(* t1 (/ t_1 (- (- u) t1)))
(* t_1 (+ (/ u t1) -1.0))))))
double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if (t1 <= -3.8e+200) {
tmp = v / (u - t1);
} else if (t1 <= 3.4e+124) {
tmp = t1 * (t_1 / (-u - t1));
} else {
tmp = t_1 * ((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) :: t_1
real(8) :: tmp
t_1 = v / (t1 + u)
if (t1 <= (-3.8d+200)) then
tmp = v / (u - t1)
else if (t1 <= 3.4d+124) then
tmp = t1 * (t_1 / (-u - t1))
else
tmp = t_1 * ((u / t1) + (-1.0d0))
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+200) {
tmp = v / (u - t1);
} else if (t1 <= 3.4e+124) {
tmp = t1 * (t_1 / (-u - t1));
} else {
tmp = t_1 * ((u / t1) + -1.0);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (t1 + u) tmp = 0 if t1 <= -3.8e+200: tmp = v / (u - t1) elif t1 <= 3.4e+124: tmp = t1 * (t_1 / (-u - t1)) else: tmp = t_1 * ((u / t1) + -1.0) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(t1 + u)) tmp = 0.0 if (t1 <= -3.8e+200) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 3.4e+124) tmp = Float64(t1 * Float64(t_1 / Float64(Float64(-u) - t1))); else tmp = Float64(t_1 * Float64(Float64(u / t1) + -1.0)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (t1 + u); tmp = 0.0; if (t1 <= -3.8e+200) tmp = v / (u - t1); elseif (t1 <= 3.4e+124) tmp = t1 * (t_1 / (-u - t1)); else tmp = t_1 * ((u / t1) + -1.0); 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+200], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.4e+124], N[(t1 * N[(t$95$1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -3.8 \cdot 10^{+200}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 3.4 \cdot 10^{+124}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\frac{u}{t1} + -1\right)\\
\end{array}
\end{array}
if t1 < -3.79999999999999982e200Initial program 48.3%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 96.0%
*-commutative96.0%
clear-num93.3%
frac-times65.8%
*-un-lft-identity65.8%
add-sqr-sqrt39.6%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod26.2%
add-sqr-sqrt65.8%
Applied egg-rr65.8%
associate-/l/93.7%
associate-/r/96.3%
/-rgt-identity96.3%
times-frac96.3%
*-rgt-identity96.3%
associate-*r/96.3%
times-frac48.3%
*-commutative48.3%
times-frac96.3%
*-inverses96.3%
*-lft-identity96.3%
Simplified96.3%
if -3.79999999999999982e200 < t1 < 3.4e124Initial program 77.3%
associate-/l*82.5%
Simplified82.5%
associate-/r*91.3%
div-inv91.1%
Applied egg-rr91.1%
associate-*r/91.3%
*-rgt-identity91.3%
Simplified91.3%
if 3.4e124 < t1 Initial program 38.6%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.4%
Final simplification91.8%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -8e+32)
(/ v (- u t1))
(if (<= t1 5.6e-46)
(* (/ t1 (- u)) (/ v u))
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8e+32) {
tmp = v / (u - t1);
} else if (t1 <= 5.6e-46) {
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 <= (-8d+32)) then
tmp = v / (u - t1)
else if (t1 <= 5.6d-46) 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 <= -8e+32) {
tmp = v / (u - t1);
} else if (t1 <= 5.6e-46) {
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 <= -8e+32: tmp = v / (u - t1) elif t1 <= 5.6e-46: 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 <= -8e+32) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 5.6e-46) 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 <= -8e+32) tmp = v / (u - t1); elseif (t1 <= 5.6e-46) 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, -8e+32], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.6e-46], 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 -8 \cdot 10^{+32}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-46}:\\
\;\;\;\;\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 < -8.00000000000000043e32Initial program 64.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 86.9%
*-commutative86.9%
clear-num85.8%
frac-times76.7%
*-un-lft-identity76.7%
add-sqr-sqrt42.7%
sqrt-unprod78.3%
sqr-neg78.3%
sqrt-unprod34.1%
add-sqr-sqrt76.7%
Applied egg-rr76.7%
associate-/l/85.9%
associate-/r/86.9%
/-rgt-identity86.9%
times-frac87.0%
*-rgt-identity87.0%
associate-*r/87.0%
times-frac62.7%
*-commutative62.7%
times-frac87.0%
*-inverses87.0%
*-lft-identity87.0%
Simplified87.0%
if -8.00000000000000043e32 < t1 < 5.5999999999999997e-46Initial program 78.8%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around 0 80.1%
Taylor expanded in t1 around 0 81.5%
associate-*r/81.5%
mul-1-neg81.5%
Simplified81.5%
if 5.5999999999999997e-46 < t1 Initial program 53.7%
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 81.2%
Final simplification82.7%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.5e+33)
(/ v (- u t1))
(if (<= t1 4.5e-46)
(* (/ t1 (- u)) (/ v u))
(* (/ (- t1) (+ t1 u)) (/ v t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.5e+33) {
tmp = v / (u - t1);
} else if (t1 <= 4.5e-46) {
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 <= (-1.5d+33)) then
tmp = v / (u - t1)
else if (t1 <= 4.5d-46) 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 <= -1.5e+33) {
tmp = v / (u - t1);
} else if (t1 <= 4.5e-46) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (-t1 / (t1 + u)) * (v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.5e+33: tmp = v / (u - t1) elif t1 <= 4.5e-46: tmp = (t1 / -u) * (v / u) else: tmp = (-t1 / (t1 + u)) * (v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.5e+33) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 4.5e-46) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.5e+33) tmp = v / (u - t1); elseif (t1 <= 4.5e-46) tmp = (t1 / -u) * (v / u); else tmp = (-t1 / (t1 + u)) * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.5e+33], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.5e-46], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.5 \cdot 10^{+33}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 4.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{t1 + u} \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -1.49999999999999992e33Initial program 64.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 86.9%
*-commutative86.9%
clear-num85.8%
frac-times76.7%
*-un-lft-identity76.7%
add-sqr-sqrt42.7%
sqrt-unprod78.3%
sqr-neg78.3%
sqrt-unprod34.1%
add-sqr-sqrt76.7%
Applied egg-rr76.7%
associate-/l/85.9%
associate-/r/86.9%
/-rgt-identity86.9%
times-frac87.0%
*-rgt-identity87.0%
associate-*r/87.0%
times-frac62.7%
*-commutative62.7%
times-frac87.0%
*-inverses87.0%
*-lft-identity87.0%
Simplified87.0%
if -1.49999999999999992e33 < t1 < 4.50000000000000001e-46Initial program 78.8%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around 0 80.1%
Taylor expanded in t1 around 0 81.5%
associate-*r/81.5%
mul-1-neg81.5%
Simplified81.5%
if 4.50000000000000001e-46 < t1 Initial program 53.7%
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 81.0%
Final simplification82.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 -8e+32) (/ v (- u t1)) (if (<= t1 7.5e-46) (* (/ t1 (- u)) (/ v u)) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8e+32) {
tmp = v / (u - t1);
} else if (t1 <= 7.5e-46) {
tmp = (t1 / -u) * (v / 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 <= (-8d+32)) then
tmp = v / (u - t1)
else if (t1 <= 7.5d-46) then
tmp = (t1 / -u) * (v / 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 <= -8e+32) {
tmp = v / (u - t1);
} else if (t1 <= 7.5e-46) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -8e+32: tmp = v / (u - t1) elif t1 <= 7.5e-46: tmp = (t1 / -u) * (v / u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -8e+32) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 7.5e-46) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / 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 <= -8e+32) tmp = v / (u - t1); elseif (t1 <= 7.5e-46) tmp = (t1 / -u) * (v / u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -8e+32], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 7.5e-46], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8 \cdot 10^{+32}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 7.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -8.00000000000000043e32Initial program 64.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 86.9%
*-commutative86.9%
clear-num85.8%
frac-times76.7%
*-un-lft-identity76.7%
add-sqr-sqrt42.7%
sqrt-unprod78.3%
sqr-neg78.3%
sqrt-unprod34.1%
add-sqr-sqrt76.7%
Applied egg-rr76.7%
associate-/l/85.9%
associate-/r/86.9%
/-rgt-identity86.9%
times-frac87.0%
*-rgt-identity87.0%
associate-*r/87.0%
times-frac62.7%
*-commutative62.7%
times-frac87.0%
*-inverses87.0%
*-lft-identity87.0%
Simplified87.0%
if -8.00000000000000043e32 < t1 < 7.50000000000000027e-46Initial program 78.8%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around 0 80.1%
Taylor expanded in t1 around 0 81.5%
associate-*r/81.5%
mul-1-neg81.5%
Simplified81.5%
if 7.50000000000000027e-46 < t1 Initial program 53.7%
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 81.0%
Taylor expanded in v around 0 81.0%
associate-*r/81.0%
mul-1-neg81.0%
Simplified81.0%
Final simplification82.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 -8.2e+32) (/ v (- u t1)) (if (<= t1 3.2e-46) (* t1 (/ (/ v u) (- u))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8.2e+32) {
tmp = v / (u - t1);
} else if (t1 <= 3.2e-46) {
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 <= (-8.2d+32)) then
tmp = v / (u - t1)
else if (t1 <= 3.2d-46) 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 <= -8.2e+32) {
tmp = v / (u - t1);
} else if (t1 <= 3.2e-46) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -8.2e+32: tmp = v / (u - t1) elif t1 <= 3.2e-46: tmp = t1 * ((v / u) / -u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -8.2e+32) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 3.2e-46) 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 <= -8.2e+32) tmp = v / (u - t1); elseif (t1 <= 3.2e-46) tmp = t1 * ((v / u) / -u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -8.2e+32], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.2e-46], 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 -8.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 3.2 \cdot 10^{-46}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -8.19999999999999961e32Initial program 64.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 86.9%
*-commutative86.9%
clear-num85.8%
frac-times76.7%
*-un-lft-identity76.7%
add-sqr-sqrt42.7%
sqrt-unprod78.3%
sqr-neg78.3%
sqrt-unprod34.1%
add-sqr-sqrt76.7%
Applied egg-rr76.7%
associate-/l/85.9%
associate-/r/86.9%
/-rgt-identity86.9%
times-frac87.0%
*-rgt-identity87.0%
associate-*r/87.0%
times-frac62.7%
*-commutative62.7%
times-frac87.0%
*-inverses87.0%
*-lft-identity87.0%
Simplified87.0%
if -8.19999999999999961e32 < t1 < 3.1999999999999999e-46Initial program 78.8%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around 0 80.1%
Taylor expanded in t1 around 0 81.5%
associate-*r/81.5%
mul-1-neg81.5%
Simplified81.5%
*-commutative81.5%
clear-num81.5%
frac-times78.0%
*-un-lft-identity78.0%
add-sqr-sqrt39.9%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod19.2%
add-sqr-sqrt40.0%
Applied egg-rr40.0%
frac-2neg40.0%
distribute-rgt-neg-out40.0%
div-inv40.0%
associate-/r*40.0%
clear-num40.0%
add-sqr-sqrt17.6%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod38.7%
add-sqr-sqrt78.1%
Applied egg-rr78.1%
if 3.1999999999999999e-46 < t1 Initial program 53.7%
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 81.0%
Taylor expanded in v around 0 81.0%
associate-*r/81.0%
mul-1-neg81.0%
Simplified81.0%
Final simplification81.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.75e+179) (not (<= u 1.85e+128))) (/ t1 (* u (/ u v))) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.75e+179) || !(u <= 1.85e+128)) {
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 ((u <= (-1.75d+179)) .or. (.not. (u <= 1.85d+128))) 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 ((u <= -1.75e+179) || !(u <= 1.85e+128)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.75e+179) or not (u <= 1.85e+128): tmp = t1 / (u * (u / v)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.75e+179) || !(u <= 1.85e+128)) tmp = Float64(t1 / Float64(u * Float64(u / v))); 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.75e+179) || ~((u <= 1.85e+128))) tmp = t1 / (u * (u / v)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.75e+179], N[Not[LessEqual[u, 1.85e+128]], $MachinePrecision]], 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}\;u \leq -1.75 \cdot 10^{+179} \lor \neg \left(u \leq 1.85 \cdot 10^{+128}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.75000000000000007e179 or 1.85e128 < u Initial program 81.7%
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 0 94.1%
Taylor expanded in t1 around 0 94.0%
associate-*r/94.0%
mul-1-neg94.0%
Simplified94.0%
*-commutative94.0%
clear-num94.0%
frac-times87.3%
*-un-lft-identity87.3%
add-sqr-sqrt44.2%
sqrt-unprod66.3%
sqr-neg66.3%
sqrt-unprod37.9%
add-sqr-sqrt80.7%
Applied egg-rr80.7%
if -1.75000000000000007e179 < u < 1.85e128Initial program 63.7%
times-frac99.6%
distribute-frac-neg99.6%
distribute-neg-frac299.6%
+-commutative99.6%
distribute-neg-in99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t1 around inf 66.6%
Taylor expanded in v around 0 66.1%
associate-*r/66.1%
mul-1-neg66.1%
Simplified66.1%
Final simplification70.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -8.6e+194) (not (<= u 2.9e+129))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.6e+194) || !(u <= 2.9e+129)) {
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 <= (-8.6d+194)) .or. (.not. (u <= 2.9d+129))) 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 <= -8.6e+194) || !(u <= 2.9e+129)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -8.6e+194) or not (u <= 2.9e+129): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -8.6e+194) || !(u <= 2.9e+129)) tmp = Float64(v / Float64(-u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -8.6e+194) || ~((u <= 2.9e+129))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -8.6e+194], N[Not[LessEqual[u, 2.9e+129]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.6 \cdot 10^{+194} \lor \neg \left(u \leq 2.9 \cdot 10^{+129}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -8.59999999999999988e194 or 2.90000000000000003e129 < u Initial program 81.7%
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 0 96.4%
Taylor expanded in t1 around inf 38.6%
associate-*r/38.6%
mul-1-neg38.6%
Simplified38.6%
if -8.59999999999999988e194 < u < 2.90000000000000003e129Initial program 64.1%
associate-/l*69.5%
Simplified69.5%
Taylor expanded in t1 around inf 64.4%
associate-*r/64.4%
neg-mul-164.4%
Simplified64.4%
Final simplification57.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.15e+192) (not (<= u 8.2e+128))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e+192) || !(u <= 8.2e+128)) {
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.15d+192)) .or. (.not. (u <= 8.2d+128))) 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.15e+192) || !(u <= 8.2e+128)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.15e+192) or not (u <= 8.2e+128): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.15e+192) || !(u <= 8.2e+128)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.15e+192) || ~((u <= 8.2e+128))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.15e+192], N[Not[LessEqual[u, 8.2e+128]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+192} \lor \neg \left(u \leq 8.2 \cdot 10^{+128}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.15e192 or 8.20000000000000023e128 < u Initial program 80.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 0 96.4%
Taylor expanded in t1 around inf 38.1%
associate-*r/38.1%
mul-1-neg38.1%
Simplified38.1%
add-sqr-sqrt23.0%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod15.3%
add-sqr-sqrt38.1%
*-un-lft-identity38.1%
Applied egg-rr38.1%
*-lft-identity38.1%
Simplified38.1%
if -1.15e192 < u < 8.20000000000000023e128Initial program 64.5%
associate-/l*69.8%
Simplified69.8%
Taylor expanded in t1 around inf 64.7%
associate-*r/64.7%
neg-mul-164.7%
Simplified64.7%
Final simplification57.5%
(FPCore (u v t1) :precision binary64 (if (<= u -7e+192) (/ 1.0 (/ u v)) (if (<= u 8e+129) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -7e+192) {
tmp = 1.0 / (u / v);
} else if (u <= 8e+129) {
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 (u <= (-7d+192)) then
tmp = 1.0d0 / (u / v)
else if (u <= 8d+129) 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 (u <= -7e+192) {
tmp = 1.0 / (u / v);
} else if (u <= 8e+129) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -7e+192: tmp = 1.0 / (u / v) elif u <= 8e+129: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -7e+192) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 8e+129) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -7e+192) tmp = 1.0 / (u / v); elseif (u <= 8e+129) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -7e+192], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 8e+129], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7 \cdot 10^{+192}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 8 \cdot 10^{+129}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -6.99999999999999965e192Initial program 84.3%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around 0 96.9%
Taylor expanded in t1 around inf 44.1%
associate-*r/44.1%
mul-1-neg44.1%
Simplified44.1%
clear-num45.3%
inv-pow45.3%
add-sqr-sqrt35.9%
sqrt-unprod45.0%
sqr-neg45.0%
sqrt-unprod9.5%
add-sqr-sqrt45.2%
Applied egg-rr45.2%
unpow-145.2%
Simplified45.2%
if -6.99999999999999965e192 < u < 8e129Initial program 64.5%
associate-/l*69.8%
Simplified69.8%
Taylor expanded in t1 around inf 64.7%
associate-*r/64.7%
neg-mul-164.7%
Simplified64.7%
if 8e129 < u Initial program 77.9%
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 0 96.1%
Taylor expanded in t1 around inf 33.8%
associate-*r/33.8%
mul-1-neg33.8%
Simplified33.8%
Final simplification57.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -6e+61) (not (<= t1 2.3e+130))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -6e+61) || !(t1 <= 2.3e+130)) {
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 <= (-6d+61)) .or. (.not. (t1 <= 2.3d+130))) 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 <= -6e+61) || !(t1 <= 2.3e+130)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -6e+61) or not (t1 <= 2.3e+130): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -6e+61) || !(t1 <= 2.3e+130)) 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 <= -6e+61) || ~((t1 <= 2.3e+130))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -6e+61], N[Not[LessEqual[t1, 2.3e+130]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6 \cdot 10^{+61} \lor \neg \left(t1 \leq 2.3 \cdot 10^{+130}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -6e61 or 2.30000000000000021e130 < t1 Initial program 50.6%
associate-/l*51.0%
Simplified51.0%
Taylor expanded in t1 around inf 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
neg-sub087.6%
sub-neg87.6%
add-sqr-sqrt37.9%
sqrt-unprod51.0%
sqr-neg51.0%
sqrt-unprod18.7%
add-sqr-sqrt35.8%
Applied egg-rr35.8%
+-lft-identity35.8%
Simplified35.8%
if -6e61 < t1 < 2.30000000000000021e130Initial program 78.3%
times-frac99.5%
distribute-frac-neg99.5%
distribute-neg-frac299.5%
+-commutative99.5%
distribute-neg-in99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in t1 around 0 71.2%
Taylor expanded in t1 around inf 17.9%
associate-*r/17.9%
mul-1-neg17.9%
Simplified17.9%
add-sqr-sqrt10.5%
sqrt-unprod21.9%
sqr-neg21.9%
sqrt-unprod7.4%
add-sqr-sqrt17.3%
*-un-lft-identity17.3%
Applied egg-rr17.3%
*-lft-identity17.3%
Simplified17.3%
Final simplification23.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(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 68.8%
times-frac99.6%
distribute-frac-neg99.6%
distribute-neg-frac299.6%
+-commutative99.6%
distribute-neg-in99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t1 around inf 62.3%
Taylor expanded in v around 0 59.2%
associate-*r/59.2%
mul-1-neg59.2%
Simplified59.2%
(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 68.8%
times-frac99.6%
distribute-frac-neg99.6%
distribute-neg-frac299.6%
+-commutative99.6%
distribute-neg-in99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t1 around inf 62.3%
*-commutative62.3%
clear-num61.9%
frac-times50.4%
*-un-lft-identity50.4%
add-sqr-sqrt26.3%
sqrt-unprod56.3%
sqr-neg56.3%
sqrt-unprod24.1%
add-sqr-sqrt49.9%
Applied egg-rr49.9%
associate-/l/61.8%
associate-/r/66.4%
/-rgt-identity66.4%
times-frac69.0%
*-rgt-identity69.0%
associate-*r/61.8%
times-frac43.1%
*-commutative43.1%
times-frac58.7%
*-inverses58.7%
*-lft-identity58.7%
Simplified58.7%
(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 68.8%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in t1 around inf 51.0%
associate-*r/51.0%
neg-mul-151.0%
Simplified51.0%
neg-sub051.0%
sub-neg51.0%
add-sqr-sqrt21.8%
sqrt-unprod31.1%
sqr-neg31.1%
sqrt-unprod7.6%
add-sqr-sqrt14.6%
Applied egg-rr14.6%
+-lft-identity14.6%
Simplified14.6%
herbie shell --seed 2024154
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))