
(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 12 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}
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.65e-48) (not (<= t1 5.5e+26))) (/ v (- (* u -2.0) t1)) (* (/ v u) (/ (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.65e-48) || !(t1 <= 5.5e+26)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v / u) * (-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 <= (-2.65d-48)) .or. (.not. (t1 <= 5.5d+26))) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = (v / u) * (-t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.65e-48) || !(t1 <= 5.5e+26)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.65e-48) or not (t1 <= 5.5e+26): tmp = v / ((u * -2.0) - t1) else: tmp = (v / u) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.65e-48) || !(t1 <= 5.5e+26)) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.65e-48) || ~((t1 <= 5.5e+26))) tmp = v / ((u * -2.0) - t1); else tmp = (v / u) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.65e-48], N[Not[LessEqual[t1, 5.5e+26]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.65 \cdot 10^{-48} \lor \neg \left(t1 \leq 5.5 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.5e-48) (not (<= t1 4e+26))) (/ v (- (* u -2.0) t1)) (/ (* t1 (/ v u)) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e-48) || !(t1 <= 4e+26)) {
tmp = v / ((u * -2.0) - t1);
} 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 <= (-2.5d-48)) .or. (.not. (t1 <= 4d+26))) then
tmp = v / ((u * (-2.0d0)) - t1)
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 <= -2.5e-48) || !(t1 <= 4e+26)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.5e-48) or not (t1 <= 4e+26): tmp = v / ((u * -2.0) - t1) else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.5e-48) || !(t1 <= 4e+26)) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.5e-48) || ~((t1 <= 4e+26))) tmp = v / ((u * -2.0) - t1); else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.5e-48], N[Not[LessEqual[t1, 4e+26]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{-48} \lor \neg \left(t1 \leq 4 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.32e-48) (not (<= t1 4e+26))) (/ v (- (* u -2.0) t1)) (/ (/ t1 (/ u v)) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.32e-48) || !(t1 <= 4e+26)) {
tmp = v / ((u * -2.0) - t1);
} 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 <= (-1.32d-48)) .or. (.not. (t1 <= 4d+26))) then
tmp = v / ((u * (-2.0d0)) - t1)
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 <= -1.32e-48) || !(t1 <= 4e+26)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 / (u / v)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.32e-48) or not (t1 <= 4e+26): tmp = v / ((u * -2.0) - t1) else: tmp = (t1 / (u / v)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.32e-48) || !(t1 <= 4e+26)) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.32e-48) || ~((t1 <= 4e+26))) tmp = v / ((u * -2.0) - t1); else tmp = (t1 / (u / v)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.32e-48], N[Not[LessEqual[t1, 4e+26]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.32 \cdot 10^{-48} \lor \neg \left(t1 \leq 4 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (or (<= u -9e+93) (not (<= u 1.3e+185))) (/ t1 (/ (* t1 u) v)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9e+93) || !(u <= 1.3e+185)) {
tmp = t1 / ((t1 * 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 <= (-9d+93)) .or. (.not. (u <= 1.3d+185))) then
tmp = t1 / ((t1 * 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 <= -9e+93) || !(u <= 1.3e+185)) {
tmp = t1 / ((t1 * u) / v);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9e+93) or not (u <= 1.3e+185): tmp = t1 / ((t1 * u) / v) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9e+93) || !(u <= 1.3e+185)) tmp = Float64(t1 / Float64(Float64(t1 * u) / v)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9e+93) || ~((u <= 1.3e+185))) tmp = t1 / ((t1 * u) / v); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9e+93], N[Not[LessEqual[u, 1.3e+185]], $MachinePrecision]], N[(t1 / N[(N[(t1 * u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9 \cdot 10^{+93} \lor \neg \left(u \leq 1.3 \cdot 10^{+185}\right):\\
\;\;\;\;\frac{t1}{\frac{t1 \cdot u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (<= u -5.95e+199) (* (/ v u) -0.5) (if (<= u 1.85e+171) (/ (- v) t1) (/ (* v 0.5) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.95e+199) {
tmp = (v / u) * -0.5;
} else if (u <= 1.85e+171) {
tmp = -v / t1;
} else {
tmp = (v * 0.5) / 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 <= (-5.95d+199)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 1.85d+171) then
tmp = -v / t1
else
tmp = (v * 0.5d0) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5.95e+199) {
tmp = (v / u) * -0.5;
} else if (u <= 1.85e+171) {
tmp = -v / t1;
} else {
tmp = (v * 0.5) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.95e+199: tmp = (v / u) * -0.5 elif u <= 1.85e+171: tmp = -v / t1 else: tmp = (v * 0.5) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.95e+199) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 1.85e+171) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v * 0.5) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.95e+199) tmp = (v / u) * -0.5; elseif (u <= 1.85e+171) tmp = -v / t1; else tmp = (v * 0.5) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.95e+199], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 1.85e+171], N[((-v) / t1), $MachinePrecision], N[(N[(v * 0.5), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.95 \cdot 10^{+199}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 1.85 \cdot 10^{+171}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot 0.5}{u}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.95e+199) (not (<= u 1.16e+176))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.95e+199) || !(u <= 1.16e+176)) {
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 <= (-5.95d+199)) .or. (.not. (u <= 1.16d+176))) 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 <= -5.95e+199) || !(u <= 1.16e+176)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.95e+199) or not (u <= 1.16e+176): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.95e+199) || !(u <= 1.16e+176)) 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 <= -5.95e+199) || ~((u <= 1.16e+176))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.95e+199], N[Not[LessEqual[u, 1.16e+176]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.95 \cdot 10^{+199} \lor \neg \left(u \leq 1.16 \cdot 10^{+176}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (<= u -5.95e+199) (/ (- v) u) (if (<= u 6e+167) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.95e+199) {
tmp = -v / u;
} else if (u <= 6e+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 (u <= (-5.95d+199)) then
tmp = -v / u
else if (u <= 6d+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 (u <= -5.95e+199) {
tmp = -v / u;
} else if (u <= 6e+167) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.95e+199: tmp = -v / u elif u <= 6e+167: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.95e+199) tmp = Float64(Float64(-v) / u); elseif (u <= 6e+167) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.95e+199) tmp = -v / u; elseif (u <= 6e+167) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.95e+199], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 6e+167], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.95 \cdot 10^{+199}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 6 \cdot 10^{+167}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (<= u -5.95e+199) (* (/ v u) -0.5) (if (<= u 3.6e+176) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.95e+199) {
tmp = (v / u) * -0.5;
} else if (u <= 3.6e+176) {
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 <= (-5.95d+199)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 3.6d+176) 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 <= -5.95e+199) {
tmp = (v / u) * -0.5;
} else if (u <= 3.6e+176) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.95e+199: tmp = (v / u) * -0.5 elif u <= 3.6e+176: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.95e+199) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 3.6e+176) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.95e+199) tmp = (v / u) * -0.5; elseif (u <= 3.6e+176) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.95e+199], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 3.6e+176], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.95 \cdot 10^{+199}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 3.6 \cdot 10^{+176}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.8e+122) (not (<= t1 3.15e+211))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.8e+122) || !(t1 <= 3.15e+211)) {
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 <= (-4.8d+122)) .or. (.not. (t1 <= 3.15d+211))) 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 <= -4.8e+122) || !(t1 <= 3.15e+211)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.8e+122) or not (t1 <= 3.15e+211): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.8e+122) || !(t1 <= 3.15e+211)) 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 <= -4.8e+122) || ~((t1 <= 3.15e+211))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.8e+122], N[Not[LessEqual[t1, 3.15e+211]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.8 \cdot 10^{+122} \lor \neg \left(t1 \leq 3.15 \cdot 10^{+211}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
(FPCore (u v t1) :precision binary64 (/ v (- (* u -2.0) t1)))
double code(double u, double v, double t1) {
return v / ((u * -2.0) - 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 * (-2.0d0)) - t1)
end function
public static double code(double u, double v, double t1) {
return v / ((u * -2.0) - t1);
}
def code(u, v, t1): return v / ((u * -2.0) - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(u * -2.0) - t1)) end
function tmp = code(u, v, t1) tmp = v / ((u * -2.0) - t1); end
code[u_, v_, t1_] := N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u \cdot -2 - t1}
\end{array}
(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}
herbie shell --seed 2023347
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))