
(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 (/ v (+ t1 u))) -1.0) (+ t1 u)))
double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (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))) / (-1.0d0)) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u);
}
def code(u, v, t1): return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / -1.0) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1 \cdot \frac{v}{t1 + u}}{-1}}{t1 + u}
\end{array}
Initial program 70.6%
associate-/l*69.2%
distribute-lft-neg-out69.2%
distribute-rgt-neg-in69.2%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
associate-*r/97.9%
neg-mul-197.9%
associate-/r*97.9%
Applied egg-rr97.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)) (t_2 (/ v t_1)))
(if (<= t1 -2e+122)
t_2
(if (<= t1 1.55e-211)
(* t1 (/ t_2 (+ t1 u)))
(if (<= t1 4.3e+154) (* v (/ t1 (* (+ t1 u) t_1))) (/ v (- t1)))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / t_1;
double tmp;
if (t1 <= -2e+122) {
tmp = t_2;
} else if (t1 <= 1.55e-211) {
tmp = t1 * (t_2 / (t1 + u));
} else if (t1 <= 4.3e+154) {
tmp = v * (t1 / ((t1 + u) * t_1));
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -u - t1
t_2 = v / t_1
if (t1 <= (-2d+122)) then
tmp = t_2
else if (t1 <= 1.55d-211) then
tmp = t1 * (t_2 / (t1 + u))
else if (t1 <= 4.3d+154) then
tmp = v * (t1 / ((t1 + u) * t_1))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / t_1;
double tmp;
if (t1 <= -2e+122) {
tmp = t_2;
} else if (t1 <= 1.55e-211) {
tmp = t1 * (t_2 / (t1 + u));
} else if (t1 <= 4.3e+154) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 t_2 = v / t_1 tmp = 0 if t1 <= -2e+122: tmp = t_2 elif t1 <= 1.55e-211: tmp = t1 * (t_2 / (t1 + u)) elif t1 <= 4.3e+154: tmp = v * (t1 / ((t1 + u) * t_1)) else: tmp = v / -t1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) t_2 = Float64(v / t_1) tmp = 0.0 if (t1 <= -2e+122) tmp = t_2; elseif (t1 <= 1.55e-211) tmp = Float64(t1 * Float64(t_2 / Float64(t1 + u))); elseif (t1 <= 4.3e+154) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; t_2 = v / t_1; tmp = 0.0; if (t1 <= -2e+122) tmp = t_2; elseif (t1 <= 1.55e-211) tmp = t1 * (t_2 / (t1 + u)); elseif (t1 <= 4.3e+154) tmp = v * (t1 / ((t1 + u) * t_1)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, Block[{t$95$2 = N[(v / t$95$1), $MachinePrecision]}, If[LessEqual[t1, -2e+122], t$95$2, If[LessEqual[t1, 1.55e-211], N[(t1 * N[(t$95$2 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.3e+154], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
t_2 := \frac{v}{t\_1}\\
\mathbf{if}\;t1 \leq -2 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq 1.55 \cdot 10^{-211}:\\
\;\;\;\;t1 \cdot \frac{t\_2}{t1 + u}\\
\mathbf{elif}\;t1 \leq 4.3 \cdot 10^{+154}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if t1 < -2.00000000000000003e122Initial program 44.9%
associate-/l*39.9%
distribute-lft-neg-out39.9%
distribute-rgt-neg-in39.9%
associate-/r*68.4%
distribute-neg-frac268.4%
Simplified68.4%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.2%
mul-1-neg87.2%
Simplified87.2%
if -2.00000000000000003e122 < t1 < 1.54999999999999998e-211Initial program 82.3%
associate-/l*85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
associate-/r*92.4%
distribute-neg-frac292.4%
Simplified92.4%
if 1.54999999999999998e-211 < t1 < 4.2999999999999998e154Initial program 87.0%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
if 4.2999999999999998e154 < t1 Initial program 24.7%
associate-/l*26.3%
distribute-lft-neg-out26.3%
distribute-rgt-neg-in26.3%
associate-/r*61.7%
distribute-neg-frac261.7%
Simplified61.7%
Taylor expanded in t1 around inf 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
Final simplification90.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- u) t1))))
(if (<= t1 -4.6e+120)
t_1
(if (<= t1 5.5e+154) (* t1 (/ t_1 (+ t1 u))) (/ v (- t1))))))
double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double tmp;
if (t1 <= -4.6e+120) {
tmp = t_1;
} else if (t1 <= 5.5e+154) {
tmp = t1 * (t_1 / (t1 + u));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / (-u - t1)
if (t1 <= (-4.6d+120)) then
tmp = t_1
else if (t1 <= 5.5d+154) then
tmp = t1 * (t_1 / (t1 + u))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double tmp;
if (t1 <= -4.6e+120) {
tmp = t_1;
} else if (t1 <= 5.5e+154) {
tmp = t1 * (t_1 / (t1 + u));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-u - t1) tmp = 0 if t1 <= -4.6e+120: tmp = t_1 elif t1 <= 5.5e+154: tmp = t1 * (t_1 / (t1 + u)) else: tmp = v / -t1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-u) - t1)) tmp = 0.0 if (t1 <= -4.6e+120) tmp = t_1; elseif (t1 <= 5.5e+154) tmp = Float64(t1 * Float64(t_1 / Float64(t1 + u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-u - t1); tmp = 0.0; if (t1 <= -4.6e+120) tmp = t_1; elseif (t1 <= 5.5e+154) tmp = t1 * (t_1 / (t1 + u)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -4.6e+120], t$95$1, If[LessEqual[t1, 5.5e+154], N[(t1 * N[(t$95$1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-u\right) - t1}\\
\mathbf{if}\;t1 \leq -4.6 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 5.5 \cdot 10^{+154}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if t1 < -4.59999999999999985e120Initial program 44.9%
associate-/l*39.9%
distribute-lft-neg-out39.9%
distribute-rgt-neg-in39.9%
associate-/r*68.4%
distribute-neg-frac268.4%
Simplified68.4%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.2%
mul-1-neg87.2%
Simplified87.2%
if -4.59999999999999985e120 < t1 < 5.5000000000000006e154Initial program 84.1%
associate-/l*83.1%
distribute-lft-neg-out83.1%
distribute-rgt-neg-in83.1%
associate-/r*89.5%
distribute-neg-frac289.5%
Simplified89.5%
if 5.5000000000000006e154 < t1 Initial program 24.7%
associate-/l*26.3%
distribute-lft-neg-out26.3%
distribute-rgt-neg-in26.3%
associate-/r*61.7%
distribute-neg-frac261.7%
Simplified61.7%
Taylor expanded in t1 around inf 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
Final simplification89.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ v u))) (t_2 (- (- u) t1)))
(if (<= u -1.7e+42)
(/ t_1 t_2)
(if (<= u 2.7e+16) (/ (* v (/ t1 t_2)) t1) (* t_1 (/ -1.0 u))))))
double code(double u, double v, double t1) {
double t_1 = t1 * (v / u);
double t_2 = -u - t1;
double tmp;
if (u <= -1.7e+42) {
tmp = t_1 / t_2;
} else if (u <= 2.7e+16) {
tmp = (v * (t1 / t_2)) / t1;
} else {
tmp = t_1 * (-1.0 / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t1 * (v / u)
t_2 = -u - t1
if (u <= (-1.7d+42)) then
tmp = t_1 / t_2
else if (u <= 2.7d+16) then
tmp = (v * (t1 / t_2)) / t1
else
tmp = t_1 * ((-1.0d0) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 * (v / u);
double t_2 = -u - t1;
double tmp;
if (u <= -1.7e+42) {
tmp = t_1 / t_2;
} else if (u <= 2.7e+16) {
tmp = (v * (t1 / t_2)) / t1;
} else {
tmp = t_1 * (-1.0 / u);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * (v / u) t_2 = -u - t1 tmp = 0 if u <= -1.7e+42: tmp = t_1 / t_2 elif u <= 2.7e+16: tmp = (v * (t1 / t_2)) / t1 else: tmp = t_1 * (-1.0 / u) return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(v / u)) t_2 = Float64(Float64(-u) - t1) tmp = 0.0 if (u <= -1.7e+42) tmp = Float64(t_1 / t_2); elseif (u <= 2.7e+16) tmp = Float64(Float64(v * Float64(t1 / t_2)) / t1); else tmp = Float64(t_1 * Float64(-1.0 / u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 * (v / u); t_2 = -u - t1; tmp = 0.0; if (u <= -1.7e+42) tmp = t_1 / t_2; elseif (u <= 2.7e+16) tmp = (v * (t1 / t_2)) / t1; else tmp = t_1 * (-1.0 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[u, -1.7e+42], N[(t$95$1 / t$95$2), $MachinePrecision], If[LessEqual[u, 2.7e+16], N[(N[(v * N[(t1 / t$95$2), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[(t$95$1 * N[(-1.0 / u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{v}{u}\\
t_2 := \left(-u\right) - t1\\
\mathbf{if}\;u \leq -1.7 \cdot 10^{+42}:\\
\;\;\;\;\frac{t\_1}{t\_2}\\
\mathbf{elif}\;u \leq 2.7 \cdot 10^{+16}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{t\_2}}{t1}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{-1}{u}\\
\end{array}
\end{array}
if u < -1.69999999999999988e42Initial program 77.0%
associate-/l*74.2%
distribute-lft-neg-out74.2%
distribute-rgt-neg-in74.2%
associate-/r*87.4%
distribute-neg-frac287.4%
Simplified87.4%
associate-*r/99.8%
neg-mul-199.8%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around 0 86.0%
mul-1-neg86.0%
associate-*r/90.9%
distribute-rgt-neg-in90.9%
mul-1-neg90.9%
associate-*r/90.9%
mul-1-neg90.9%
Simplified90.9%
if -1.69999999999999988e42 < u < 2.7e16Initial program 64.3%
associate-/l*63.2%
distribute-lft-neg-out63.2%
distribute-rgt-neg-in63.2%
associate-/r*77.5%
distribute-neg-frac277.5%
Simplified77.5%
distribute-frac-neg277.5%
distribute-rgt-neg-out77.5%
associate-/r*63.2%
distribute-lft-neg-out63.2%
associate-/l*64.3%
times-frac96.7%
frac-2neg96.7%
associate-*r/98.3%
add-sqr-sqrt49.7%
sqrt-unprod32.9%
sqr-neg32.9%
sqrt-unprod6.8%
add-sqr-sqrt12.7%
add-sqr-sqrt7.2%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-prod47.1%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
Taylor expanded in t1 around inf 78.9%
if 2.7e16 < u Initial program 80.0%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*90.8%
distribute-neg-frac290.8%
Simplified90.8%
Taylor expanded in t1 around 0 82.7%
Taylor expanded in t1 around 0 82.2%
associate-*r/84.7%
add-sqr-sqrt0.0%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod59.7%
add-sqr-sqrt59.7%
Applied egg-rr59.7%
add-sqr-sqrt38.2%
sqrt-unprod71.3%
sqr-neg71.3%
distribute-frac-neg71.3%
distribute-frac-neg71.3%
sqrt-unprod60.7%
add-sqr-sqrt84.7%
distribute-frac-neg84.7%
distribute-rgt-neg-in84.7%
neg-mul-184.7%
*-commutative84.7%
associate-/l*84.8%
Applied egg-rr84.8%
Final simplification82.5%
(FPCore (u v t1) :precision binary64 (if (<= u -5e-79) (/ (/ (/ t1 (/ u v)) -1.0) u) (if (<= u 8.8e+14) (/ v (- t1)) (* (* t1 (/ v u)) (/ -1.0 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5e-79) {
tmp = ((t1 / (u / v)) / -1.0) / u;
} else if (u <= 8.8e+14) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / u)) * (-1.0 / 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 <= (-5d-79)) then
tmp = ((t1 / (u / v)) / (-1.0d0)) / u
else if (u <= 8.8d+14) then
tmp = v / -t1
else
tmp = (t1 * (v / u)) * ((-1.0d0) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5e-79) {
tmp = ((t1 / (u / v)) / -1.0) / u;
} else if (u <= 8.8e+14) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / u)) * (-1.0 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5e-79: tmp = ((t1 / (u / v)) / -1.0) / u elif u <= 8.8e+14: tmp = v / -t1 else: tmp = (t1 * (v / u)) * (-1.0 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5e-79) tmp = Float64(Float64(Float64(t1 / Float64(u / v)) / -1.0) / u); elseif (u <= 8.8e+14) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) * Float64(-1.0 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5e-79) tmp = ((t1 / (u / v)) / -1.0) / u; elseif (u <= 8.8e+14) tmp = v / -t1; else tmp = (t1 * (v / u)) * (-1.0 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5e-79], N[(N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[u, 8.8e+14], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{-79}:\\
\;\;\;\;\frac{\frac{\frac{t1}{\frac{u}{v}}}{-1}}{u}\\
\mathbf{elif}\;u \leq 8.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\left(t1 \cdot \frac{v}{u}\right) \cdot \frac{-1}{u}\\
\end{array}
\end{array}
if u < -4.99999999999999999e-79Initial program 74.0%
associate-/l*72.3%
distribute-lft-neg-out72.3%
distribute-rgt-neg-in72.3%
associate-/r*86.0%
distribute-neg-frac286.0%
Simplified86.0%
Taylor expanded in t1 around 0 75.0%
Taylor expanded in t1 around 0 72.1%
associate-*r/76.9%
neg-mul-176.9%
associate-/r*76.9%
Applied egg-rr76.9%
Taylor expanded in t1 around 0 71.3%
*-rgt-identity71.3%
times-frac70.0%
/-rgt-identity70.0%
associate-/r/78.0%
Simplified78.0%
if -4.99999999999999999e-79 < u < 8.8e14Initial program 63.4%
associate-/l*62.0%
distribute-lft-neg-out62.0%
distribute-rgt-neg-in62.0%
associate-/r*76.3%
distribute-neg-frac276.3%
Simplified76.3%
Taylor expanded in t1 around inf 82.6%
associate-*r/82.6%
neg-mul-182.6%
Simplified82.6%
if 8.8e14 < u Initial program 80.0%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*90.8%
distribute-neg-frac290.8%
Simplified90.8%
Taylor expanded in t1 around 0 82.7%
Taylor expanded in t1 around 0 82.2%
associate-*r/84.7%
add-sqr-sqrt0.0%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod59.7%
add-sqr-sqrt59.7%
Applied egg-rr59.7%
add-sqr-sqrt38.2%
sqrt-unprod71.3%
sqr-neg71.3%
distribute-frac-neg71.3%
distribute-frac-neg71.3%
sqrt-unprod60.7%
add-sqr-sqrt84.7%
distribute-frac-neg84.7%
distribute-rgt-neg-in84.7%
neg-mul-184.7%
*-commutative84.7%
associate-/l*84.8%
Applied egg-rr84.8%
Final simplification81.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ v u))))
(if (<= u -4.1e-55)
(/ t_1 (- u))
(if (<= u 9.4e+14) (/ v (- t1)) (* t_1 (/ -1.0 u))))))
double code(double u, double v, double t1) {
double t_1 = t1 * (v / u);
double tmp;
if (u <= -4.1e-55) {
tmp = t_1 / -u;
} else if (u <= 9.4e+14) {
tmp = v / -t1;
} else {
tmp = t_1 * (-1.0 / 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) :: t_1
real(8) :: tmp
t_1 = t1 * (v / u)
if (u <= (-4.1d-55)) then
tmp = t_1 / -u
else if (u <= 9.4d+14) then
tmp = v / -t1
else
tmp = t_1 * ((-1.0d0) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 * (v / u);
double tmp;
if (u <= -4.1e-55) {
tmp = t_1 / -u;
} else if (u <= 9.4e+14) {
tmp = v / -t1;
} else {
tmp = t_1 * (-1.0 / u);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * (v / u) tmp = 0 if u <= -4.1e-55: tmp = t_1 / -u elif u <= 9.4e+14: tmp = v / -t1 else: tmp = t_1 * (-1.0 / u) return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(v / u)) tmp = 0.0 if (u <= -4.1e-55) tmp = Float64(t_1 / Float64(-u)); elseif (u <= 9.4e+14) tmp = Float64(v / Float64(-t1)); else tmp = Float64(t_1 * Float64(-1.0 / u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 * (v / u); tmp = 0.0; if (u <= -4.1e-55) tmp = t_1 / -u; elseif (u <= 9.4e+14) tmp = v / -t1; else tmp = t_1 * (-1.0 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.1e-55], N[(t$95$1 / (-u)), $MachinePrecision], If[LessEqual[u, 9.4e+14], N[(v / (-t1)), $MachinePrecision], N[(t$95$1 * N[(-1.0 / u), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -4.1 \cdot 10^{-55}:\\
\;\;\;\;\frac{t\_1}{-u}\\
\mathbf{elif}\;u \leq 9.4 \cdot 10^{+14}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{-1}{u}\\
\end{array}
\end{array}
if u < -4.0999999999999998e-55Initial program 74.3%
associate-/l*74.0%
distribute-lft-neg-out74.0%
distribute-rgt-neg-in74.0%
associate-/r*86.8%
distribute-neg-frac286.8%
Simplified86.8%
Taylor expanded in t1 around 0 76.8%
Taylor expanded in t1 around 0 73.7%
associate-*r/78.8%
neg-mul-178.8%
associate-/r*78.8%
Applied egg-rr78.8%
frac-2neg78.8%
metadata-eval78.8%
/-rgt-identity78.8%
*-commutative78.8%
distribute-rgt-neg-in78.8%
Applied egg-rr78.8%
if -4.0999999999999998e-55 < u < 9.4e14Initial program 63.5%
associate-/l*61.3%
distribute-lft-neg-out61.3%
distribute-rgt-neg-in61.3%
associate-/r*76.1%
distribute-neg-frac276.1%
Simplified76.1%
Taylor expanded in t1 around inf 81.5%
associate-*r/81.5%
neg-mul-181.5%
Simplified81.5%
if 9.4e14 < u Initial program 80.0%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*90.8%
distribute-neg-frac290.8%
Simplified90.8%
Taylor expanded in t1 around 0 82.7%
Taylor expanded in t1 around 0 82.2%
associate-*r/84.7%
add-sqr-sqrt0.0%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod59.7%
add-sqr-sqrt59.7%
Applied egg-rr59.7%
add-sqr-sqrt38.2%
sqrt-unprod71.3%
sqr-neg71.3%
distribute-frac-neg71.3%
distribute-frac-neg71.3%
sqrt-unprod60.7%
add-sqr-sqrt84.7%
distribute-frac-neg84.7%
distribute-rgt-neg-in84.7%
neg-mul-184.7%
*-commutative84.7%
associate-/l*84.8%
Applied egg-rr84.8%
Final simplification81.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.4e-55) (not (<= u 8.8e+14))) (/ (* t1 (/ v u)) (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.4e-55) || !(u <= 8.8e+14)) {
tmp = (t1 * (v / u)) / -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 <= (-4.4d-55)) .or. (.not. (u <= 8.8d+14))) then
tmp = (t1 * (v / u)) / -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 <= -4.4e-55) || !(u <= 8.8e+14)) {
tmp = (t1 * (v / u)) / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.4e-55) or not (u <= 8.8e+14): tmp = (t1 * (v / u)) / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.4e-55) || !(u <= 8.8e+14)) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4.4e-55) || ~((u <= 8.8e+14))) tmp = (t1 * (v / u)) / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.4e-55], N[Not[LessEqual[u, 8.8e+14]], $MachinePrecision]], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.4 \cdot 10^{-55} \lor \neg \left(u \leq 8.8 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.3999999999999999e-55 or 8.8e14 < u Initial program 77.2%
associate-/l*76.5%
distribute-lft-neg-out76.5%
distribute-rgt-neg-in76.5%
associate-/r*88.8%
distribute-neg-frac288.8%
Simplified88.8%
Taylor expanded in t1 around 0 79.8%
Taylor expanded in t1 around 0 78.1%
associate-*r/81.8%
neg-mul-181.8%
associate-/r*81.8%
Applied egg-rr81.8%
frac-2neg81.8%
metadata-eval81.8%
/-rgt-identity81.8%
*-commutative81.8%
distribute-rgt-neg-in81.8%
Applied egg-rr81.8%
if -4.3999999999999999e-55 < u < 8.8e14Initial program 63.5%
associate-/l*61.3%
distribute-lft-neg-out61.3%
distribute-rgt-neg-in61.3%
associate-/r*76.1%
distribute-neg-frac276.1%
Simplified76.1%
Taylor expanded in t1 around inf 81.5%
associate-*r/81.5%
neg-mul-181.5%
Simplified81.5%
Final simplification81.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.3e-55) (not (<= u 2.2e+15))) (* t1 (/ (/ v (- u)) u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.3e-55) || !(u <= 2.2e+15)) {
tmp = t1 * ((v / -u) / u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.3d-55)) .or. (.not. (u <= 2.2d+15))) then
tmp = t1 * ((v / -u) / u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.3e-55) || !(u <= 2.2e+15)) {
tmp = t1 * ((v / -u) / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.3e-55) or not (u <= 2.2e+15): tmp = t1 * ((v / -u) / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.3e-55) || !(u <= 2.2e+15)) tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.3e-55) || ~((u <= 2.2e+15))) tmp = t1 * ((v / -u) / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.3e-55], N[Not[LessEqual[u, 2.2e+15]], $MachinePrecision]], N[(t1 * N[(N[(v / (-u)), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{-55} \lor \neg \left(u \leq 2.2 \cdot 10^{+15}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.30000000000000011e-55 or 2.2e15 < u Initial program 77.2%
associate-/l*76.5%
distribute-lft-neg-out76.5%
distribute-rgt-neg-in76.5%
associate-/r*88.8%
distribute-neg-frac288.8%
Simplified88.8%
Taylor expanded in t1 around 0 79.8%
Taylor expanded in t1 around 0 78.1%
if -2.30000000000000011e-55 < u < 2.2e15Initial program 63.5%
associate-/l*61.3%
distribute-lft-neg-out61.3%
distribute-rgt-neg-in61.3%
associate-/r*76.1%
distribute-neg-frac276.1%
Simplified76.1%
Taylor expanded in t1 around inf 81.5%
associate-*r/81.5%
neg-mul-181.5%
Simplified81.5%
Final simplification79.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5e+44) (not (<= u 3.9e+16))) (/ t1 (/ u (/ v u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5e+44) || !(u <= 3.9e+16)) {
tmp = t1 / (u / (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 <= (-5d+44)) .or. (.not. (u <= 3.9d+16))) then
tmp = t1 / (u / (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 <= -5e+44) || !(u <= 3.9e+16)) {
tmp = t1 / (u / (v / u));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5e+44) or not (u <= 3.9e+16): tmp = t1 / (u / (v / u)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5e+44) || !(u <= 3.9e+16)) tmp = Float64(t1 / Float64(u / 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 <= -5e+44) || ~((u <= 3.9e+16))) tmp = t1 / (u / (v / u)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5e+44], N[Not[LessEqual[u, 3.9e+16]], $MachinePrecision]], N[(t1 / N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{+44} \lor \neg \left(u \leq 3.9 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{t1}{\frac{u}{\frac{v}{u}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.9999999999999996e44 or 3.9e16 < u Initial program 78.8%
associate-/l*77.1%
distribute-lft-neg-out77.1%
distribute-rgt-neg-in77.1%
associate-/r*89.5%
distribute-neg-frac289.5%
Simplified89.5%
Taylor expanded in t1 around 0 82.8%
Taylor expanded in t1 around 0 82.5%
clear-num82.0%
un-div-inv82.1%
add-sqr-sqrt31.7%
sqrt-unprod65.9%
sqr-neg65.9%
sqrt-unprod37.5%
add-sqr-sqrt60.5%
Applied egg-rr60.5%
if -4.9999999999999996e44 < u < 3.9e16Initial program 64.3%
associate-/l*63.2%
distribute-lft-neg-out63.2%
distribute-rgt-neg-in63.2%
associate-/r*77.5%
distribute-neg-frac277.5%
Simplified77.5%
Taylor expanded in t1 around inf 76.9%
associate-*r/76.9%
neg-mul-176.9%
Simplified76.9%
Final simplification69.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.2e+43) (not (<= u 2.6e+16))) (* (/ v u) (/ t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+43) || !(u <= 2.6e+16)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.2d+43)) .or. (.not. (u <= 2.6d+16))) then
tmp = (v / u) * (t1 / u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+43) || !(u <= 2.6e+16)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.2e+43) or not (u <= 2.6e+16): tmp = (v / u) * (t1 / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.2e+43) || !(u <= 2.6e+16)) tmp = Float64(Float64(v / u) * Float64(t1 / u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.2e+43) || ~((u <= 2.6e+16))) tmp = (v / u) * (t1 / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.2e+43], N[Not[LessEqual[u, 2.6e+16]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+43} \lor \neg \left(u \leq 2.6 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.20000000000000012e43 or 2.6e16 < u Initial program 78.8%
associate-/l*77.1%
distribute-lft-neg-out77.1%
distribute-rgt-neg-in77.1%
associate-/r*89.5%
distribute-neg-frac289.5%
Simplified89.5%
Taylor expanded in t1 around 0 82.8%
Taylor expanded in t1 around 0 82.5%
associate-*r/87.0%
add-sqr-sqrt35.0%
sqrt-unprod67.4%
sqr-neg67.4%
sqrt-unprod36.6%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
*-commutative59.5%
associate-/l*59.6%
Applied egg-rr59.6%
if -1.20000000000000012e43 < u < 2.6e16Initial program 64.3%
associate-/l*63.2%
distribute-lft-neg-out63.2%
distribute-rgt-neg-in63.2%
associate-/r*77.5%
distribute-neg-frac277.5%
Simplified77.5%
Taylor expanded in t1 around inf 76.9%
associate-*r/76.9%
neg-mul-176.9%
Simplified76.9%
Final simplification69.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= v 3.4e+205)
(* (/ v (+ t1 u)) (/ t1 t_1))
(* t1 (/ (/ v t_1) (+ t1 u))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (v <= 3.4e+205) {
tmp = (v / (t1 + u)) * (t1 / t_1);
} else {
tmp = t1 * ((v / t_1) / (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) :: t_1
real(8) :: tmp
t_1 = -u - t1
if (v <= 3.4d+205) then
tmp = (v / (t1 + u)) * (t1 / t_1)
else
tmp = t1 * ((v / t_1) / (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (v <= 3.4e+205) {
tmp = (v / (t1 + u)) * (t1 / t_1);
} else {
tmp = t1 * ((v / t_1) / (t1 + u));
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if v <= 3.4e+205: tmp = (v / (t1 + u)) * (t1 / t_1) else: tmp = t1 * ((v / t_1) / (t1 + u)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (v <= 3.4e+205) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / t_1)); else tmp = Float64(t1 * Float64(Float64(v / t_1) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (v <= 3.4e+205) tmp = (v / (t1 + u)) * (t1 / t_1); else tmp = t1 * ((v / t_1) / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[v, 3.4e+205], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / t$95$1), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;v \leq 3.4 \cdot 10^{+205}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t\_1}}{t1 + u}\\
\end{array}
\end{array}
if v < 3.4e205Initial program 72.2%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
if 3.4e205 < v Initial program 51.7%
associate-/l*48.0%
distribute-lft-neg-out48.0%
distribute-rgt-neg-in48.0%
associate-/r*85.9%
distribute-neg-frac285.9%
Simplified85.9%
Final simplification96.6%
(FPCore (u v t1) :precision binary64 (if (<= u -9.5e+112) (/ 1.0 (/ u v)) (if (<= u 1.6e+136) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9.5e+112) {
tmp = 1.0 / (u / v);
} else if (u <= 1.6e+136) {
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 <= (-9.5d+112)) then
tmp = 1.0d0 / (u / v)
else if (u <= 1.6d+136) 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 <= -9.5e+112) {
tmp = 1.0 / (u / v);
} else if (u <= 1.6e+136) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9.5e+112: tmp = 1.0 / (u / v) elif u <= 1.6e+136: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9.5e+112) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 1.6e+136) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -9.5e+112) tmp = 1.0 / (u / v); elseif (u <= 1.6e+136) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9.5e+112], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.6e+136], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{+112}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.6 \cdot 10^{+136}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -9.5000000000000008e112Initial program 76.8%
associate-/l*77.2%
distribute-lft-neg-out77.2%
distribute-rgt-neg-in77.2%
associate-/r*92.9%
distribute-neg-frac292.9%
Simplified92.9%
Taylor expanded in t1 around 0 90.0%
Taylor expanded in t1 around inf 25.0%
associate-*r/25.0%
mul-1-neg25.0%
Simplified25.0%
add-sqr-sqrt20.8%
sqrt-unprod51.4%
distribute-frac-neg51.4%
distribute-frac-neg51.4%
sqr-neg51.4%
sqrt-unprod20.9%
add-sqr-sqrt25.5%
clear-num27.9%
inv-pow27.9%
Applied egg-rr27.9%
unpow-127.9%
Simplified27.9%
if -9.5000000000000008e112 < u < 1.59999999999999994e136Initial program 68.0%
associate-/l*65.9%
distribute-lft-neg-out65.9%
distribute-rgt-neg-in65.9%
associate-/r*79.2%
distribute-neg-frac279.2%
Simplified79.2%
Taylor expanded in t1 around inf 65.8%
associate-*r/65.8%
neg-mul-165.8%
Simplified65.8%
if 1.59999999999999994e136 < u Initial program 77.9%
associate-/l*78.4%
distribute-lft-neg-out78.4%
distribute-rgt-neg-in78.4%
associate-/r*90.9%
distribute-neg-frac290.9%
Simplified90.9%
Taylor expanded in t1 around 0 84.5%
Taylor expanded in t1 around inf 41.7%
associate-*r/41.7%
mul-1-neg41.7%
Simplified41.7%
add-sqr-sqrt40.8%
sqrt-unprod53.5%
distribute-frac-neg53.5%
distribute-frac-neg53.5%
sqr-neg53.5%
sqrt-unprod40.2%
add-sqr-sqrt41.8%
div-inv41.8%
Applied egg-rr41.8%
associate-*r/41.8%
*-rgt-identity41.8%
Simplified41.8%
Final simplification57.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.15e+232) (not (<= t1 2.8e+185))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.15e+232) || !(t1 <= 2.8e+185)) {
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 <= (-2.15d+232)) .or. (.not. (t1 <= 2.8d+185))) 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 <= -2.15e+232) || !(t1 <= 2.8e+185)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.15e+232) or not (t1 <= 2.8e+185): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.15e+232) || !(t1 <= 2.8e+185)) 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 <= -2.15e+232) || ~((t1 <= 2.8e+185))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.15e+232], N[Not[LessEqual[t1, 2.8e+185]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.15 \cdot 10^{+232} \lor \neg \left(t1 \leq 2.8 \cdot 10^{+185}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.1500000000000001e232 or 2.79999999999999982e185 < t1 Initial program 44.8%
associate-/l*46.4%
distribute-lft-neg-out46.4%
distribute-rgt-neg-in46.4%
associate-/r*64.4%
distribute-neg-frac264.4%
Simplified64.4%
Taylor expanded in t1 around inf 91.5%
associate-*r/91.5%
neg-mul-191.5%
Simplified91.5%
*-un-lft-identity91.5%
*-commutative91.5%
add-sqr-sqrt50.2%
sqrt-unprod63.5%
sqr-neg63.5%
sqrt-unprod13.6%
add-sqr-sqrt45.4%
Applied egg-rr45.4%
*-rgt-identity45.4%
Simplified45.4%
if -2.1500000000000001e232 < t1 < 2.79999999999999982e185Initial program 74.3%
associate-/l*72.5%
distribute-lft-neg-out72.5%
distribute-rgt-neg-in72.5%
associate-/r*85.3%
distribute-neg-frac285.3%
Simplified85.3%
Taylor expanded in t1 around 0 54.4%
Taylor expanded in t1 around inf 16.2%
associate-*r/16.2%
mul-1-neg16.2%
Simplified16.2%
add-sqr-sqrt13.9%
sqrt-unprod26.4%
distribute-frac-neg26.4%
distribute-frac-neg26.4%
sqr-neg26.4%
sqrt-unprod11.9%
add-sqr-sqrt14.5%
div-inv14.5%
Applied egg-rr14.5%
associate-*r/14.5%
*-rgt-identity14.5%
Simplified14.5%
Final simplification18.4%
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (+ t1 u))) (- (- u) t1)))
double code(double u, double v, double t1) {
return (v * (t1 / (t1 + u))) / (-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 * (t1 / (t1 + u))) / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (t1 + u))) / (-u - t1);
}
def code(u, v, t1): return (v * (t1 / (t1 + u))) / (-u - t1)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(t1 + u))) / Float64(Float64(-u) - t1)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (t1 + u))) / (-u - t1); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{t1 + u}}{\left(-u\right) - t1}
\end{array}
Initial program 70.6%
associate-/l*69.2%
distribute-lft-neg-out69.2%
distribute-rgt-neg-in69.2%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
distribute-frac-neg282.7%
distribute-rgt-neg-out82.7%
associate-/r*69.2%
distribute-lft-neg-out69.2%
associate-/l*70.6%
times-frac95.5%
frac-2neg95.5%
associate-*r/96.4%
add-sqr-sqrt46.7%
sqrt-unprod44.8%
sqr-neg44.8%
sqrt-unprod18.5%
add-sqr-sqrt33.6%
add-sqr-sqrt14.2%
sqrt-unprod53.4%
sqr-neg53.4%
sqrt-prod50.1%
add-sqr-sqrt96.4%
Applied egg-rr96.4%
Final simplification96.4%
(FPCore (u v t1) :precision binary64 (if (<= u 8.2e+138) (/ v (- t1)) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (u <= 8.2e+138) {
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 <= 8.2d+138) 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 <= 8.2e+138) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 8.2e+138: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 8.2e+138) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 8.2e+138) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 8.2e+138], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 8.2 \cdot 10^{+138}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < 8.19999999999999961e138Initial program 69.2%
associate-/l*67.5%
distribute-lft-neg-out67.5%
distribute-rgt-neg-in67.5%
associate-/r*81.1%
distribute-neg-frac281.1%
Simplified81.1%
Taylor expanded in t1 around inf 58.5%
associate-*r/58.5%
neg-mul-158.5%
Simplified58.5%
if 8.19999999999999961e138 < u Initial program 77.9%
associate-/l*78.4%
distribute-lft-neg-out78.4%
distribute-rgt-neg-in78.4%
associate-/r*90.9%
distribute-neg-frac290.9%
Simplified90.9%
Taylor expanded in t1 around 0 84.5%
Taylor expanded in t1 around inf 41.7%
associate-*r/41.7%
mul-1-neg41.7%
Simplified41.7%
add-sqr-sqrt40.8%
sqrt-unprod53.5%
distribute-frac-neg53.5%
distribute-frac-neg53.5%
sqr-neg53.5%
sqrt-unprod40.2%
add-sqr-sqrt41.8%
div-inv41.8%
Applied egg-rr41.8%
associate-*r/41.8%
*-rgt-identity41.8%
Simplified41.8%
Final simplification55.8%
(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(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}{\left(-u\right) - t1}
\end{array}
Initial program 70.6%
associate-/l*69.2%
distribute-lft-neg-out69.2%
distribute-rgt-neg-in69.2%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
associate-*r/97.9%
neg-mul-197.9%
associate-/r*97.9%
Applied egg-rr97.9%
Taylor expanded in t1 around inf 59.6%
mul-1-neg59.6%
Simplified59.6%
Final simplification59.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 70.6%
associate-/l*69.2%
distribute-lft-neg-out69.2%
distribute-rgt-neg-in69.2%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
Taylor expanded in t1 around inf 52.7%
associate-*r/52.7%
neg-mul-152.7%
Simplified52.7%
*-un-lft-identity52.7%
*-commutative52.7%
add-sqr-sqrt24.1%
sqrt-unprod31.6%
sqr-neg31.6%
sqrt-unprod3.9%
add-sqr-sqrt10.3%
Applied egg-rr10.3%
*-rgt-identity10.3%
Simplified10.3%
herbie shell --seed 2024133
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))