
(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 13 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}
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (sqrt (- 1.0 (pow (/ Om Omc) 2.0)))))
(if (<= (/ t l) -2e+48)
(asin (* t_1 (/ (- l) (/ t (sqrt 0.5)))))
(if (<= (/ t l) 2e+152)
(asin
(sqrt
(/
(- 1.0 (* (/ Om Omc) (/ Om Omc)))
(+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (* t_1 (/ (/ l t) (sqrt 2.0))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = sqrt((1.0 - pow((Om / Omc), 2.0)));
double tmp;
if ((t / l) <= -2e+48) {
tmp = asin((t_1 * (-l / (t / sqrt(0.5)))));
} else if ((t / l) <= 2e+152) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin((t_1 * ((l / t) / sqrt(2.0))));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 - ((om / omc) ** 2.0d0)))
if ((t / l) <= (-2d+48)) then
tmp = asin((t_1 * (-l / (t / sqrt(0.5d0)))))
else if ((t / l) <= 2d+152) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin((t_1 * ((l / t) / sqrt(2.0d0))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0)));
double tmp;
if ((t / l) <= -2e+48) {
tmp = Math.asin((t_1 * (-l / (t / Math.sqrt(0.5)))));
} else if ((t / l) <= 2e+152) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin((t_1 * ((l / t) / Math.sqrt(2.0))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) tmp = 0 if (t / l) <= -2e+48: tmp = math.asin((t_1 * (-l / (t / math.sqrt(0.5))))) elif (t / l) <= 2e+152: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin((t_1 * ((l / t) / math.sqrt(2.0)))) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) tmp = 0.0 if (Float64(t / l) <= -2e+48) tmp = asin(Float64(t_1 * Float64(Float64(-l) / Float64(t / sqrt(0.5))))); elseif (Float64(t / l) <= 2e+152) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(t_1 * Float64(Float64(l / t) / sqrt(2.0)))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = sqrt((1.0 - ((Om / Omc) ^ 2.0))); tmp = 0.0; if ((t / l) <= -2e+48) tmp = asin((t_1 * (-l / (t / sqrt(0.5))))); elseif ((t / l) <= 2e+152) tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin((t_1 * ((l / t) / sqrt(2.0)))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -2e+48], N[ArcSin[N[(t$95$1 * N[((-l) / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+152], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(t$95$1 * N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+48}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2.00000000000000009e48Initial program 59.1%
Taylor expanded in t around -inf 88.5%
mul-1-neg88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
unpow288.5%
unpow288.5%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/l*99.7%
Simplified99.7%
if -2.00000000000000009e48 < (/.f64 t l) < 2.0000000000000001e152Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
unpow299.3%
Applied egg-rr99.3%
if 2.0000000000000001e152 < (/.f64 t l) Initial program 22.2%
sqrt-div22.2%
add-sqr-sqrt22.2%
hypot-1-def22.2%
*-commutative22.2%
sqrt-prod22.2%
unpow222.2%
sqrt-prod95.9%
add-sqr-sqrt96.0%
Applied egg-rr96.0%
Taylor expanded in t around inf 88.0%
*-commutative88.0%
unpow288.0%
unpow288.0%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.5%
Simplified99.5%
Final simplification99.4%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0)))));
}
t = Math.abs(t);
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))) / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
}
t = abs(t) def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t / l) * math.sqrt(2.0)))))
t = abs(t) function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0))))) end
t = abs(t) function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0))))); end
NOTE: t should be positive before calling this function code[t_, l_, 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 / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 80.3%
sqrt-div80.3%
add-sqr-sqrt80.3%
hypot-1-def80.3%
*-commutative80.3%
sqrt-prod80.2%
unpow280.2%
sqrt-prod56.5%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
Final simplification98.2%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+154)
(asin (* (sqrt 0.5) (- (/ l t))))
(if (<= (/ t l) 5e+69)
(asin
(sqrt
(/
(- 1.0 (* (/ Om Omc) (/ Om Omc)))
(+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ l (/ t (sqrt 0.5))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = asin((sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 5e+69) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * (l / (t / sqrt(0.5)))));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-2d+154)) then
tmp = asin((sqrt(0.5d0) * -(l / t)))
else if ((t / l) <= 5d+69) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * (l / (t / sqrt(0.5d0)))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 5e+69) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * (l / (t / Math.sqrt(0.5)))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+154: tmp = math.asin((math.sqrt(0.5) * -(l / t))) elif (t / l) <= 5e+69: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * (l / (t / math.sqrt(0.5))))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+154) tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t)))); elseif (Float64(t / l) <= 5e+69) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(l / Float64(t / sqrt(0.5))))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+154) tmp = asin((sqrt(0.5) * -(l / t))); elseif ((t / l) <= 5e+69) tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * (l / (t / sqrt(0.5))))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+154], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+69], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $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 / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+69}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2.00000000000000007e154Initial program 37.3%
unpow237.3%
clear-num37.3%
un-div-inv37.3%
Applied egg-rr37.3%
Taylor expanded in Om around 0 37.3%
*-commutative37.3%
associate-*l/37.3%
rem-square-sqrt37.3%
unpow237.3%
*-commutative37.3%
*-commutative37.3%
unpow237.3%
rem-square-sqrt37.3%
associate-*l/37.3%
*-commutative37.3%
unpow237.3%
unpow237.3%
Simplified37.3%
Taylor expanded in t around -inf 97.7%
*-commutative97.7%
associate-*l/97.6%
neg-mul-197.6%
distribute-rgt-neg-in97.6%
Simplified97.6%
if -2.00000000000000007e154 < (/.f64 t l) < 5.00000000000000036e69Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
unpow299.3%
Applied egg-rr99.3%
if 5.00000000000000036e69 < (/.f64 t l) Initial program 50.2%
Taylor expanded in t around inf 92.2%
*-commutative92.2%
unpow292.2%
unpow292.2%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/l*99.6%
Simplified99.6%
Final simplification99.1%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+154)
(asin (* (sqrt 0.5) (- (/ l t))))
(if (<= (/ t l) 2e+152)
(asin
(sqrt
(/
(- 1.0 (* (/ Om Omc) (/ Om Omc)))
(+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (/ l t) (sqrt 2.0)))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = asin((sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 2e+152) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * ((l / t) / sqrt(2.0))));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-2d+154)) then
tmp = asin((sqrt(0.5d0) * -(l / t)))
else if ((t / l) <= 2d+152) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * ((l / t) / sqrt(2.0d0))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 2e+152) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * ((l / t) / Math.sqrt(2.0))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+154: tmp = math.asin((math.sqrt(0.5) * -(l / t))) elif (t / l) <= 2e+152: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * ((l / t) / math.sqrt(2.0)))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+154) tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t)))); elseif (Float64(t / l) <= 2e+152) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(Float64(l / t) / sqrt(2.0)))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+154) tmp = asin((sqrt(0.5) * -(l / t))); elseif ((t / l) <= 2e+152) tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * ((l / t) / sqrt(2.0)))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+154], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+152], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $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[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2.00000000000000007e154Initial program 37.3%
unpow237.3%
clear-num37.3%
un-div-inv37.3%
Applied egg-rr37.3%
Taylor expanded in Om around 0 37.3%
*-commutative37.3%
associate-*l/37.3%
rem-square-sqrt37.3%
unpow237.3%
*-commutative37.3%
*-commutative37.3%
unpow237.3%
rem-square-sqrt37.3%
associate-*l/37.3%
*-commutative37.3%
unpow237.3%
unpow237.3%
Simplified37.3%
Taylor expanded in t around -inf 97.7%
*-commutative97.7%
associate-*l/97.6%
neg-mul-197.6%
distribute-rgt-neg-in97.6%
Simplified97.6%
if -2.00000000000000007e154 < (/.f64 t l) < 2.0000000000000001e152Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
unpow299.3%
Applied egg-rr99.3%
if 2.0000000000000001e152 < (/.f64 t l) Initial program 22.2%
sqrt-div22.2%
add-sqr-sqrt22.2%
hypot-1-def22.2%
*-commutative22.2%
sqrt-prod22.2%
unpow222.2%
sqrt-prod95.9%
add-sqr-sqrt96.0%
Applied egg-rr96.0%
Taylor expanded in t around inf 88.0%
*-commutative88.0%
unpow288.0%
unpow288.0%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.5%
Simplified99.5%
Final simplification99.1%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+154)
(asin (* (sqrt 0.5) (- (/ l t))))
(if (<= (/ t l) 1e+120)
(asin
(sqrt
(/
(- 1.0 (* (/ Om Omc) (/ Om Omc)))
(+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = asin((sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 1e+120) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-2d+154)) then
tmp = asin((sqrt(0.5d0) * -(l / t)))
else if ((t / l) <= 1d+120) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 1e+120) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+154: tmp = math.asin((math.sqrt(0.5) * -(l / t))) elif (t / l) <= 1e+120: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+154) tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t)))); elseif (Float64(t / l) <= 1e+120) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+154) tmp = asin((sqrt(0.5) * -(l / t))); elseif ((t / l) <= 1e+120) tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+154], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+120], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2.00000000000000007e154Initial program 37.3%
unpow237.3%
clear-num37.3%
un-div-inv37.3%
Applied egg-rr37.3%
Taylor expanded in Om around 0 37.3%
*-commutative37.3%
associate-*l/37.3%
rem-square-sqrt37.3%
unpow237.3%
*-commutative37.3%
*-commutative37.3%
unpow237.3%
rem-square-sqrt37.3%
associate-*l/37.3%
*-commutative37.3%
unpow237.3%
unpow237.3%
Simplified37.3%
Taylor expanded in t around -inf 97.7%
*-commutative97.7%
associate-*l/97.6%
neg-mul-197.6%
distribute-rgt-neg-in97.6%
Simplified97.6%
if -2.00000000000000007e154 < (/.f64 t l) < 9.9999999999999998e119Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
unpow299.3%
Applied egg-rr99.3%
if 9.9999999999999998e119 < (/.f64 t l) Initial program 39.2%
unpow239.2%
clear-num39.2%
un-div-inv39.3%
Applied egg-rr39.3%
Taylor expanded in Om around 0 22.8%
*-commutative22.8%
associate-*l/22.8%
rem-square-sqrt22.8%
unpow222.8%
*-commutative22.8%
*-commutative22.8%
unpow222.8%
rem-square-sqrt22.8%
associate-*l/22.8%
*-commutative22.8%
unpow222.8%
unpow222.8%
Simplified22.8%
Taylor expanded in t around inf 99.3%
Final simplification99.1%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -5e+48)
(asin (* (sqrt 0.5) (- (/ l t))))
(if (<= (/ t l) 50000.0)
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (* t (/ (/ t l) l)))))))
(asin (* (sqrt 0.5) (/ l t))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+48) {
tmp = asin((sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 50000.0) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l)))))));
} else {
tmp = asin((sqrt(0.5) * (l / t)));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-5d+48)) then
tmp = asin((sqrt(0.5d0) * -(l / t)))
else if ((t / l) <= 50000.0d0) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * (t * ((t / l) / l)))))))
else
tmp = asin((sqrt(0.5d0) * (l / t)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+48) {
tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 50000.0) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l)))))));
} else {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -5e+48: tmp = math.asin((math.sqrt(0.5) * -(l / t))) elif (t / l) <= 50000.0: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l))))))) else: tmp = math.asin((math.sqrt(0.5) * (l / t))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -5e+48) tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t)))); elseif (Float64(t / l) <= 50000.0) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(t * Float64(Float64(t / l) / l))))))); else tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -5e+48) tmp = asin((sqrt(0.5) * -(l / t))); elseif ((t / l) <= 50000.0) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l))))))); else tmp = asin((sqrt(0.5) * (l / t))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+48], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 50000.0], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(t * N[(N[(t / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+48}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 50000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \left(t \cdot \frac{\frac{t}{\ell}}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4.99999999999999973e48Initial program 59.1%
unpow259.1%
clear-num59.2%
un-div-inv59.2%
Applied egg-rr59.2%
Taylor expanded in Om around 0 43.6%
*-commutative43.6%
associate-*l/43.6%
rem-square-sqrt43.7%
unpow243.7%
*-commutative43.7%
*-commutative43.7%
unpow243.7%
rem-square-sqrt43.6%
associate-*l/43.6%
*-commutative43.6%
unpow243.6%
unpow243.6%
Simplified43.6%
Taylor expanded in t around -inf 97.6%
*-commutative97.6%
associate-*l/97.5%
neg-mul-197.5%
distribute-rgt-neg-in97.5%
Simplified97.5%
if -4.99999999999999973e48 < (/.f64 t l) < 5e4Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
Taylor expanded in Om around 0 83.8%
*-commutative83.8%
associate-*l/83.8%
rem-square-sqrt83.7%
unpow283.7%
*-commutative83.7%
*-commutative83.7%
unpow283.7%
rem-square-sqrt83.8%
associate-*l/83.8%
*-commutative83.8%
unpow283.8%
unpow283.8%
Simplified83.8%
associate-/r*88.8%
associate-*l/98.2%
associate-/l*98.3%
associate-/r/98.3%
Applied egg-rr98.3%
if 5e4 < (/.f64 t l) Initial program 60.2%
unpow260.2%
clear-num60.2%
un-div-inv60.3%
Applied egg-rr60.3%
Taylor expanded in Om around 0 29.7%
*-commutative29.7%
associate-*l/29.7%
rem-square-sqrt29.6%
unpow229.6%
*-commutative29.6%
*-commutative29.6%
unpow229.6%
rem-square-sqrt29.7%
associate-*l/29.7%
*-commutative29.7%
unpow229.7%
unpow229.7%
Simplified29.7%
Taylor expanded in t around inf 99.3%
*-commutative99.3%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Final simplification98.4%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+117)
(asin (* (sqrt 0.5) (- (/ l t))))
(if (<= (/ t l) 1e+120)
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+117) {
tmp = asin((sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 1e+120) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-1d+117)) then
tmp = asin((sqrt(0.5d0) * -(l / t)))
else if ((t / l) <= 1d+120) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+117) {
tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 1e+120) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+117: tmp = math.asin((math.sqrt(0.5) * -(l / t))) elif (t / l) <= 1e+120: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+117) tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t)))); elseif (Float64(t / l) <= 1e+120) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+117) tmp = asin((sqrt(0.5) * -(l / t))); elseif ((t / l) <= 1e+120) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+117], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+120], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+117}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.00000000000000005e117Initial program 46.4%
unpow246.4%
clear-num46.4%
un-div-inv46.4%
Applied egg-rr46.4%
Taylor expanded in Om around 0 40.9%
*-commutative40.9%
associate-*l/40.9%
rem-square-sqrt40.9%
unpow240.9%
*-commutative40.9%
*-commutative40.9%
unpow240.9%
rem-square-sqrt40.9%
associate-*l/40.9%
*-commutative40.9%
unpow240.9%
unpow240.9%
Simplified40.9%
Taylor expanded in t around -inf 97.1%
*-commutative97.1%
associate-*l/97.0%
neg-mul-197.0%
distribute-rgt-neg-in97.0%
Simplified97.0%
if -1.00000000000000005e117 < (/.f64 t l) < 9.9999999999999998e119Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
Taylor expanded in Om around 0 75.5%
*-commutative75.5%
associate-*l/75.5%
rem-square-sqrt75.5%
unpow275.5%
*-commutative75.5%
*-commutative75.5%
unpow275.5%
rem-square-sqrt75.5%
associate-*l/75.5%
*-commutative75.5%
unpow275.5%
unpow275.5%
Simplified75.5%
associate-/r*82.7%
associate-*l/95.7%
associate-/l*98.5%
associate-/r/96.3%
Applied egg-rr96.3%
associate-/r/98.5%
Applied egg-rr98.5%
if 9.9999999999999998e119 < (/.f64 t l) Initial program 39.2%
unpow239.2%
clear-num39.2%
un-div-inv39.3%
Applied egg-rr39.3%
Taylor expanded in Om around 0 22.8%
*-commutative22.8%
associate-*l/22.8%
rem-square-sqrt22.8%
unpow222.8%
*-commutative22.8%
*-commutative22.8%
unpow222.8%
rem-square-sqrt22.8%
associate-*l/22.8%
*-commutative22.8%
unpow222.8%
unpow222.8%
Simplified22.8%
Taylor expanded in t around inf 99.3%
Final simplification98.4%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2000000000000.0)
(asin (* (sqrt 0.5) (- (/ l t))))
(if (<= (/ t l) 4e-8)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (* (sqrt 0.5) (/ l t))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2000000000000.0) {
tmp = asin((sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 4e-8) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin((sqrt(0.5) * (l / t)));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-2000000000000.0d0)) then
tmp = asin((sqrt(0.5d0) * -(l / t)))
else if ((t / l) <= 4d-8) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin((sqrt(0.5d0) * (l / t)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2000000000000.0) {
tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 4e-8) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2000000000000.0: tmp = math.asin((math.sqrt(0.5) * -(l / t))) elif (t / l) <= 4e-8: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin((math.sqrt(0.5) * (l / t))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2000000000000.0) tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t)))); elseif (Float64(t / l) <= 4e-8) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2000000000000.0) tmp = asin((sqrt(0.5) * -(l / t))); elseif ((t / l) <= 4e-8) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin((sqrt(0.5) * (l / t))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2000000000000.0], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2e12Initial program 63.2%
unpow263.2%
clear-num63.2%
un-div-inv63.2%
Applied egg-rr63.2%
Taylor expanded in Om around 0 45.9%
*-commutative45.9%
associate-*l/45.9%
rem-square-sqrt45.9%
unpow245.9%
*-commutative45.9%
*-commutative45.9%
unpow245.9%
rem-square-sqrt45.9%
associate-*l/45.9%
*-commutative45.9%
unpow245.9%
unpow245.9%
Simplified45.9%
Taylor expanded in t around -inf 97.7%
*-commutative97.7%
associate-*l/97.6%
neg-mul-197.6%
distribute-rgt-neg-in97.6%
Simplified97.6%
if -2e12 < (/.f64 t l) < 4.0000000000000001e-8Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
Taylor expanded in Om around 0 84.4%
*-commutative84.4%
associate-*l/84.4%
rem-square-sqrt84.4%
unpow284.4%
*-commutative84.4%
*-commutative84.4%
unpow284.4%
rem-square-sqrt84.4%
associate-*l/84.4%
*-commutative84.4%
unpow284.4%
unpow284.4%
Simplified84.4%
associate-/r*89.7%
associate-*l/98.2%
associate-/l*98.2%
associate-/r/98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 84.4%
mul-1-neg84.4%
unsub-neg84.4%
unpow284.4%
unpow284.4%
times-frac96.6%
unpow296.6%
Simplified96.6%
if 4.0000000000000001e-8 < (/.f64 t l) Initial program 61.3%
unpow261.3%
clear-num61.2%
un-div-inv61.3%
Applied egg-rr61.3%
Taylor expanded in Om around 0 31.6%
*-commutative31.6%
associate-*l/31.6%
rem-square-sqrt31.5%
unpow231.5%
*-commutative31.5%
*-commutative31.5%
unpow231.5%
rem-square-sqrt31.6%
associate-*l/31.6%
*-commutative31.6%
unpow231.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around inf 97.0%
*-commutative97.0%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Final simplification97.0%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2000000000000.0)
(asin (/ (- (/ l t)) (sqrt 2.0)))
(if (<= (/ t l) 4e-8)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (* (sqrt 0.5) (/ l t))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2000000000000.0) {
tmp = asin((-(l / t) / sqrt(2.0)));
} else if ((t / l) <= 4e-8) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin((sqrt(0.5) * (l / t)));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-2000000000000.0d0)) then
tmp = asin((-(l / t) / sqrt(2.0d0)))
else if ((t / l) <= 4d-8) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin((sqrt(0.5d0) * (l / t)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2000000000000.0) {
tmp = Math.asin((-(l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 4e-8) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2000000000000.0: tmp = math.asin((-(l / t) / math.sqrt(2.0))) elif (t / l) <= 4e-8: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin((math.sqrt(0.5) * (l / t))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2000000000000.0) tmp = asin(Float64(Float64(-Float64(l / t)) / sqrt(2.0))); elseif (Float64(t / l) <= 4e-8) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2000000000000.0) tmp = asin((-(l / t) / sqrt(2.0))); elseif ((t / l) <= 4e-8) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin((sqrt(0.5) * (l / t))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2000000000000.0], N[ArcSin[N[((-N[(l / t), $MachinePrecision]) / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\
\;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2e12Initial program 63.2%
sqrt-div63.3%
add-sqr-sqrt63.3%
hypot-1-def63.3%
*-commutative63.3%
sqrt-prod63.1%
unpow263.1%
sqrt-prod0.0%
add-sqr-sqrt96.9%
Applied egg-rr96.9%
Taylor expanded in t around -inf 89.5%
mul-1-neg89.5%
*-commutative89.5%
distribute-rgt-neg-in89.5%
unpow289.5%
unpow289.5%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in Om around 0 97.7%
*-lft-identity97.7%
times-frac97.6%
*-commutative97.6%
associate-*r/97.8%
*-rgt-identity97.8%
neg-mul-197.8%
distribute-frac-neg97.8%
Simplified97.8%
if -2e12 < (/.f64 t l) < 4.0000000000000001e-8Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
Taylor expanded in Om around 0 84.4%
*-commutative84.4%
associate-*l/84.4%
rem-square-sqrt84.4%
unpow284.4%
*-commutative84.4%
*-commutative84.4%
unpow284.4%
rem-square-sqrt84.4%
associate-*l/84.4%
*-commutative84.4%
unpow284.4%
unpow284.4%
Simplified84.4%
associate-/r*89.7%
associate-*l/98.2%
associate-/l*98.2%
associate-/r/98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 84.4%
mul-1-neg84.4%
unsub-neg84.4%
unpow284.4%
unpow284.4%
times-frac96.6%
unpow296.6%
Simplified96.6%
if 4.0000000000000001e-8 < (/.f64 t l) Initial program 61.3%
unpow261.3%
clear-num61.2%
un-div-inv61.3%
Applied egg-rr61.3%
Taylor expanded in Om around 0 31.6%
*-commutative31.6%
associate-*l/31.6%
rem-square-sqrt31.5%
unpow231.5%
*-commutative31.5%
*-commutative31.5%
unpow231.5%
rem-square-sqrt31.6%
associate-*l/31.6%
*-commutative31.6%
unpow231.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around inf 97.0%
*-commutative97.0%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Final simplification97.0%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -5e+206) (asin (/ (sqrt 0.5) (/ t l))) (if (<= (/ t l) 4e-8) (asin 1.0) (asin (* (sqrt 0.5) (/ l t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+206) {
tmp = asin((sqrt(0.5) / (t / l)));
} else if ((t / l) <= 4e-8) {
tmp = asin(1.0);
} else {
tmp = asin((sqrt(0.5) * (l / t)));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-5d+206)) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 4d-8) then
tmp = asin(1.0d0)
else
tmp = asin((sqrt(0.5d0) * (l / t)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+206) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 4e-8) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -5e+206: tmp = math.asin((math.sqrt(0.5) / (t / l))) elif (t / l) <= 4e-8: tmp = math.asin(1.0) else: tmp = math.asin((math.sqrt(0.5) * (l / t))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -5e+206) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); elseif (Float64(t / l) <= 4e-8) tmp = asin(1.0); else tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -5e+206) tmp = asin((sqrt(0.5) / (t / l))); elseif ((t / l) <= 4e-8) tmp = asin(1.0); else tmp = asin((sqrt(0.5) * (l / t))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+206], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+206}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.0000000000000002e206Initial program 45.4%
unpow245.4%
clear-num45.4%
un-div-inv45.4%
Applied egg-rr45.4%
Taylor expanded in Om around 0 45.4%
*-commutative45.4%
associate-*l/45.4%
rem-square-sqrt45.4%
unpow245.4%
*-commutative45.4%
*-commutative45.4%
unpow245.4%
rem-square-sqrt45.4%
associate-*l/45.4%
*-commutative45.4%
unpow245.4%
unpow245.4%
Simplified45.4%
associate-/r*45.4%
associate-*l/45.4%
associate-/l*45.4%
associate-/r/45.4%
Applied egg-rr45.4%
Taylor expanded in t around inf 44.4%
associate-/l*44.5%
Simplified44.5%
if -5.0000000000000002e206 < (/.f64 t l) < 4.0000000000000001e-8Initial program 95.1%
unpow295.1%
clear-num95.1%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in Om around 0 76.6%
*-commutative76.6%
associate-*l/76.6%
rem-square-sqrt76.6%
unpow276.6%
*-commutative76.6%
*-commutative76.6%
unpow276.6%
rem-square-sqrt76.6%
associate-*l/76.6%
*-commutative76.6%
unpow276.6%
unpow276.6%
Simplified76.6%
Taylor expanded in t around 0 78.2%
if 4.0000000000000001e-8 < (/.f64 t l) Initial program 61.3%
unpow261.3%
clear-num61.2%
un-div-inv61.3%
Applied egg-rr61.3%
Taylor expanded in Om around 0 31.6%
*-commutative31.6%
associate-*l/31.6%
rem-square-sqrt31.5%
unpow231.5%
*-commutative31.5%
*-commutative31.5%
unpow231.5%
rem-square-sqrt31.6%
associate-*l/31.6%
*-commutative31.6%
unpow231.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around inf 97.0%
*-commutative97.0%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Final simplification79.8%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -2000000000000.0) (asin (* (sqrt 0.5) (- (/ l t)))) (if (<= (/ t l) 4e-8) (asin 1.0) (asin (* (sqrt 0.5) (/ l t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2000000000000.0) {
tmp = asin((sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 4e-8) {
tmp = asin(1.0);
} else {
tmp = asin((sqrt(0.5) * (l / t)));
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if ((t / l) <= (-2000000000000.0d0)) then
tmp = asin((sqrt(0.5d0) * -(l / t)))
else if ((t / l) <= 4d-8) then
tmp = asin(1.0d0)
else
tmp = asin((sqrt(0.5d0) * (l / t)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2000000000000.0) {
tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
} else if ((t / l) <= 4e-8) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2000000000000.0: tmp = math.asin((math.sqrt(0.5) * -(l / t))) elif (t / l) <= 4e-8: tmp = math.asin(1.0) else: tmp = math.asin((math.sqrt(0.5) * (l / t))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2000000000000.0) tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t)))); elseif (Float64(t / l) <= 4e-8) tmp = asin(1.0); else tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2000000000000.0) tmp = asin((sqrt(0.5) * -(l / t))); elseif ((t / l) <= 4e-8) tmp = asin(1.0); else tmp = asin((sqrt(0.5) * (l / t))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2000000000000.0], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2e12Initial program 63.2%
unpow263.2%
clear-num63.2%
un-div-inv63.2%
Applied egg-rr63.2%
Taylor expanded in Om around 0 45.9%
*-commutative45.9%
associate-*l/45.9%
rem-square-sqrt45.9%
unpow245.9%
*-commutative45.9%
*-commutative45.9%
unpow245.9%
rem-square-sqrt45.9%
associate-*l/45.9%
*-commutative45.9%
unpow245.9%
unpow245.9%
Simplified45.9%
Taylor expanded in t around -inf 97.7%
*-commutative97.7%
associate-*l/97.6%
neg-mul-197.6%
distribute-rgt-neg-in97.6%
Simplified97.6%
if -2e12 < (/.f64 t l) < 4.0000000000000001e-8Initial program 99.3%
unpow299.3%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
Taylor expanded in Om around 0 84.4%
*-commutative84.4%
associate-*l/84.4%
rem-square-sqrt84.4%
unpow284.4%
*-commutative84.4%
*-commutative84.4%
unpow284.4%
rem-square-sqrt84.4%
associate-*l/84.4%
*-commutative84.4%
unpow284.4%
unpow284.4%
Simplified84.4%
Taylor expanded in t around 0 96.7%
if 4.0000000000000001e-8 < (/.f64 t l) Initial program 61.3%
unpow261.3%
clear-num61.2%
un-div-inv61.3%
Applied egg-rr61.3%
Taylor expanded in Om around 0 31.6%
*-commutative31.6%
associate-*l/31.6%
rem-square-sqrt31.5%
unpow231.5%
*-commutative31.5%
*-commutative31.5%
unpow231.5%
rem-square-sqrt31.6%
associate-*l/31.6%
*-commutative31.6%
unpow231.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around inf 97.0%
*-commutative97.0%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Final simplification97.0%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (<= l -2.4e-204) (asin 1.0) (if (<= l 300.0) (asin (* (sqrt 0.5) (/ l t))) (asin 1.0))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -2.4e-204) {
tmp = asin(1.0);
} else if (l <= 300.0) {
tmp = asin((sqrt(0.5) * (l / t)));
} else {
tmp = asin(1.0);
}
return tmp;
}
NOTE: t should be positive before calling this function
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
real(8) :: tmp
if (l <= (-2.4d-204)) then
tmp = asin(1.0d0)
else if (l <= 300.0d0) then
tmp = asin((sqrt(0.5d0) * (l / t)))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -2.4e-204) {
tmp = Math.asin(1.0);
} else if (l <= 300.0) {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if l <= -2.4e-204: tmp = math.asin(1.0) elif l <= 300.0: tmp = math.asin((math.sqrt(0.5) * (l / t))) else: tmp = math.asin(1.0) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (l <= -2.4e-204) tmp = asin(1.0); elseif (l <= 300.0) tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); else tmp = asin(1.0); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (l <= -2.4e-204) tmp = asin(1.0); elseif (l <= 300.0) tmp = asin((sqrt(0.5) * (l / t))); else tmp = asin(1.0); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[l, -2.4e-204], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, 300.0], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.4 \cdot 10^{-204}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq 300:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -2.4e-204 or 300 < l Initial program 87.2%
unpow287.2%
clear-num87.2%
un-div-inv87.2%
Applied egg-rr87.2%
Taylor expanded in Om around 0 67.9%
*-commutative67.9%
associate-*l/67.9%
rem-square-sqrt67.9%
unpow267.9%
*-commutative67.9%
*-commutative67.9%
unpow267.9%
rem-square-sqrt67.9%
associate-*l/67.9%
*-commutative67.9%
unpow267.9%
unpow267.9%
Simplified67.9%
Taylor expanded in t around 0 64.6%
if -2.4e-204 < l < 300Initial program 64.5%
unpow264.5%
clear-num64.5%
un-div-inv64.5%
Applied egg-rr64.5%
Taylor expanded in Om around 0 44.4%
*-commutative44.4%
associate-*l/44.4%
rem-square-sqrt44.4%
unpow244.4%
*-commutative44.4%
*-commutative44.4%
unpow244.4%
rem-square-sqrt44.4%
associate-*l/44.4%
*-commutative44.4%
unpow244.4%
unpow244.4%
Simplified44.4%
Taylor expanded in t around inf 57.2%
*-commutative57.2%
associate-*l/57.4%
*-commutative57.4%
Simplified57.4%
Final simplification62.4%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (asin 1.0))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
return asin(1.0);
}
NOTE: t should be positive before calling this function
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(1.0d0)
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(1.0);
}
t = abs(t) def code(t, l, Om, Omc): return math.asin(1.0)
t = abs(t) function code(t, l, Om, Omc) return asin(1.0) end
t = abs(t) function tmp = code(t, l, Om, Omc) tmp = asin(1.0); end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} 1
\end{array}
Initial program 80.3%
unpow280.3%
clear-num80.3%
un-div-inv80.3%
Applied egg-rr80.3%
Taylor expanded in Om around 0 60.7%
*-commutative60.7%
associate-*l/60.7%
rem-square-sqrt60.7%
unpow260.7%
*-commutative60.7%
*-commutative60.7%
unpow260.7%
rem-square-sqrt60.7%
associate-*l/60.7%
*-commutative60.7%
unpow260.7%
unpow260.7%
Simplified60.7%
Taylor expanded in t around 0 49.9%
Final simplification49.9%
herbie shell --seed 2023213
(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)))))))