
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 4e+91)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (* t_m (/ t_m l_m)) l_m))))))
(asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (* l_m (/ (sqrt 0.5) t_m))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 4e+91) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * (l_m * (sqrt(0.5) / t_m))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 4d+91) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t_m * (t_m / l_m)) / l_m))))))
else
tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * (l_m * (sqrt(0.5d0) / t_m))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 4e+91) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * (l_m * (Math.sqrt(0.5) / t_m))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 4e+91: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))) else: tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * (l_m * (math.sqrt(0.5) / t_m)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 4e+91) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l_m)) / l_m)))))); else tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(l_m * Float64(sqrt(0.5) / t_m)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 4e+91) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))); else tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * (l_m * (sqrt(0.5) / t_m)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 4e+91], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 4 \cdot 10^{+91}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{t\_m \cdot \frac{t\_m}{l\_m}}{l\_m}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 4.00000000000000032e91Initial program 88.5%
unpow288.5%
associate-*r/88.6%
Applied egg-rr88.6%
unpow288.6%
clear-num88.6%
un-div-inv88.6%
Applied egg-rr88.6%
if 4.00000000000000032e91 < (/.f64 t l) Initial program 58.4%
Taylor expanded in t around inf 83.0%
*-commutative83.0%
unpow283.0%
unpow283.0%
times-frac99.6%
unpow299.6%
associate-/l*99.6%
Simplified99.6%
Final simplification90.4%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (/ (* t_m (sqrt 2.0)) l_m)))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t_m * sqrt(2.0)) / l_m))));
}
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((t_m * Math.sqrt(2.0)) / l_m))));
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t_m * math.sqrt(2.0)) / l_m))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t_m * sqrt(2.0)) / l_m)))) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t_m * sqrt(2.0)) / l_m)))); end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t\_m \cdot \sqrt{2}}{l\_m}\right)}\right)
\end{array}
Initial program 83.6%
sqrt-div83.6%
div-inv83.6%
add-sqr-sqrt83.6%
hypot-1-def83.6%
*-commutative83.6%
sqrt-prod83.5%
sqrt-pow198.3%
metadata-eval98.3%
pow198.3%
Applied egg-rr98.3%
associate-*r/98.3%
*-rgt-identity98.3%
associate-*l/98.3%
Simplified98.3%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* t_m (/ (sqrt 2.0) l_m))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, (t_m * (sqrt(2.0) / l_m)))));
}
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, (t_m * (Math.sqrt(2.0) / l_m)))));
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, (t_m * (math.sqrt(2.0) / l_m)))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(t_m * Float64(sqrt(2.0) / l_m))))) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, (t_m * (sqrt(2.0) / l_m))))); end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, t\_m \cdot \frac{\sqrt{2}}{l\_m}\right)}\right)
\end{array}
Initial program 83.6%
sqrt-div83.6%
add-sqr-sqrt83.6%
hypot-1-def83.6%
*-commutative83.6%
sqrt-prod83.5%
sqrt-pow198.3%
metadata-eval98.3%
pow198.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 98.3%
associate-*r/98.3%
Simplified98.3%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 5e+96)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (* t_m (/ t_m l_m)) l_m))))))
(asin (* l_m (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (* t_m (sqrt 2.0)))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 5e+96) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = asin((l_m * (sqrt((1.0 - pow((Om / Omc), 2.0))) / (t_m * sqrt(2.0)))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 5d+96) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t_m * (t_m / l_m)) / l_m))))))
else
tmp = asin((l_m * (sqrt((1.0d0 - ((om / omc) ** 2.0d0))) / (t_m * sqrt(2.0d0)))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 5e+96) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = Math.asin((l_m * (Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / (t_m * Math.sqrt(2.0)))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 5e+96: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))) else: tmp = math.asin((l_m * (math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / (t_m * math.sqrt(2.0))))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 5e+96) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l_m)) / l_m)))))); else tmp = asin(Float64(l_m * Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / Float64(t_m * sqrt(2.0))))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 5e+96) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))); else tmp = asin((l_m * (sqrt((1.0 - ((Om / Omc) ^ 2.0))) / (t_m * sqrt(2.0))))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 5e+96], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m * N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 5 \cdot 10^{+96}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{t\_m \cdot \frac{t\_m}{l\_m}}{l\_m}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 5.0000000000000004e96Initial program 88.6%
unpow288.6%
associate-*r/88.6%
Applied egg-rr88.6%
unpow288.6%
clear-num88.6%
un-div-inv88.6%
Applied egg-rr88.6%
if 5.0000000000000004e96 < (/.f64 t l) Initial program 57.4%
sqrt-div57.4%
div-inv57.4%
add-sqr-sqrt57.4%
hypot-1-def57.4%
*-commutative57.4%
sqrt-prod57.3%
sqrt-pow197.7%
metadata-eval97.7%
pow197.7%
Applied egg-rr97.7%
associate-*r/97.7%
*-rgt-identity97.7%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in t around inf 82.5%
associate-*l/82.5%
associate-*r/82.5%
unpow282.5%
unpow282.5%
times-frac99.5%
unpow299.5%
Simplified99.5%
Final simplification90.4%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 2e+149)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ 1.0 (* (/ l_m t_m) (/ l_m t_m))))))))
(asin (/ l_m (* t_m (sqrt 2.0))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e+149) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m))))))));
} else {
tmp = asin((l_m / (t_m * sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 2d+149) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (1.0d0 / ((l_m / t_m) * (l_m / t_m))))))))
else
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e+149) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m))))))));
} else {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 2e+149: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m)))))))) else: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 2e+149) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(1.0 / Float64(Float64(l_m / t_m) * Float64(l_m / t_m)))))))); else tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 2e+149) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m)))))))); else tmp = asin((l_m / (t_m * sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e+149], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(1.0 / N[(N[(l$95$m / t$95$m), $MachinePrecision] * N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{+149}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{1}{\frac{l\_m}{t\_m} \cdot \frac{l\_m}{t\_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 2.0000000000000001e149Initial program 88.9%
unpow288.9%
clear-num88.9%
clear-num88.9%
frac-times88.9%
metadata-eval88.9%
Applied egg-rr88.9%
unpow287.6%
clear-num87.6%
un-div-inv87.6%
Applied egg-rr88.9%
if 2.0000000000000001e149 < (/.f64 t l) Initial program 50.1%
sqrt-div50.1%
div-inv50.1%
add-sqr-sqrt50.1%
hypot-1-def50.1%
*-commutative50.1%
sqrt-prod50.1%
sqrt-pow197.4%
metadata-eval97.4%
pow197.4%
Applied egg-rr97.4%
associate-*r/97.4%
*-rgt-identity97.4%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in Om around 0 97.5%
Taylor expanded in t around inf 99.6%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 4.5e+79)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (* t_m (/ t_m l_m)) l_m))))))
(asin (/ l_m (* t_m (sqrt 2.0))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 4.5e+79) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = asin((l_m / (t_m * sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (t_m <= 4.5d+79) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t_m * (t_m / l_m)) / l_m))))))
else
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 4.5e+79) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if t_m <= 4.5e+79: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))) else: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (t_m <= 4.5e+79) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l_m)) / l_m)))))); else tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if (t_m <= 4.5e+79) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))); else tmp = asin((l_m / (t_m * sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[t$95$m, 4.5e+79], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 4.5 \cdot 10^{+79}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{t\_m \cdot \frac{t\_m}{l\_m}}{l\_m}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 4.49999999999999994e79Initial program 85.0%
unpow285.0%
associate-*r/84.6%
Applied egg-rr84.6%
unpow284.6%
clear-num84.6%
un-div-inv84.6%
Applied egg-rr84.6%
if 4.49999999999999994e79 < t Initial program 78.1%
sqrt-div78.0%
div-inv78.0%
add-sqr-sqrt78.0%
hypot-1-def78.0%
*-commutative78.0%
sqrt-prod77.9%
sqrt-pow199.0%
metadata-eval99.0%
pow199.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in Om around 0 99.1%
Taylor expanded in t around inf 44.3%
Final simplification76.2%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= t_m 4.5e+78) (asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (/ (* t_m (/ t_m l_m)) l_m)))))) (asin (/ l_m (* t_m (sqrt 2.0))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 4.5e+78) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = asin((l_m / (t_m * sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (t_m <= 4.5d+78) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t_m * (t_m / l_m)) / l_m))))))
else
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 4.5e+78) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if t_m <= 4.5e+78: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))) else: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (t_m <= 4.5e+78) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l_m)) / l_m)))))); else tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if (t_m <= 4.5e+78) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))); else tmp = asin((l_m / (t_m * sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[t$95$m, 4.5e+78], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 4.5 \cdot 10^{+78}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t\_m \cdot \frac{t\_m}{l\_m}}{l\_m}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 4.4999999999999999e78Initial program 85.0%
unpow285.0%
associate-*r/84.6%
Applied egg-rr84.6%
Taylor expanded in Om around 0 82.9%
if 4.4999999999999999e78 < t Initial program 78.1%
sqrt-div78.0%
div-inv78.0%
add-sqr-sqrt78.0%
hypot-1-def78.0%
*-commutative78.0%
sqrt-prod77.9%
sqrt-pow199.0%
metadata-eval99.0%
pow199.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in Om around 0 99.1%
Taylor expanded in t around inf 44.3%
Final simplification74.9%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= t_m 7.6e+22) (asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om))))) (asin (/ l_m (* t_m (sqrt 2.0))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 7.6e+22) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin((l_m / (t_m * sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (t_m <= 7.6d+22) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 7.6e+22) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if t_m <= 7.6e+22: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (t_m <= 7.6e+22) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if (t_m <= 7.6e+22) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin((l_m / (t_m * sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[t$95$m, 7.6e+22], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 7.6 \cdot 10^{+22}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 7.6000000000000008e22Initial program 87.1%
Taylor expanded in t around 0 50.8%
unpow250.8%
unpow250.8%
times-frac55.8%
unpow255.8%
Simplified55.8%
unpow286.6%
clear-num86.6%
un-div-inv86.6%
Applied egg-rr55.8%
if 7.6000000000000008e22 < t Initial program 73.3%
sqrt-div73.3%
div-inv73.3%
add-sqr-sqrt73.3%
hypot-1-def73.3%
*-commutative73.3%
sqrt-prod73.2%
sqrt-pow199.0%
metadata-eval99.0%
pow199.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in Om around 0 99.0%
Taylor expanded in t around inf 43.9%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= t_m 3.7e+22) (asin 1.0) (asin (/ l_m (* t_m (sqrt 2.0))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 3.7e+22) {
tmp = asin(1.0);
} else {
tmp = asin((l_m / (t_m * sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (t_m <= 3.7d+22) then
tmp = asin(1.0d0)
else
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 3.7e+22) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if t_m <= 3.7e+22: tmp = math.asin(1.0) else: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (t_m <= 3.7e+22) tmp = asin(1.0); else tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if (t_m <= 3.7e+22) tmp = asin(1.0); else tmp = asin((l_m / (t_m * sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[t$95$m, 3.7e+22], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 3.7 \cdot 10^{+22}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 3.6999999999999998e22Initial program 87.1%
Taylor expanded in t around 0 50.8%
unpow250.8%
unpow250.8%
times-frac55.8%
unpow255.8%
Simplified55.8%
Taylor expanded in Om around 0 54.8%
if 3.6999999999999998e22 < t Initial program 73.3%
sqrt-div73.3%
div-inv73.3%
add-sqr-sqrt73.3%
hypot-1-def73.3%
*-commutative73.3%
sqrt-prod73.2%
sqrt-pow199.0%
metadata-eval99.0%
pow199.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in Om around 0 99.0%
Taylor expanded in t around inf 43.9%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin 1.0))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
return asin(1.0);
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(1.0d0)
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
return Math.asin(1.0);
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin(1.0)
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(1.0) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin(1.0); end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} 1
\end{array}
Initial program 83.6%
Taylor expanded in t around 0 43.8%
unpow243.8%
unpow243.8%
times-frac48.8%
unpow248.8%
Simplified48.8%
Taylor expanded in Om around 0 48.0%
herbie shell --seed 2024146
(FPCore (t l Om Omc)
:name "Toniolo and Linder, Equation (2)"
:precision binary64
(asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))