
(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 9 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
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t_m l_m) 2e+140)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (pow (/ t_m l_m) 2.0))))))
(asin (* (sqrt t_1) (* (/ 1.0 t_m) (* l_m (sqrt 0.5))))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 2e+140) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * pow((t_m / l_m), 2.0))))));
} else {
tmp = asin((sqrt(t_1) * ((1.0 / t_m) * (l_m * sqrt(0.5)))));
}
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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t_m / l_m) <= 2d+140) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l_m) ** 2.0d0))))))
else
tmp = asin((sqrt(t_1) * ((1.0d0 / t_m) * (l_m * sqrt(0.5d0)))))
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 t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 2e+140) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * Math.pow((t_m / l_m), 2.0))))));
} else {
tmp = Math.asin((Math.sqrt(t_1) * ((1.0 / t_m) * (l_m * Math.sqrt(0.5)))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t_m / l_m) <= 2e+140: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * math.pow((t_m / l_m), 2.0)))))) else: tmp = math.asin((math.sqrt(t_1) * ((1.0 / t_m) * (l_m * math.sqrt(0.5))))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t_m / l_m) <= 2e+140) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * (Float64(t_m / l_m) ^ 2.0)))))); else tmp = asin(Float64(sqrt(t_1) * Float64(Float64(1.0 / t_m) * Float64(l_m * sqrt(0.5))))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t_m / l_m) <= 2e+140) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l_m) ^ 2.0)))))); else tmp = asin((sqrt(t_1) * ((1.0 / t_m) * (l_m * sqrt(0.5))))); 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_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e+140], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[Power[N[(t$95$m / l$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{+140}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t\_1}{1 + 2 \cdot {\left(\frac{t\_m}{l\_m}\right)}^{2}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t\_1} \cdot \left(\frac{1}{t\_m} \cdot \left(l\_m \cdot \sqrt{0.5}\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 2.00000000000000012e140Initial program 91.0%
unpow291.0%
clear-num91.0%
un-div-inv91.0%
Applied egg-rr91.0%
if 2.00000000000000012e140 < (/.f64 t l) Initial program 33.0%
Taylor expanded in t around inf 94.7%
*-commutative94.7%
unpow294.7%
unpow294.7%
times-frac99.3%
unpow299.3%
associate-/l*99.5%
Simplified99.5%
unpow233.0%
clear-num33.0%
un-div-inv33.0%
Applied egg-rr99.5%
associate-*r/99.3%
clear-num99.5%
Applied egg-rr99.5%
associate-/r/99.5%
Simplified99.5%
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 l_m) (sqrt 2.0))))))
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 / l_m) * sqrt(2.0)))));
}
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 / l_m) * Math.sqrt(2.0)))));
}
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 / l_m) * math.sqrt(2.0)))))
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 / l_m) * sqrt(2.0))))) 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 / l_m) * sqrt(2.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[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 / l$95$m), $MachinePrecision] * N[Sqrt[2.0], $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, \frac{t\_m}{l\_m} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 81.3%
sqrt-div81.2%
div-inv81.2%
add-sqr-sqrt81.2%
hypot-1-def81.2%
*-commutative81.2%
sqrt-prod81.2%
sqrt-pow198.5%
metadata-eval98.5%
pow198.5%
Applied egg-rr98.5%
associate-*r/98.5%
*-rgt-identity98.5%
Simplified98.5%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin (/ 1.0 (hypot 1.0 (* (/ t_m l_m) (sqrt 2.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 / hypot(1.0, ((t_m / l_m) * sqrt(2.0)))));
}
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 / Math.hypot(1.0, ((t_m / l_m) * Math.sqrt(2.0)))));
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin((1.0 / math.hypot(1.0, ((t_m / l_m) * math.sqrt(2.0)))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(1.0 / hypot(1.0, Float64(Float64(t_m / l_m) * sqrt(2.0))))) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin((1.0 / hypot(1.0, ((t_m / l_m) * sqrt(2.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[N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \frac{t\_m}{l\_m} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 81.3%
sqrt-div81.2%
div-inv81.2%
add-sqr-sqrt81.2%
hypot-1-def81.2%
*-commutative81.2%
sqrt-prod81.2%
sqrt-pow198.5%
metadata-eval98.5%
pow198.5%
Applied egg-rr98.5%
associate-*r/98.5%
*-rgt-identity98.5%
Simplified98.5%
Taylor expanded in Om around 0 97.2%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (or (<= t_m 3.3e-87) (and (not (<= t_m 6.2e-69)) (<= t_m 4.2e-10))) (asin 1.0) (asin (* 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 <= 3.3e-87) || (!(t_m <= 6.2e-69) && (t_m <= 4.2e-10))) {
tmp = asin(1.0);
} else {
tmp = asin((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 <= 3.3d-87) .or. (.not. (t_m <= 6.2d-69)) .and. (t_m <= 4.2d-10)) then
tmp = asin(1.0d0)
else
tmp = asin((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 <= 3.3e-87) || (!(t_m <= 6.2e-69) && (t_m <= 4.2e-10))) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((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 <= 3.3e-87) or (not (t_m <= 6.2e-69) and (t_m <= 4.2e-10)): tmp = math.asin(1.0) else: tmp = math.asin((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 ((t_m <= 3.3e-87) || (!(t_m <= 6.2e-69) && (t_m <= 4.2e-10))) tmp = asin(1.0); else tmp = asin(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 <= 3.3e-87) || (~((t_m <= 6.2e-69)) && (t_m <= 4.2e-10))) tmp = asin(1.0); else tmp = asin((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[Or[LessEqual[t$95$m, 3.3e-87], And[N[Not[LessEqual[t$95$m, 6.2e-69]], $MachinePrecision], LessEqual[t$95$m, 4.2e-10]]], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $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.3 \cdot 10^{-87} \lor \neg \left(t\_m \leq 6.2 \cdot 10^{-69}\right) \land t\_m \leq 4.2 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\end{array}
\end{array}
if t < 3.3e-87 or 6.1999999999999999e-69 < t < 4.2e-10Initial program 88.7%
Taylor expanded in t around 0 59.4%
unpow259.4%
unpow259.4%
times-frac64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in Om around 0 63.1%
if 3.3e-87 < t < 6.1999999999999999e-69 or 4.2e-10 < t Initial program 64.0%
Taylor expanded in t around inf 61.3%
*-commutative61.3%
unpow261.3%
unpow261.3%
times-frac65.1%
unpow265.1%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in Om around 0 65.2%
Taylor expanded in l around 0 65.1%
associate-*r/65.2%
Simplified65.2%
Final simplification63.7%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 3.3e-87)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= t_m 2e-69)
(asin (/ l_m (/ t_m (sqrt 0.5))))
(if (<= t_m 4.2e-10) (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.3e-87) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if (t_m <= 2e-69) {
tmp = asin((l_m / (t_m / sqrt(0.5))));
} else if (t_m <= 4.2e-10) {
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.3d-87) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else if (t_m <= 2d-69) then
tmp = asin((l_m / (t_m / sqrt(0.5d0))))
else if (t_m <= 4.2d-10) 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.3e-87) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if (t_m <= 2e-69) {
tmp = Math.asin((l_m / (t_m / Math.sqrt(0.5))));
} else if (t_m <= 4.2e-10) {
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.3e-87: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) elif t_m <= 2e-69: tmp = math.asin((l_m / (t_m / math.sqrt(0.5)))) elif t_m <= 4.2e-10: 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.3e-87) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); elseif (t_m <= 2e-69) tmp = asin(Float64(l_m / Float64(t_m / sqrt(0.5)))); elseif (t_m <= 4.2e-10) 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.3e-87) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); elseif (t_m <= 2e-69) tmp = asin((l_m / (t_m / sqrt(0.5)))); elseif (t_m <= 4.2e-10) 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.3e-87], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 2e-69], N[ArcSin[N[(l$95$m / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 4.2e-10], 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.3 \cdot 10^{-87}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-69}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{\frac{t\_m}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 3.3e-87Initial program 89.0%
Taylor expanded in t around 0 58.7%
unpow258.7%
unpow258.7%
times-frac63.1%
unpow263.1%
Simplified63.1%
unpow289.0%
clear-num89.0%
un-div-inv89.0%
Applied egg-rr63.1%
if 3.3e-87 < t < 1.9999999999999999e-69Initial program 43.1%
Taylor expanded in t around inf 60.2%
*-commutative60.2%
unpow260.2%
unpow260.2%
times-frac60.9%
unpow260.9%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in Om around 0 60.9%
clear-num60.9%
un-div-inv60.9%
Applied egg-rr60.9%
if 1.9999999999999999e-69 < t < 4.2e-10Initial program 84.3%
Taylor expanded in t around 0 68.3%
unpow268.3%
unpow268.3%
times-frac76.7%
unpow276.7%
Simplified76.7%
Taylor expanded in Om around 0 76.7%
if 4.2e-10 < t Initial program 65.5%
sqrt-div65.5%
div-inv65.5%
add-sqr-sqrt65.5%
hypot-1-def65.5%
*-commutative65.5%
sqrt-prod65.4%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
associate-*r/97.5%
*-rgt-identity97.5%
Simplified97.5%
Taylor expanded in Om around 0 96.8%
Taylor expanded in t around inf 65.6%
Final simplification64.4%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 3.3e-87)
(asin (+ 1.0 (* (pow (/ Om Omc) 2.0) -0.5)))
(if (<= t_m 2e-69)
(asin (/ l_m (/ t_m (sqrt 0.5))))
(if (<= t_m 4.2e-10) (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.3e-87) {
tmp = asin((1.0 + (pow((Om / Omc), 2.0) * -0.5)));
} else if (t_m <= 2e-69) {
tmp = asin((l_m / (t_m / sqrt(0.5))));
} else if (t_m <= 4.2e-10) {
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.3d-87) then
tmp = asin((1.0d0 + (((om / omc) ** 2.0d0) * (-0.5d0))))
else if (t_m <= 2d-69) then
tmp = asin((l_m / (t_m / sqrt(0.5d0))))
else if (t_m <= 4.2d-10) 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.3e-87) {
tmp = Math.asin((1.0 + (Math.pow((Om / Omc), 2.0) * -0.5)));
} else if (t_m <= 2e-69) {
tmp = Math.asin((l_m / (t_m / Math.sqrt(0.5))));
} else if (t_m <= 4.2e-10) {
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.3e-87: tmp = math.asin((1.0 + (math.pow((Om / Omc), 2.0) * -0.5))) elif t_m <= 2e-69: tmp = math.asin((l_m / (t_m / math.sqrt(0.5)))) elif t_m <= 4.2e-10: 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.3e-87) tmp = asin(Float64(1.0 + Float64((Float64(Om / Omc) ^ 2.0) * -0.5))); elseif (t_m <= 2e-69) tmp = asin(Float64(l_m / Float64(t_m / sqrt(0.5)))); elseif (t_m <= 4.2e-10) 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.3e-87) tmp = asin((1.0 + (((Om / Omc) ^ 2.0) * -0.5))); elseif (t_m <= 2e-69) tmp = asin((l_m / (t_m / sqrt(0.5)))); elseif (t_m <= 4.2e-10) 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.3e-87], N[ArcSin[N[(1.0 + N[(N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 2e-69], N[ArcSin[N[(l$95$m / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 4.2e-10], 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.3 \cdot 10^{-87}:\\
\;\;\;\;\sin^{-1} \left(1 + {\left(\frac{Om}{Omc}\right)}^{2} \cdot -0.5\right)\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-69}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{\frac{t\_m}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 3.3e-87Initial program 89.0%
Taylor expanded in t around 0 58.7%
unpow258.7%
unpow258.7%
times-frac63.1%
unpow263.1%
Simplified63.1%
Taylor expanded in Om around 0 58.1%
unpow258.1%
unpow258.1%
times-frac62.5%
unpow262.5%
Simplified62.5%
if 3.3e-87 < t < 1.9999999999999999e-69Initial program 43.1%
Taylor expanded in t around inf 60.2%
*-commutative60.2%
unpow260.2%
unpow260.2%
times-frac60.9%
unpow260.9%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in Om around 0 60.9%
clear-num60.9%
un-div-inv60.9%
Applied egg-rr60.9%
if 1.9999999999999999e-69 < t < 4.2e-10Initial program 84.3%
Taylor expanded in t around 0 68.3%
unpow268.3%
unpow268.3%
times-frac76.7%
unpow276.7%
Simplified76.7%
Taylor expanded in Om around 0 76.7%
if 4.2e-10 < t Initial program 65.5%
sqrt-div65.5%
div-inv65.5%
add-sqr-sqrt65.5%
hypot-1-def65.5%
*-commutative65.5%
sqrt-prod65.4%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
associate-*r/97.5%
*-rgt-identity97.5%
Simplified97.5%
Taylor expanded in Om around 0 96.8%
Taylor expanded in t around inf 65.6%
Final simplification64.0%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 3.1e-87)
(asin 1.0)
(if (<= t_m 2e-69)
(asin (/ l_m (/ t_m (sqrt 0.5))))
(if (<= t_m 4.3e-10) (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.1e-87) {
tmp = asin(1.0);
} else if (t_m <= 2e-69) {
tmp = asin((l_m / (t_m / sqrt(0.5))));
} else if (t_m <= 4.3e-10) {
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.1d-87) then
tmp = asin(1.0d0)
else if (t_m <= 2d-69) then
tmp = asin((l_m / (t_m / sqrt(0.5d0))))
else if (t_m <= 4.3d-10) 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.1e-87) {
tmp = Math.asin(1.0);
} else if (t_m <= 2e-69) {
tmp = Math.asin((l_m / (t_m / Math.sqrt(0.5))));
} else if (t_m <= 4.3e-10) {
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.1e-87: tmp = math.asin(1.0) elif t_m <= 2e-69: tmp = math.asin((l_m / (t_m / math.sqrt(0.5)))) elif t_m <= 4.3e-10: 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.1e-87) tmp = asin(1.0); elseif (t_m <= 2e-69) tmp = asin(Float64(l_m / Float64(t_m / sqrt(0.5)))); elseif (t_m <= 4.3e-10) 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.1e-87) tmp = asin(1.0); elseif (t_m <= 2e-69) tmp = asin((l_m / (t_m / sqrt(0.5)))); elseif (t_m <= 4.3e-10) 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.1e-87], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[t$95$m, 2e-69], N[ArcSin[N[(l$95$m / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 4.3e-10], 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.1 \cdot 10^{-87}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-69}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{\frac{t\_m}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 3.09999999999999998e-87 or 1.9999999999999999e-69 < t < 4.30000000000000014e-10Initial program 88.7%
Taylor expanded in t around 0 59.4%
unpow259.4%
unpow259.4%
times-frac64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in Om around 0 63.1%
if 3.09999999999999998e-87 < t < 1.9999999999999999e-69Initial program 43.1%
Taylor expanded in t around inf 60.2%
*-commutative60.2%
unpow260.2%
unpow260.2%
times-frac60.9%
unpow260.9%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in Om around 0 60.9%
clear-num60.9%
un-div-inv60.9%
Applied egg-rr60.9%
if 4.30000000000000014e-10 < t Initial program 65.5%
sqrt-div65.5%
div-inv65.5%
add-sqr-sqrt65.5%
hypot-1-def65.5%
*-commutative65.5%
sqrt-prod65.4%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
associate-*r/97.5%
*-rgt-identity97.5%
Simplified97.5%
Taylor expanded in Om around 0 96.8%
Taylor expanded in t around inf 65.6%
Final simplification63.7%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 3.3e-87)
(asin 1.0)
(if (<= t_m 2.7e-69)
(asin (* l_m (/ (sqrt 0.5) t_m)))
(if (<= t_m 4.3e-10) (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.3e-87) {
tmp = asin(1.0);
} else if (t_m <= 2.7e-69) {
tmp = asin((l_m * (sqrt(0.5) / t_m)));
} else if (t_m <= 4.3e-10) {
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.3d-87) then
tmp = asin(1.0d0)
else if (t_m <= 2.7d-69) then
tmp = asin((l_m * (sqrt(0.5d0) / t_m)))
else if (t_m <= 4.3d-10) 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.3e-87) {
tmp = Math.asin(1.0);
} else if (t_m <= 2.7e-69) {
tmp = Math.asin((l_m * (Math.sqrt(0.5) / t_m)));
} else if (t_m <= 4.3e-10) {
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.3e-87: tmp = math.asin(1.0) elif t_m <= 2.7e-69: tmp = math.asin((l_m * (math.sqrt(0.5) / t_m))) elif t_m <= 4.3e-10: 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.3e-87) tmp = asin(1.0); elseif (t_m <= 2.7e-69) tmp = asin(Float64(l_m * Float64(sqrt(0.5) / t_m))); elseif (t_m <= 4.3e-10) 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.3e-87) tmp = asin(1.0); elseif (t_m <= 2.7e-69) tmp = asin((l_m * (sqrt(0.5) / t_m))); elseif (t_m <= 4.3e-10) 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.3e-87], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[t$95$m, 2.7e-69], N[ArcSin[N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 4.3e-10], 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.3 \cdot 10^{-87}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;t\_m \leq 2.7 \cdot 10^{-69}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 3.3e-87 or 2.6999999999999997e-69 < t < 4.30000000000000014e-10Initial program 88.7%
Taylor expanded in t around 0 59.4%
unpow259.4%
unpow259.4%
times-frac64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in Om around 0 63.1%
if 3.3e-87 < t < 2.6999999999999997e-69Initial program 43.1%
Taylor expanded in t around inf 60.2%
*-commutative60.2%
unpow260.2%
unpow260.2%
times-frac60.9%
unpow260.9%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in Om around 0 60.9%
Taylor expanded in l around 0 60.9%
associate-*r/60.9%
Simplified60.9%
if 4.30000000000000014e-10 < t Initial program 65.5%
sqrt-div65.5%
div-inv65.5%
add-sqr-sqrt65.5%
hypot-1-def65.5%
*-commutative65.5%
sqrt-prod65.4%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
associate-*r/97.5%
*-rgt-identity97.5%
Simplified97.5%
Taylor expanded in Om around 0 96.8%
Taylor expanded in t around inf 65.6%
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 81.3%
Taylor expanded in t around 0 46.5%
unpow246.5%
unpow246.5%
times-frac50.1%
unpow250.1%
Simplified50.1%
Taylor expanded in Om around 0 49.3%
herbie shell --seed 2024114
(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)))))))