
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (- (- t1) u))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (t1 / (-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 = (v * (t1 / (-t1 - u))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (-t1 - u))) / (t1 + u);
}
def code(u, v, t1): return (v * (t1 / (-t1 - u))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(Float64(-t1) - u))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (-t1 - u))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-t1\right) - u}}{t1 + u}
\end{array}
Initial program 73.3%
associate-/l*75.9%
distribute-lft-neg-out75.9%
distribute-rgt-neg-in75.9%
associate-/r*85.9%
distribute-neg-frac285.9%
Simplified85.9%
associate-*r/98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*l/98.4%
frac-2neg98.4%
associate-*r/98.8%
remove-double-neg98.8%
sub-neg98.8%
distribute-neg-in98.8%
+-commutative98.8%
frac-2neg98.8%
add-sqr-sqrt47.8%
sqrt-unprod44.7%
sqr-neg44.7%
sqrt-unprod21.1%
add-sqr-sqrt36.2%
add-sqr-sqrt14.9%
sqrt-unprod60.3%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- t1) u)) (t_2 (/ v t_1)) (t_3 (* t1 (/ t_2 (+ t1 u)))))
(if (<= t1 -5.7e+144)
t_2
(if (<= t1 1.86e-196)
t_3
(if (<= t1 9e+49)
(* v (/ t1 (* (+ t1 u) t_1)))
(if (<= t1 2.5e+132) t_3 (* (/ t1 (+ t1 u)) (/ v (- t1)))))))))
double code(double u, double v, double t1) {
double t_1 = -t1 - u;
double t_2 = v / t_1;
double t_3 = t1 * (t_2 / (t1 + u));
double tmp;
if (t1 <= -5.7e+144) {
tmp = t_2;
} else if (t1 <= 1.86e-196) {
tmp = t_3;
} else if (t1 <= 9e+49) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else if (t1 <= 2.5e+132) {
tmp = t_3;
} 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = -t1 - u
t_2 = v / t_1
t_3 = t1 * (t_2 / (t1 + u))
if (t1 <= (-5.7d+144)) then
tmp = t_2
else if (t1 <= 1.86d-196) then
tmp = t_3
else if (t1 <= 9d+49) then
tmp = v * (t1 / ((t1 + u) * t_1))
else if (t1 <= 2.5d+132) then
tmp = t_3
else
tmp = (t1 / (t1 + u)) * (v / -t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -t1 - u;
double t_2 = v / t_1;
double t_3 = t1 * (t_2 / (t1 + u));
double tmp;
if (t1 <= -5.7e+144) {
tmp = t_2;
} else if (t1 <= 1.86e-196) {
tmp = t_3;
} else if (t1 <= 9e+49) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else if (t1 <= 2.5e+132) {
tmp = t_3;
} else {
tmp = (t1 / (t1 + u)) * (v / -t1);
}
return tmp;
}
def code(u, v, t1): t_1 = -t1 - u t_2 = v / t_1 t_3 = t1 * (t_2 / (t1 + u)) tmp = 0 if t1 <= -5.7e+144: tmp = t_2 elif t1 <= 1.86e-196: tmp = t_3 elif t1 <= 9e+49: tmp = v * (t1 / ((t1 + u) * t_1)) elif t1 <= 2.5e+132: tmp = t_3 else: tmp = (t1 / (t1 + u)) * (v / -t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-t1) - u) t_2 = Float64(v / t_1) t_3 = Float64(t1 * Float64(t_2 / Float64(t1 + u))) tmp = 0.0 if (t1 <= -5.7e+144) tmp = t_2; elseif (t1 <= 1.86e-196) tmp = t_3; elseif (t1 <= 9e+49) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1))); elseif (t1 <= 2.5e+132) tmp = t_3; else tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -t1 - u; t_2 = v / t_1; t_3 = t1 * (t_2 / (t1 + u)); tmp = 0.0; if (t1 <= -5.7e+144) tmp = t_2; elseif (t1 <= 1.86e-196) tmp = t_3; elseif (t1 <= 9e+49) tmp = v * (t1 / ((t1 + u) * t_1)); elseif (t1 <= 2.5e+132) tmp = t_3; else tmp = (t1 / (t1 + u)) * (v / -t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-t1) - u), $MachinePrecision]}, Block[{t$95$2 = N[(v / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t1 * N[(t$95$2 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -5.7e+144], t$95$2, If[LessEqual[t1, 1.86e-196], t$95$3, If[LessEqual[t1, 9e+49], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e+132], t$95$3, N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-t1\right) - u\\
t_2 := \frac{v}{t\_1}\\
t_3 := t1 \cdot \frac{t\_2}{t1 + u}\\
\mathbf{if}\;t1 \leq -5.7 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq 1.86 \cdot 10^{-196}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t1 \leq 9 \cdot 10^{+49}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+132}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\
\end{array}
\end{array}
if t1 < -5.70000000000000005e144Initial program 39.2%
associate-/l*39.9%
distribute-lft-neg-out39.9%
distribute-rgt-neg-in39.9%
associate-/r*68.6%
distribute-neg-frac268.6%
Simplified68.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt99.4%
sqrt-unprod7.8%
sqr-neg7.8%
sqrt-unprod0.0%
add-sqr-sqrt34.1%
add-sqr-sqrt28.1%
sqrt-unprod35.1%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 92.2%
mul-1-neg92.2%
Simplified92.2%
if -5.70000000000000005e144 < t1 < 1.8600000000000001e-196 or 8.99999999999999965e49 < t1 < 2.5000000000000001e132Initial program 79.3%
associate-/l*85.3%
distribute-lft-neg-out85.3%
distribute-rgt-neg-in85.3%
associate-/r*92.0%
distribute-neg-frac292.0%
Simplified92.0%
if 1.8600000000000001e-196 < t1 < 8.99999999999999965e49Initial program 93.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
if 2.5000000000000001e132 < t1 Initial program 52.4%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 88.1%
Final simplification93.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- t1))) (t_2 (/ t1 (* u (/ u (- v))))))
(if (<= u -3.4e+62)
t_2
(if (<= u -9.5e+36)
t_1
(if (<= u -72000000000.0)
t_2
(if (<= u 1.68e+16) t_1 (* (/ t1 (- u)) (/ v u))))))))
double code(double u, double v, double t1) {
double t_1 = v / -t1;
double t_2 = t1 / (u * (u / -v));
double tmp;
if (u <= -3.4e+62) {
tmp = t_2;
} else if (u <= -9.5e+36) {
tmp = t_1;
} else if (u <= -72000000000.0) {
tmp = t_2;
} else if (u <= 1.68e+16) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = v / -t1
t_2 = t1 / (u * (u / -v))
if (u <= (-3.4d+62)) then
tmp = t_2
else if (u <= (-9.5d+36)) then
tmp = t_1
else if (u <= (-72000000000.0d0)) then
tmp = t_2
else if (u <= 1.68d+16) then
tmp = t_1
else
tmp = (t1 / -u) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / -t1;
double t_2 = t1 / (u * (u / -v));
double tmp;
if (u <= -3.4e+62) {
tmp = t_2;
} else if (u <= -9.5e+36) {
tmp = t_1;
} else if (u <= -72000000000.0) {
tmp = t_2;
} else if (u <= 1.68e+16) {
tmp = t_1;
} else {
tmp = (t1 / -u) * (v / u);
}
return tmp;
}
def code(u, v, t1): t_1 = v / -t1 t_2 = t1 / (u * (u / -v)) tmp = 0 if u <= -3.4e+62: tmp = t_2 elif u <= -9.5e+36: tmp = t_1 elif u <= -72000000000.0: tmp = t_2 elif u <= 1.68e+16: tmp = t_1 else: tmp = (t1 / -u) * (v / u) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(-t1)) t_2 = Float64(t1 / Float64(u * Float64(u / Float64(-v)))) tmp = 0.0 if (u <= -3.4e+62) tmp = t_2; elseif (u <= -9.5e+36) tmp = t_1; elseif (u <= -72000000000.0) tmp = t_2; elseif (u <= 1.68e+16) tmp = t_1; else tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / -t1; t_2 = t1 / (u * (u / -v)); tmp = 0.0; if (u <= -3.4e+62) tmp = t_2; elseif (u <= -9.5e+36) tmp = t_1; elseif (u <= -72000000000.0) tmp = t_2; elseif (u <= 1.68e+16) tmp = t_1; else tmp = (t1 / -u) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / (-t1)), $MachinePrecision]}, Block[{t$95$2 = N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -3.4e+62], t$95$2, If[LessEqual[u, -9.5e+36], t$95$1, If[LessEqual[u, -72000000000.0], t$95$2, If[LessEqual[u, 1.68e+16], t$95$1, N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{-t1}\\
t_2 := \frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{if}\;u \leq -3.4 \cdot 10^{+62}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;u \leq -9.5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq -72000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;u \leq 1.68 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if u < -3.40000000000000014e62 or -9.49999999999999974e36 < u < -7.2e10Initial program 77.8%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 82.1%
Taylor expanded in t1 around 0 80.6%
associate-*r/80.6%
mul-1-neg80.6%
Simplified80.6%
*-commutative80.6%
clear-num82.5%
frac-2neg82.5%
frac-times84.4%
*-un-lft-identity84.4%
remove-double-neg84.4%
Applied egg-rr84.4%
if -3.40000000000000014e62 < u < -9.49999999999999974e36 or -7.2e10 < u < 1.68e16Initial program 68.0%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*83.5%
distribute-neg-frac283.5%
Simplified83.5%
Taylor expanded in t1 around inf 83.3%
associate-*r/83.3%
neg-mul-183.3%
Simplified83.3%
if 1.68e16 < u Initial program 79.8%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around 0 85.9%
Taylor expanded in t1 around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
Final simplification83.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- t1) u))))
(if (<= t1 -3.6e+146)
t_1
(if (<= t1 9e+128)
(* t1 (/ t_1 (+ t1 u)))
(* (/ t1 (+ t1 u)) (/ v (- t1)))))))
double code(double u, double v, double t1) {
double t_1 = v / (-t1 - u);
double tmp;
if (t1 <= -3.6e+146) {
tmp = t_1;
} else if (t1 <= 9e+128) {
tmp = t1 * (t_1 / (t1 + 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) :: t_1
real(8) :: tmp
t_1 = v / (-t1 - u)
if (t1 <= (-3.6d+146)) then
tmp = t_1
else if (t1 <= 9d+128) then
tmp = t1 * (t_1 / (t1 + 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 t_1 = v / (-t1 - u);
double tmp;
if (t1 <= -3.6e+146) {
tmp = t_1;
} else if (t1 <= 9e+128) {
tmp = t1 * (t_1 / (t1 + u));
} else {
tmp = (t1 / (t1 + u)) * (v / -t1);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-t1 - u) tmp = 0 if t1 <= -3.6e+146: tmp = t_1 elif t1 <= 9e+128: tmp = t1 * (t_1 / (t1 + u)) else: tmp = (t1 / (t1 + u)) * (v / -t1) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-t1) - u)) tmp = 0.0 if (t1 <= -3.6e+146) tmp = t_1; elseif (t1 <= 9e+128) tmp = Float64(t1 * Float64(t_1 / Float64(t1 + u))); else tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-t1 - u); tmp = 0.0; if (t1 <= -3.6e+146) tmp = t_1; elseif (t1 <= 9e+128) tmp = t1 * (t_1 / (t1 + u)); else tmp = (t1 / (t1 + u)) * (v / -t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.6e+146], t$95$1, If[LessEqual[t1, 9e+128], N[(t1 * N[(t$95$1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-t1\right) - u}\\
\mathbf{if}\;t1 \leq -3.6 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 9 \cdot 10^{+128}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\
\end{array}
\end{array}
if t1 < -3.5999999999999998e146Initial program 39.2%
associate-/l*39.9%
distribute-lft-neg-out39.9%
distribute-rgt-neg-in39.9%
associate-/r*68.6%
distribute-neg-frac268.6%
Simplified68.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt99.4%
sqrt-unprod7.8%
sqr-neg7.8%
sqrt-unprod0.0%
add-sqr-sqrt34.1%
add-sqr-sqrt28.1%
sqrt-unprod35.1%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 92.2%
mul-1-neg92.2%
Simplified92.2%
if -3.5999999999999998e146 < t1 < 9.0000000000000003e128Initial program 84.3%
associate-/l*87.8%
distribute-lft-neg-out87.8%
distribute-rgt-neg-in87.8%
associate-/r*92.2%
distribute-neg-frac292.2%
Simplified92.2%
if 9.0000000000000003e128 < t1 Initial program 52.4%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 88.1%
Final simplification91.6%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.12e-41)
(/ v (- (- t1) u))
(if (<= t1 360000.0)
(/ (* v (/ t1 u)) (- u))
(* (/ t1 (+ t1 u)) (/ v (- t1))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.12e-41) {
tmp = v / (-t1 - u);
} else if (t1 <= 360000.0) {
tmp = (v * (t1 / u)) / -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.12d-41)) then
tmp = v / (-t1 - u)
else if (t1 <= 360000.0d0) then
tmp = (v * (t1 / u)) / -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.12e-41) {
tmp = v / (-t1 - u);
} else if (t1 <= 360000.0) {
tmp = (v * (t1 / u)) / -u;
} else {
tmp = (t1 / (t1 + u)) * (v / -t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.12e-41: tmp = v / (-t1 - u) elif t1 <= 360000.0: tmp = (v * (t1 / u)) / -u else: tmp = (t1 / (t1 + u)) * (v / -t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.12e-41) tmp = Float64(v / Float64(Float64(-t1) - u)); elseif (t1 <= 360000.0) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); else tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.12e-41) tmp = v / (-t1 - u); elseif (t1 <= 360000.0) tmp = (v * (t1 / u)) / -u; else tmp = (t1 / (t1 + u)) * (v / -t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.12e-41], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 360000.0], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $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.12 \cdot 10^{-41}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{elif}\;t1 \leq 360000:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\
\end{array}
\end{array}
if t1 < -1.11999999999999999e-41Initial program 60.2%
associate-/l*65.8%
distribute-lft-neg-out65.8%
distribute-rgt-neg-in65.8%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
associate-*r/99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt99.4%
sqrt-unprod58.6%
sqr-neg58.6%
sqrt-unprod0.0%
add-sqr-sqrt26.9%
add-sqr-sqrt21.4%
sqrt-unprod29.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 80.7%
mul-1-neg80.7%
Simplified80.7%
if -1.11999999999999999e-41 < t1 < 3.6e5Initial program 87.9%
times-frac96.7%
distribute-frac-neg96.7%
distribute-neg-frac296.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
Simplified96.7%
Taylor expanded in t1 around 0 74.1%
Taylor expanded in t1 around 0 77.9%
associate-*r/77.9%
mul-1-neg77.9%
Simplified77.9%
associate-*l/78.6%
*-commutative78.6%
frac-2neg78.6%
distribute-rgt-neg-in78.6%
remove-double-neg78.6%
add-sqr-sqrt45.2%
sqrt-unprod52.2%
sqr-neg52.2%
sqrt-unprod15.1%
add-sqr-sqrt40.4%
associate-*l/40.6%
associate-/l*40.4%
add-sqr-sqrt15.1%
sqrt-unprod53.1%
sqr-neg53.1%
sqrt-unprod45.2%
add-sqr-sqrt78.7%
Applied egg-rr78.7%
if 3.6e5 < t1 Initial program 62.6%
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 85.2%
Final simplification80.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -8.6e-43) (not (<= t1 280000.0))) (/ v (- (- t1) u)) (/ (* v (/ t1 u)) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.6e-43) || !(t1 <= 280000.0)) {
tmp = v / (-t1 - u);
} else {
tmp = (v * (t1 / 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 <= (-8.6d-43)) .or. (.not. (t1 <= 280000.0d0))) then
tmp = v / (-t1 - u)
else
tmp = (v * (t1 / u)) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.6e-43) || !(t1 <= 280000.0)) {
tmp = v / (-t1 - u);
} else {
tmp = (v * (t1 / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8.6e-43) or not (t1 <= 280000.0): tmp = v / (-t1 - u) else: tmp = (v * (t1 / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8.6e-43) || !(t1 <= 280000.0)) tmp = Float64(v / Float64(Float64(-t1) - u)); else tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -8.6e-43) || ~((t1 <= 280000.0))) tmp = v / (-t1 - u); else tmp = (v * (t1 / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8.6e-43], N[Not[LessEqual[t1, 280000.0]], $MachinePrecision]], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.6 \cdot 10^{-43} \lor \neg \left(t1 \leq 280000\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -8.59999999999999927e-43 or 2.8e5 < t1 Initial program 61.3%
associate-/l*65.3%
distribute-lft-neg-out65.3%
distribute-rgt-neg-in65.3%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt55.0%
sqrt-unprod39.4%
sqr-neg39.4%
sqrt-unprod17.7%
add-sqr-sqrt32.6%
add-sqr-sqrt15.4%
sqrt-unprod46.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 82.7%
mul-1-neg82.7%
Simplified82.7%
if -8.59999999999999927e-43 < t1 < 2.8e5Initial program 87.9%
times-frac96.7%
distribute-frac-neg96.7%
distribute-neg-frac296.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
Simplified96.7%
Taylor expanded in t1 around 0 74.1%
Taylor expanded in t1 around 0 77.9%
associate-*r/77.9%
mul-1-neg77.9%
Simplified77.9%
associate-*l/78.6%
*-commutative78.6%
frac-2neg78.6%
distribute-rgt-neg-in78.6%
remove-double-neg78.6%
add-sqr-sqrt45.2%
sqrt-unprod52.2%
sqr-neg52.2%
sqrt-unprod15.1%
add-sqr-sqrt40.4%
associate-*l/40.6%
associate-/l*40.4%
add-sqr-sqrt15.1%
sqrt-unprod53.1%
sqr-neg53.1%
sqrt-unprod45.2%
add-sqr-sqrt78.7%
Applied egg-rr78.7%
Final simplification80.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.4e+63) (not (<= u 15000000000000.0))) (* (/ t1 (- u)) (/ v u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.4e+63) || !(u <= 15000000000000.0)) {
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 <= (-6.4d+63)) .or. (.not. (u <= 15000000000000.0d0))) 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 <= -6.4e+63) || !(u <= 15000000000000.0)) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.4e+63) or not (u <= 15000000000000.0): tmp = (t1 / -u) * (v / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.4e+63) || !(u <= 15000000000000.0)) tmp = Float64(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 <= -6.4e+63) || ~((u <= 15000000000000.0))) tmp = (t1 / -u) * (v / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.4e+63], N[Not[LessEqual[u, 15000000000000.0]], $MachinePrecision]], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.4 \cdot 10^{+63} \lor \neg \left(u \leq 15000000000000\right):\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -6.40000000000000022e63 or 1.5e13 < u Initial program 77.5%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around 0 84.2%
Taylor expanded in t1 around 0 83.4%
associate-*r/83.4%
mul-1-neg83.4%
Simplified83.4%
if -6.40000000000000022e63 < u < 1.5e13Initial program 69.8%
associate-/l*73.4%
distribute-lft-neg-out73.4%
distribute-rgt-neg-in73.4%
associate-/r*84.4%
distribute-neg-frac284.4%
Simplified84.4%
Taylor expanded in t1 around inf 80.1%
associate-*r/80.1%
neg-mul-180.1%
Simplified80.1%
Final simplification81.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.3e+202) (not (<= u 1.2e+22))) (* t1 (/ (/ v u) u)) (/ v (- (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.3e+202) || !(u <= 1.2e+22)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / (-t1 - u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.3d+202)) .or. (.not. (u <= 1.2d+22))) then
tmp = t1 * ((v / u) / u)
else
tmp = v / (-t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.3e+202) || !(u <= 1.2e+22)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / (-t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.3e+202) or not (u <= 1.2e+22): tmp = t1 * ((v / u) / u) else: tmp = v / (-t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.3e+202) || !(u <= 1.2e+22)) tmp = Float64(t1 * Float64(Float64(v / u) / u)); else tmp = Float64(v / Float64(Float64(-t1) - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.3e+202) || ~((u <= 1.2e+22))) tmp = t1 * ((v / u) / u); else tmp = v / (-t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.3e+202], N[Not[LessEqual[u, 1.2e+22]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{+202} \lor \neg \left(u \leq 1.2 \cdot 10^{+22}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\end{array}
\end{array}
if u < -1.3000000000000001e202 or 1.2e22 < u Initial program 81.2%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 87.5%
Taylor expanded in t1 around 0 86.4%
associate-*r/86.4%
mul-1-neg86.4%
Simplified86.4%
*-commutative86.4%
clear-num86.2%
un-div-inv86.2%
add-sqr-sqrt36.8%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-unprod36.7%
add-sqr-sqrt65.0%
Applied egg-rr65.0%
associate-/r/67.2%
Applied egg-rr67.2%
if -1.3000000000000001e202 < u < 1.2e22Initial program 68.9%
associate-/l*72.6%
distribute-lft-neg-out72.6%
distribute-rgt-neg-in72.6%
associate-/r*84.3%
distribute-neg-frac284.3%
Simplified84.3%
associate-*r/98.2%
+-commutative98.2%
distribute-neg-in98.2%
sub-neg98.2%
associate-*l/98.2%
frac-2neg98.2%
associate-*r/98.7%
remove-double-neg98.7%
sub-neg98.7%
distribute-neg-in98.7%
+-commutative98.7%
frac-2neg98.7%
add-sqr-sqrt49.6%
sqrt-unprod36.2%
sqr-neg36.2%
sqrt-unprod11.5%
add-sqr-sqrt18.8%
add-sqr-sqrt11.5%
sqrt-unprod49.2%
Applied egg-rr98.7%
Taylor expanded in t1 around inf 75.6%
mul-1-neg75.6%
Simplified75.6%
Final simplification72.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1e+182) (not (<= u 6.7e+151))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1e+182) || !(u <= 6.7e+151)) {
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 <= (-1d+182)) .or. (.not. (u <= 6.7d+151))) 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 <= -1e+182) || !(u <= 6.7e+151)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1e+182) or not (u <= 6.7e+151): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1e+182) || !(u <= 6.7e+151)) 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 <= -1e+182) || ~((u <= 6.7e+151))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1e+182], N[Not[LessEqual[u, 6.7e+151]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{+182} \lor \neg \left(u \leq 6.7 \cdot 10^{+151}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.0000000000000001e182 or 6.69999999999999964e151 < u Initial program 77.4%
associate-/l*78.2%
distribute-lft-neg-out78.2%
distribute-rgt-neg-in78.2%
associate-/r*90.9%
distribute-neg-frac290.9%
Simplified90.9%
Taylor expanded in t1 around inf 44.9%
Taylor expanded in t1 around 0 39.1%
associate-*r/39.1%
mul-1-neg39.1%
Simplified39.1%
if -1.0000000000000001e182 < u < 6.69999999999999964e151Initial program 71.9%
associate-/l*75.2%
distribute-lft-neg-out75.2%
distribute-rgt-neg-in75.2%
associate-/r*84.4%
distribute-neg-frac284.4%
Simplified84.4%
Taylor expanded in t1 around inf 67.6%
associate-*r/67.6%
neg-mul-167.6%
Simplified67.6%
Final simplification60.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.8e+178) (not (<= u 4.4e+151))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.8e+178) || !(u <= 4.4e+151)) {
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.8d+178)) .or. (.not. (u <= 4.4d+151))) 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.8e+178) || !(u <= 4.4e+151)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.8e+178) or not (u <= 4.4e+151): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.8e+178) || !(u <= 4.4e+151)) 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 <= -5.8e+178) || ~((u <= 4.4e+151))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.8e+178], N[Not[LessEqual[u, 4.4e+151]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.8 \cdot 10^{+178} \lor \neg \left(u \leq 4.4 \cdot 10^{+151}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -5.8000000000000001e178 or 4.40000000000000013e151 < u Initial program 77.4%
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 93.9%
*-commutative93.9%
clear-num93.9%
frac-2neg93.9%
frac-times86.5%
*-un-lft-identity86.5%
sub-neg86.5%
distribute-neg-in86.5%
+-commutative86.5%
remove-double-neg86.5%
Applied egg-rr86.5%
frac-2neg86.5%
div-inv86.5%
remove-double-neg86.5%
distribute-rgt-neg-in86.5%
distribute-neg-in86.5%
add-sqr-sqrt39.0%
sqrt-unprod83.1%
sqr-neg83.1%
sqrt-unprod47.6%
add-sqr-sqrt86.5%
sub-neg86.5%
Applied egg-rr86.5%
associate-*r/86.5%
times-frac94.0%
associate-/r/94.0%
*-commutative94.0%
associate-*r/94.0%
*-rgt-identity94.0%
associate-*r/81.1%
*-commutative81.1%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in t1 around inf 38.7%
if -5.8000000000000001e178 < u < 4.40000000000000013e151Initial program 71.9%
associate-/l*75.2%
distribute-lft-neg-out75.2%
distribute-rgt-neg-in75.2%
associate-/r*84.4%
distribute-neg-frac284.4%
Simplified84.4%
Taylor expanded in t1 around inf 67.6%
associate-*r/67.6%
neg-mul-167.6%
Simplified67.6%
Final simplification60.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -7.2e+62) (not (<= t1 1.08e+80))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -7.2e+62) || !(t1 <= 1.08e+80)) {
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 <= (-7.2d+62)) .or. (.not. (t1 <= 1.08d+80))) 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 <= -7.2e+62) || !(t1 <= 1.08e+80)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -7.2e+62) or not (t1 <= 1.08e+80): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -7.2e+62) || !(t1 <= 1.08e+80)) 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 <= -7.2e+62) || ~((t1 <= 1.08e+80))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -7.2e+62], N[Not[LessEqual[t1, 1.08e+80]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -7.2 \cdot 10^{+62} \lor \neg \left(t1 \leq 1.08 \cdot 10^{+80}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -7.2e62 or 1.08e80 < t1 Initial program 50.4%
associate-*l/57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in t1 around inf 86.8%
frac-2neg86.8%
metadata-eval86.8%
un-div-inv87.1%
add-sqr-sqrt46.3%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod18.4%
add-sqr-sqrt34.4%
Applied egg-rr34.4%
if -7.2e62 < t1 < 1.08e80Initial program 88.4%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in t1 around 0 66.8%
*-commutative66.8%
clear-num66.8%
frac-2neg66.8%
frac-times65.7%
*-un-lft-identity65.7%
sub-neg65.7%
distribute-neg-in65.7%
+-commutative65.7%
remove-double-neg65.7%
Applied egg-rr65.7%
frac-2neg65.7%
div-inv65.6%
remove-double-neg65.6%
distribute-rgt-neg-in65.6%
distribute-neg-in65.6%
add-sqr-sqrt32.9%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod34.1%
add-sqr-sqrt64.9%
sub-neg64.9%
Applied egg-rr64.9%
associate-*r/65.0%
times-frac67.0%
associate-/r/66.6%
*-commutative66.6%
associate-*r/66.6%
*-rgt-identity66.6%
associate-*r/65.2%
*-commutative65.2%
associate-/l*66.6%
Simplified66.6%
Taylor expanded in t1 around inf 17.1%
Final simplification24.0%
(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(t1 * Float64(v / Float64(t1 + u))) / Float64(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 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1 \cdot \frac{v}{t1 + u}}{\left(-t1\right) - u}
\end{array}
Initial program 73.3%
associate-/l*75.9%
distribute-lft-neg-out75.9%
distribute-rgt-neg-in75.9%
associate-/r*85.9%
distribute-neg-frac285.9%
Simplified85.9%
associate-*r/98.8%
frac-2neg98.8%
remove-double-neg98.8%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- t1) u))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-t1 - u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (t1 / (t1 + u)) * (v / (-t1 - u))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-t1 - u));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-t1 - u))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(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}{\left(-t1\right) - u}
\end{array}
Initial program 73.3%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1) :precision binary64 (/ v (- (- t1) u)))
double code(double u, double v, double t1) {
return v / (-t1 - u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-t1 - u)
end function
public static double code(double u, double v, double t1) {
return v / (-t1 - u);
}
def code(u, v, t1): return v / (-t1 - u)
function code(u, v, t1) return Float64(v / Float64(Float64(-t1) - u)) end
function tmp = code(u, v, t1) tmp = v / (-t1 - u); end
code[u_, v_, t1_] := N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-t1\right) - u}
\end{array}
Initial program 73.3%
associate-/l*75.9%
distribute-lft-neg-out75.9%
distribute-rgt-neg-in75.9%
associate-/r*85.9%
distribute-neg-frac285.9%
Simplified85.9%
associate-*r/98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*l/98.4%
frac-2neg98.4%
associate-*r/98.8%
remove-double-neg98.8%
sub-neg98.8%
distribute-neg-in98.8%
+-commutative98.8%
frac-2neg98.8%
add-sqr-sqrt47.8%
sqrt-unprod44.7%
sqr-neg44.7%
sqrt-unprod21.1%
add-sqr-sqrt36.2%
add-sqr-sqrt14.9%
sqrt-unprod60.3%
Applied egg-rr98.8%
Taylor expanded in t1 around inf 63.4%
mul-1-neg63.4%
Simplified63.4%
Final simplification63.4%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 73.3%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in t1 around inf 56.1%
frac-2neg56.1%
metadata-eval56.1%
un-div-inv56.2%
add-sqr-sqrt27.7%
sqrt-unprod28.1%
sqr-neg28.1%
sqrt-unprod8.0%
add-sqr-sqrt14.9%
Applied egg-rr14.9%
herbie shell --seed 2024100
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))