
(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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 71.6%
associate-/r*81.5%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in v around 0 81.5%
mul-1-neg81.5%
associate-*l/98.2%
distribute-rgt-neg-out98.2%
Simplified98.2%
Final simplification98.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -1.35e+154)
(/ (- v) t1)
(if (<= t1 -1e-203)
t_1
(if (<= t1 1.7e-264)
(/ v (* u (/ (- u) t1)))
(if (<= t1 5.5e+155) t_1 (/ (- (/ u (/ t1 v)) v) (+ t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.35e+154) {
tmp = -v / t1;
} else if (t1 <= -1e-203) {
tmp = t_1;
} else if (t1 <= 1.7e-264) {
tmp = v / (u * (-u / t1));
} else if (t1 <= 5.5e+155) {
tmp = t_1;
} else {
tmp = ((u / (t1 / v)) - 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) :: t_1
real(8) :: tmp
t_1 = v * (-t1 / ((t1 + u) * (t1 + u)))
if (t1 <= (-1.35d+154)) then
tmp = -v / t1
else if (t1 <= (-1d-203)) then
tmp = t_1
else if (t1 <= 1.7d-264) then
tmp = v / (u * (-u / t1))
else if (t1 <= 5.5d+155) then
tmp = t_1
else
tmp = ((u / (t1 / v)) - v) / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.35e+154) {
tmp = -v / t1;
} else if (t1 <= -1e-203) {
tmp = t_1;
} else if (t1 <= 1.7e-264) {
tmp = v / (u * (-u / t1));
} else if (t1 <= 5.5e+155) {
tmp = t_1;
} else {
tmp = ((u / (t1 / v)) - v) / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = v * (-t1 / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -1.35e+154: tmp = -v / t1 elif t1 <= -1e-203: tmp = t_1 elif t1 <= 1.7e-264: tmp = v / (u * (-u / t1)) elif t1 <= 5.5e+155: tmp = t_1 else: tmp = ((u / (t1 / v)) - v) / (t1 + u) return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -1.35e+154) tmp = Float64(Float64(-v) / t1); elseif (t1 <= -1e-203) tmp = t_1; elseif (t1 <= 1.7e-264) tmp = Float64(v / Float64(u * Float64(Float64(-u) / t1))); elseif (t1 <= 5.5e+155) tmp = t_1; else tmp = Float64(Float64(Float64(u / Float64(t1 / v)) - v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * (-t1 / ((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -1.35e+154) tmp = -v / t1; elseif (t1 <= -1e-203) tmp = t_1; elseif (t1 <= 1.7e-264) tmp = v / (u * (-u / t1)); elseif (t1 <= 5.5e+155) tmp = t_1; else tmp = ((u / (t1 / v)) - v) / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.35e+154], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, -1e-203], t$95$1, If[LessEqual[t1, 1.7e-264], N[(v / N[(u * N[((-u) / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.5e+155], t$95$1, N[(N[(N[(u / N[(t1 / v), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq -1 \cdot 10^{-203}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 1.7 \cdot 10^{-264}:\\
\;\;\;\;\frac{v}{u \cdot \frac{-u}{t1}}\\
\mathbf{elif}\;t1 \leq 5.5 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{u}{\frac{t1}{v}} - v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.35000000000000003e154Initial program 34.5%
associate-*l/36.1%
*-commutative36.1%
Simplified36.1%
Taylor expanded in t1 around inf 87.3%
associate-*r/87.3%
neg-mul-187.3%
Simplified87.3%
if -1.35000000000000003e154 < t1 < -1e-203 or 1.6999999999999999e-264 < t1 < 5.5000000000000001e155Initial program 84.2%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
if -1e-203 < t1 < 1.6999999999999999e-264Initial program 72.5%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in t1 around 0 79.6%
associate-*r/79.6%
neg-mul-179.6%
unpow279.6%
Simplified79.6%
clear-num79.6%
un-div-inv79.6%
associate-/l*93.8%
add-sqr-sqrt57.6%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-unprod16.1%
add-sqr-sqrt50.8%
Applied egg-rr50.8%
frac-2neg50.8%
distribute-frac-neg50.8%
distribute-frac-neg50.8%
add-sqr-sqrt34.6%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-unprod36.0%
add-sqr-sqrt93.8%
associate-/r/93.9%
distribute-rgt-neg-in93.9%
Applied egg-rr93.9%
if 5.5000000000000001e155 < t1 Initial program 51.5%
associate-/r*70.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t1 around inf 93.4%
neg-mul-193.4%
+-commutative93.4%
unsub-neg93.4%
associate-/l*99.6%
Simplified99.6%
Final simplification92.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) t1)))
(if (<= u -5.5e-40)
(/ (/ (- t1) (/ u v)) (+ t1 u))
(if (<= u 1.95e-51)
t_1
(if (<= u 5.1e-23)
(/ (* v (/ (- t1) u)) (+ t1 u))
(if (<= u 3.5e+68) t_1 (/ (* t1 (/ v u)) (- t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = -v / t1;
double tmp;
if (u <= -5.5e-40) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (u <= 1.95e-51) {
tmp = t_1;
} else if (u <= 5.1e-23) {
tmp = (v * (-t1 / u)) / (t1 + u);
} else if (u <= 3.5e+68) {
tmp = t_1;
} else {
tmp = (t1 * (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) :: t_1
real(8) :: tmp
t_1 = -v / t1
if (u <= (-5.5d-40)) then
tmp = (-t1 / (u / v)) / (t1 + u)
else if (u <= 1.95d-51) then
tmp = t_1
else if (u <= 5.1d-23) then
tmp = (v * (-t1 / u)) / (t1 + u)
else if (u <= 3.5d+68) then
tmp = t_1
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / t1;
double tmp;
if (u <= -5.5e-40) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (u <= 1.95e-51) {
tmp = t_1;
} else if (u <= 5.1e-23) {
tmp = (v * (-t1 / u)) / (t1 + u);
} else if (u <= 3.5e+68) {
tmp = t_1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): t_1 = -v / t1 tmp = 0 if u <= -5.5e-40: tmp = (-t1 / (u / v)) / (t1 + u) elif u <= 1.95e-51: tmp = t_1 elif u <= 5.1e-23: tmp = (v * (-t1 / u)) / (t1 + u) elif u <= 3.5e+68: tmp = t_1 else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / t1) tmp = 0.0 if (u <= -5.5e-40) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / Float64(t1 + u)); elseif (u <= 1.95e-51) tmp = t_1; elseif (u <= 5.1e-23) tmp = Float64(Float64(v * Float64(Float64(-t1) / u)) / Float64(t1 + u)); elseif (u <= 3.5e+68) tmp = t_1; else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / t1; tmp = 0.0; if (u <= -5.5e-40) tmp = (-t1 / (u / v)) / (t1 + u); elseif (u <= 1.95e-51) tmp = t_1; elseif (u <= 5.1e-23) tmp = (v * (-t1 / u)) / (t1 + u); elseif (u <= 3.5e+68) tmp = t_1; else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / t1), $MachinePrecision]}, If[LessEqual[u, -5.5e-40], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.95e-51], t$95$1, If[LessEqual[u, 5.1e-23], N[(N[(v * N[((-t1) / u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.5e+68], t$95$1, N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1}\\
\mathbf{if}\;u \leq -5.5 \cdot 10^{-40}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\
\mathbf{elif}\;u \leq 1.95 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 5.1 \cdot 10^{-23}:\\
\;\;\;\;\frac{v \cdot \frac{-t1}{u}}{t1 + u}\\
\mathbf{elif}\;u \leq 3.5 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -5.50000000000000002e-40Initial program 83.3%
associate-/r*95.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t1 around 0 82.3%
mul-1-neg82.3%
associate-/l*83.8%
distribute-neg-frac83.8%
Simplified83.8%
if -5.50000000000000002e-40 < u < 1.9499999999999999e-51 or 5.10000000000000011e-23 < u < 3.49999999999999977e68Initial program 62.2%
associate-*l/75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in t1 around inf 81.8%
associate-*r/81.8%
neg-mul-181.8%
Simplified81.8%
if 1.9499999999999999e-51 < u < 5.10000000000000011e-23Initial program 89.5%
associate-/r*99.2%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in v around 0 99.2%
mul-1-neg99.2%
associate-*l/99.1%
distribute-rgt-neg-out99.1%
Simplified99.1%
Taylor expanded in t1 around 0 72.1%
if 3.49999999999999977e68 < u Initial program 75.8%
associate-/r*87.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t1 around 0 86.9%
mul-1-neg86.9%
associate-/l*92.4%
distribute-neg-frac92.4%
Simplified92.4%
frac-2neg92.4%
distribute-frac-neg92.4%
associate-/l*86.9%
mul-1-neg86.9%
div-inv87.0%
mul-1-neg87.0%
remove-double-neg87.0%
div-inv86.8%
associate-*l*92.3%
div-inv92.4%
distribute-neg-in92.4%
add-sqr-sqrt49.0%
sqrt-unprod87.4%
sqr-neg87.4%
sqrt-unprod43.3%
add-sqr-sqrt92.8%
sub-neg92.8%
Applied egg-rr92.8%
associate-*r/92.8%
*-rgt-identity92.8%
Simplified92.8%
Final simplification84.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) t1)))
(if (<= u -5.5e-40)
(/ (/ (- t1) (/ u v)) (+ t1 u))
(if (<= u 3e-51)
t_1
(if (<= u 4.2e-24)
(* v (/ (/ t1 (+ t1 u)) (- t1 u)))
(if (<= u 4.2e+63) t_1 (/ (* t1 (/ v u)) (- t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = -v / t1;
double tmp;
if (u <= -5.5e-40) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (u <= 3e-51) {
tmp = t_1;
} else if (u <= 4.2e-24) {
tmp = v * ((t1 / (t1 + u)) / (t1 - u));
} else if (u <= 4.2e+63) {
tmp = t_1;
} else {
tmp = (t1 * (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) :: t_1
real(8) :: tmp
t_1 = -v / t1
if (u <= (-5.5d-40)) then
tmp = (-t1 / (u / v)) / (t1 + u)
else if (u <= 3d-51) then
tmp = t_1
else if (u <= 4.2d-24) then
tmp = v * ((t1 / (t1 + u)) / (t1 - u))
else if (u <= 4.2d+63) then
tmp = t_1
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / t1;
double tmp;
if (u <= -5.5e-40) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (u <= 3e-51) {
tmp = t_1;
} else if (u <= 4.2e-24) {
tmp = v * ((t1 / (t1 + u)) / (t1 - u));
} else if (u <= 4.2e+63) {
tmp = t_1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): t_1 = -v / t1 tmp = 0 if u <= -5.5e-40: tmp = (-t1 / (u / v)) / (t1 + u) elif u <= 3e-51: tmp = t_1 elif u <= 4.2e-24: tmp = v * ((t1 / (t1 + u)) / (t1 - u)) elif u <= 4.2e+63: tmp = t_1 else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / t1) tmp = 0.0 if (u <= -5.5e-40) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / Float64(t1 + u)); elseif (u <= 3e-51) tmp = t_1; elseif (u <= 4.2e-24) tmp = Float64(v * Float64(Float64(t1 / Float64(t1 + u)) / Float64(t1 - u))); elseif (u <= 4.2e+63) tmp = t_1; else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / t1; tmp = 0.0; if (u <= -5.5e-40) tmp = (-t1 / (u / v)) / (t1 + u); elseif (u <= 3e-51) tmp = t_1; elseif (u <= 4.2e-24) tmp = v * ((t1 / (t1 + u)) / (t1 - u)); elseif (u <= 4.2e+63) tmp = t_1; else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / t1), $MachinePrecision]}, If[LessEqual[u, -5.5e-40], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3e-51], t$95$1, If[LessEqual[u, 4.2e-24], N[(v * N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.2e+63], t$95$1, N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1}\\
\mathbf{if}\;u \leq -5.5 \cdot 10^{-40}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\
\mathbf{elif}\;u \leq 3 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 4.2 \cdot 10^{-24}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{t1 + u}}{t1 - u}\\
\mathbf{elif}\;u \leq 4.2 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -5.50000000000000002e-40Initial program 83.3%
associate-/r*95.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t1 around 0 82.3%
mul-1-neg82.3%
associate-/l*83.8%
distribute-neg-frac83.8%
Simplified83.8%
if -5.50000000000000002e-40 < u < 3.00000000000000002e-51 or 4.1999999999999999e-24 < u < 4.2000000000000004e63Initial program 62.2%
associate-*l/75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in t1 around inf 81.8%
associate-*r/81.8%
neg-mul-181.8%
Simplified81.8%
if 3.00000000000000002e-51 < u < 4.1999999999999999e-24Initial program 89.5%
associate-*l/89.8%
*-commutative89.8%
Simplified89.8%
associate-/r*99.1%
associate-*r/99.1%
*-commutative99.1%
associate-/r/89.8%
div-inv89.8%
frac-2neg89.8%
frac-times89.8%
remove-double-neg89.8%
*-commutative89.8%
*-un-lft-identity89.8%
distribute-neg-frac89.8%
distribute-neg-in89.8%
add-sqr-sqrt49.7%
sqrt-unprod72.4%
sqr-neg72.4%
sqrt-unprod32.3%
add-sqr-sqrt72.3%
sub-neg72.3%
Applied egg-rr72.3%
associate-/l/72.6%
associate-/r/81.7%
Simplified81.7%
if 4.2000000000000004e63 < u Initial program 75.8%
associate-/r*87.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t1 around 0 86.9%
mul-1-neg86.9%
associate-/l*92.4%
distribute-neg-frac92.4%
Simplified92.4%
frac-2neg92.4%
distribute-frac-neg92.4%
associate-/l*86.9%
mul-1-neg86.9%
div-inv87.0%
mul-1-neg87.0%
remove-double-neg87.0%
div-inv86.8%
associate-*l*92.3%
div-inv92.4%
distribute-neg-in92.4%
add-sqr-sqrt49.0%
sqrt-unprod87.4%
sqr-neg87.4%
sqrt-unprod43.3%
add-sqr-sqrt92.8%
sub-neg92.8%
Applied egg-rr92.8%
associate-*r/92.8%
*-rgt-identity92.8%
Simplified92.8%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -5e+47)
(not
(or (<= t1 3.55e-168) (and (not (<= t1 3.7e-47)) (<= t1 1.4e+24)))))
(/ (- v) (+ t1 u))
(* (/ v u) (/ (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5e+47) || !((t1 <= 3.55e-168) || (!(t1 <= 3.7e-47) && (t1 <= 1.4e+24)))) {
tmp = -v / (t1 + u);
} 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 <= (-5d+47)) .or. (.not. (t1 <= 3.55d-168) .or. (.not. (t1 <= 3.7d-47)) .and. (t1 <= 1.4d+24))) then
tmp = -v / (t1 + u)
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 <= -5e+47) || !((t1 <= 3.55e-168) || (!(t1 <= 3.7e-47) && (t1 <= 1.4e+24)))) {
tmp = -v / (t1 + u);
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5e+47) or not ((t1 <= 3.55e-168) or (not (t1 <= 3.7e-47) and (t1 <= 1.4e+24))): tmp = -v / (t1 + u) else: tmp = (v / u) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5e+47) || !((t1 <= 3.55e-168) || (!(t1 <= 3.7e-47) && (t1 <= 1.4e+24)))) tmp = Float64(Float64(-v) / Float64(t1 + u)); 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 <= -5e+47) || ~(((t1 <= 3.55e-168) || (~((t1 <= 3.7e-47)) && (t1 <= 1.4e+24))))) tmp = -v / (t1 + u); else tmp = (v / u) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5e+47], N[Not[Or[LessEqual[t1, 3.55e-168], And[N[Not[LessEqual[t1, 3.7e-47]], $MachinePrecision], LessEqual[t1, 1.4e+24]]]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5 \cdot 10^{+47} \lor \neg \left(t1 \leq 3.55 \cdot 10^{-168} \lor \neg \left(t1 \leq 3.7 \cdot 10^{-47}\right) \land t1 \leq 1.4 \cdot 10^{+24}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if t1 < -5.00000000000000022e47 or 3.55000000000000009e-168 < t1 < 3.7e-47 or 1.4000000000000001e24 < t1 Initial program 61.5%
associate-/r*74.0%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t1 around inf 85.0%
neg-mul-185.0%
Simplified85.0%
if -5.00000000000000022e47 < t1 < 3.55000000000000009e-168 or 3.7e-47 < t1 < 1.4000000000000001e24Initial program 84.8%
associate-/r*91.2%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in v around 0 91.2%
mul-1-neg91.2%
associate-*l/96.1%
distribute-rgt-neg-out96.1%
Simplified96.1%
Taylor expanded in t1 around 0 74.2%
mul-1-neg74.2%
unpow274.2%
times-frac83.2%
Simplified83.2%
Final simplification84.2%
(FPCore (u v t1) :precision binary64 (if (<= u 1.7e+133) (* (- v) (/ (/ t1 (+ t1 u)) (+ t1 u))) (/ (* t1 (/ v u)) (- t1 u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 1.7e+133) {
tmp = -v * ((t1 / (t1 + u)) / (t1 + u));
} else {
tmp = (t1 * (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 (u <= 1.7d+133) then
tmp = -v * ((t1 / (t1 + u)) / (t1 + u))
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 1.7e+133) {
tmp = -v * ((t1 / (t1 + u)) / (t1 + u));
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 1.7e+133: tmp = -v * ((t1 / (t1 + u)) / (t1 + u)) else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 1.7e+133) tmp = Float64(Float64(-v) * Float64(Float64(t1 / Float64(t1 + u)) / Float64(t1 + u))); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 1.7e+133) tmp = -v * ((t1 / (t1 + u)) / (t1 + u)); else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 1.7e+133], N[((-v) * N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 1.7 \cdot 10^{+133}:\\
\;\;\;\;\left(-v\right) \cdot \frac{\frac{t1}{t1 + u}}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < 1.69999999999999994e133Initial program 71.0%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
neg-mul-178.8%
times-frac98.1%
Applied egg-rr98.1%
associate-*l/98.1%
mul-1-neg98.1%
Simplified98.1%
if 1.69999999999999994e133 < u Initial program 74.8%
associate-/r*90.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 89.9%
mul-1-neg89.9%
associate-/l*94.9%
distribute-neg-frac94.9%
Simplified94.9%
frac-2neg94.9%
distribute-frac-neg94.9%
associate-/l*89.9%
mul-1-neg89.9%
div-inv89.9%
mul-1-neg89.9%
remove-double-neg89.9%
div-inv89.8%
associate-*l*94.8%
div-inv94.8%
distribute-neg-in94.8%
add-sqr-sqrt53.8%
sqrt-unprod88.0%
sqr-neg88.0%
sqrt-unprod41.0%
add-sqr-sqrt95.2%
sub-neg95.2%
Applied egg-rr95.2%
associate-*r/95.3%
*-rgt-identity95.3%
Simplified95.3%
Final simplification97.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.25e+105) (not (<= u 8.5e+62))) (/ t1 (* u (/ u v))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.25e+105) || !(u <= 8.5e+62)) {
tmp = t1 / (u * (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 <= (-2.25d+105)) .or. (.not. (u <= 8.5d+62))) then
tmp = t1 / (u * (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 <= -2.25e+105) || !(u <= 8.5e+62)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.25e+105) or not (u <= 8.5e+62): tmp = t1 / (u * (u / v)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.25e+105) || !(u <= 8.5e+62)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.25e+105) || ~((u <= 8.5e+62))) tmp = t1 / (u * (u / v)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.25e+105], N[Not[LessEqual[u, 8.5e+62]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.25 \cdot 10^{+105} \lor \neg \left(u \leq 8.5 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.2500000000000001e105 or 8.4999999999999997e62 < u Initial program 80.5%
associate-*l/80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in t1 around 0 75.5%
associate-*r/75.5%
neg-mul-175.5%
unpow275.5%
Simplified75.5%
clear-num74.9%
un-div-inv74.9%
associate-/l*78.1%
add-sqr-sqrt39.9%
sqrt-unprod59.9%
sqr-neg59.9%
sqrt-unprod33.2%
add-sqr-sqrt67.5%
Applied egg-rr67.5%
Taylor expanded in v around 0 68.3%
associate-/l*73.0%
unpow273.0%
associate-*r/72.8%
Simplified72.8%
if -2.2500000000000001e105 < u < 8.4999999999999997e62Initial program 66.1%
associate-*l/76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in t1 around inf 72.5%
associate-*r/72.5%
neg-mul-172.5%
Simplified72.5%
Final simplification72.7%
(FPCore (u v t1) :precision binary64 (if (<= u -2.1e+183) (/ v u) (if (<= u 1.8e+110) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e+183) {
tmp = v / u;
} else if (u <= 1.8e+110) {
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 <= (-2.1d+183)) then
tmp = v / u
else if (u <= 1.8d+110) 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 <= -2.1e+183) {
tmp = v / u;
} else if (u <= 1.8e+110) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.1e+183: tmp = v / u elif u <= 1.8e+110: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.1e+183) tmp = Float64(v / u); elseif (u <= 1.8e+110) 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 <= -2.1e+183) tmp = v / u; elseif (u <= 1.8e+110) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.1e+183], N[(v / u), $MachinePrecision], If[LessEqual[u, 1.8e+110], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+183}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 1.8 \cdot 10^{+110}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.1e183 or 1.7999999999999998e110 < u Initial program 79.9%
associate-/r*92.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 92.1%
mul-1-neg92.1%
associate-/l*97.3%
distribute-neg-frac97.3%
Simplified97.3%
frac-2neg97.3%
distribute-frac-neg97.3%
associate-/l*92.1%
mul-1-neg92.1%
div-inv92.1%
mul-1-neg92.1%
remove-double-neg92.1%
div-inv92.0%
associate-*l*97.2%
div-inv97.2%
distribute-neg-in97.2%
add-sqr-sqrt56.0%
sqrt-unprod91.2%
sqr-neg91.2%
sqrt-unprod41.3%
add-sqr-sqrt97.4%
sub-neg97.4%
Applied egg-rr97.4%
associate-*r/97.5%
*-rgt-identity97.5%
Simplified97.5%
Taylor expanded in t1 around inf 45.6%
if -2.1e183 < u < 1.7999999999999998e110Initial program 68.2%
associate-*l/77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in t1 around inf 67.5%
associate-*r/67.5%
neg-mul-167.5%
Simplified67.5%
Final simplification61.1%
(FPCore (u v t1) :precision binary64 (if (<= u -3.3e+184) (/ (- v) u) (if (<= u 6.8e+110) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.3e+184) {
tmp = -v / u;
} else if (u <= 6.8e+110) {
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 <= (-3.3d+184)) then
tmp = -v / u
else if (u <= 6.8d+110) 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 <= -3.3e+184) {
tmp = -v / u;
} else if (u <= 6.8e+110) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.3e+184: tmp = -v / u elif u <= 6.8e+110: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.3e+184) tmp = Float64(Float64(-v) / u); elseif (u <= 6.8e+110) 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 <= -3.3e+184) tmp = -v / u; elseif (u <= 6.8e+110) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.3e+184], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 6.8e+110], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.3 \cdot 10^{+184}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 6.8 \cdot 10^{+110}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -3.2999999999999998e184Initial program 86.1%
associate-/r*96.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t1 around 0 96.7%
mul-1-neg96.7%
associate-/l*99.9%
distribute-neg-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 41.9%
neg-mul-141.9%
distribute-neg-frac41.9%
Simplified41.9%
if -3.2999999999999998e184 < u < 6.8000000000000003e110Initial program 68.2%
associate-*l/77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in t1 around inf 67.5%
associate-*r/67.5%
neg-mul-167.5%
Simplified67.5%
if 6.8000000000000003e110 < u Initial program 75.5%
associate-/r*88.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 88.8%
mul-1-neg88.8%
associate-/l*95.4%
distribute-neg-frac95.4%
Simplified95.4%
frac-2neg95.4%
distribute-frac-neg95.4%
associate-/l*88.8%
mul-1-neg88.8%
div-inv88.8%
mul-1-neg88.8%
remove-double-neg88.8%
div-inv88.7%
associate-*l*95.3%
div-inv95.4%
distribute-neg-in95.4%
add-sqr-sqrt56.7%
sqrt-unprod89.3%
sqr-neg89.3%
sqrt-unprod38.6%
add-sqr-sqrt95.7%
sub-neg95.7%
Applied egg-rr95.7%
associate-*r/95.8%
*-rgt-identity95.8%
Simplified95.8%
Taylor expanded in t1 around inf 48.3%
Final simplification61.1%
(FPCore (u v t1) :precision binary64 (if (<= t1 -4.3e+137) (/ v t1) (if (<= t1 1.32e+98) (/ v u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4.3e+137) {
tmp = v / t1;
} else if (t1 <= 1.32e+98) {
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 (t1 <= (-4.3d+137)) then
tmp = v / t1
else if (t1 <= 1.32d+98) 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 (t1 <= -4.3e+137) {
tmp = v / t1;
} else if (t1 <= 1.32e+98) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -4.3e+137: tmp = v / t1 elif t1 <= 1.32e+98: tmp = v / u else: tmp = v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -4.3e+137) tmp = Float64(v / t1); elseif (t1 <= 1.32e+98) tmp = Float64(v / u); else tmp = Float64(v / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -4.3e+137) tmp = v / t1; elseif (t1 <= 1.32e+98) tmp = v / u; else tmp = v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -4.3e+137], N[(v / t1), $MachinePrecision], If[LessEqual[t1, 1.32e+98], N[(v / u), $MachinePrecision], N[(v / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.3 \cdot 10^{+137}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{elif}\;t1 \leq 1.32 \cdot 10^{+98}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -4.29999999999999965e137 or 1.3200000000000001e98 < t1 Initial program 48.0%
associate-*l/53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in t1 around inf 89.2%
expm1-log1p-u79.9%
expm1-udef52.3%
frac-2neg52.3%
metadata-eval52.3%
un-div-inv52.3%
add-sqr-sqrt24.0%
sqrt-unprod43.6%
sqr-neg43.6%
sqrt-unprod24.4%
add-sqr-sqrt43.2%
Applied egg-rr43.2%
expm1-def40.2%
expm1-log1p40.3%
Simplified40.3%
if -4.29999999999999965e137 < t1 < 1.3200000000000001e98Initial program 83.2%
associate-/r*89.3%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in t1 around 0 64.8%
mul-1-neg64.8%
associate-/l*66.5%
distribute-neg-frac66.5%
Simplified66.5%
frac-2neg66.5%
distribute-frac-neg66.5%
associate-/l*64.8%
mul-1-neg64.8%
div-inv64.8%
mul-1-neg64.8%
remove-double-neg64.8%
div-inv64.7%
associate-*l*66.4%
div-inv66.5%
distribute-neg-in66.5%
add-sqr-sqrt33.5%
sqrt-unprod66.9%
sqr-neg66.9%
sqrt-unprod32.8%
add-sqr-sqrt66.2%
sub-neg66.2%
Applied egg-rr66.2%
associate-*r/66.2%
*-rgt-identity66.2%
Simplified66.2%
Taylor expanded in t1 around inf 18.6%
Final simplification25.7%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
return -v / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return -v / (t1 + u);
}
def code(u, v, t1): return -v / (t1 + u)
function code(u, v, t1) return Float64(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 71.6%
associate-/r*81.5%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in t1 around inf 61.3%
neg-mul-161.3%
Simplified61.3%
Final simplification61.3%
(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 71.6%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in t1 around inf 53.4%
expm1-log1p-u43.1%
expm1-udef31.3%
frac-2neg31.3%
metadata-eval31.3%
un-div-inv31.3%
add-sqr-sqrt14.3%
sqrt-unprod24.3%
sqr-neg24.3%
sqrt-unprod12.1%
add-sqr-sqrt22.4%
Applied egg-rr22.4%
expm1-def14.7%
expm1-log1p15.1%
Simplified15.1%
Final simplification15.1%
herbie shell --seed 2023283
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))