
(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}
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -4e+181)
(asin (/ (- (/ l (sqrt 2.0))) t))
(if (<= (/ t l) 4e+121)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -4e+181) {
tmp = asin((-(l / sqrt(2.0)) / t));
} else if ((t / l) <= 4e+121) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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) <= (-4d+181)) then
tmp = asin((-(l / sqrt(2.0d0)) / t))
else if ((t / l) <= 4d+121) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -4e+181) {
tmp = Math.asin((-(l / Math.sqrt(2.0)) / t));
} else if ((t / l) <= 4e+121) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -4e+181: tmp = math.asin((-(l / math.sqrt(2.0)) / t)) elif (t / l) <= 4e+121: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -4e+181) tmp = asin(Float64(Float64(-Float64(l / sqrt(2.0))) / t)); elseif (Float64(t / l) <= 4e+121) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / 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
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -4e+181) tmp = asin((-(l / sqrt(2.0)) / t)); elseif ((t / l) <= 4e+121) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -4e+181], N[ArcSin[N[((-N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]) / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e+121], 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 / 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}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -4 \cdot 10^{+181}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{\sqrt{2}}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{+121}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{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) < -3.9999999999999997e181Initial program 37.0%
sqrt-div37.0%
div-inv37.0%
add-sqr-sqrt37.0%
hypot-1-def37.0%
*-commutative37.0%
sqrt-prod37.0%
unpow237.0%
sqrt-prod0.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
unpow297.6%
times-frac87.3%
unpow287.3%
unpow287.3%
associate-*r/87.3%
*-rgt-identity87.3%
unpow287.3%
unpow287.3%
times-frac97.6%
unpow297.6%
Simplified97.6%
Taylor expanded in Om around 0 37.0%
associate-/l*37.0%
unpow237.0%
unpow237.0%
Simplified37.0%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
distribute-neg-frac99.6%
associate-/r*99.6%
Simplified99.6%
if -3.9999999999999997e181 < (/.f64 t l) < 4.00000000000000015e121Initial program 97.8%
unpow297.8%
clear-num97.8%
un-div-inv97.8%
Applied egg-rr97.8%
unpow297.8%
clear-num97.8%
un-div-inv97.8%
Applied egg-rr97.8%
if 4.00000000000000015e121 < (/.f64 t l) Initial program 49.6%
sqrt-div49.6%
div-inv49.6%
add-sqr-sqrt49.6%
hypot-1-def49.6%
*-commutative49.6%
sqrt-prod49.6%
unpow249.6%
sqrt-prod99.3%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
unpow299.5%
times-frac93.9%
unpow293.9%
unpow293.9%
associate-*r/93.9%
*-rgt-identity93.9%
unpow293.9%
unpow293.9%
times-frac99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in Om around 0 46.9%
associate-/l*46.9%
unpow246.9%
unpow246.9%
Simplified46.9%
unpow246.9%
add-sqr-sqrt46.9%
Applied egg-rr46.9%
Taylor expanded in l around 0 99.6%
Final simplification98.3%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
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)))));
}
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)))));
}
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)))))
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
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
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}
\\
\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 84.3%
sqrt-div84.3%
div-inv84.3%
add-sqr-sqrt84.3%
hypot-1-def84.3%
*-commutative84.3%
sqrt-prod84.2%
unpow284.2%
sqrt-prod57.1%
add-sqr-sqrt97.9%
Applied egg-rr97.9%
unpow297.9%
times-frac84.2%
unpow284.2%
unpow284.2%
associate-*r/84.2%
*-rgt-identity84.2%
unpow284.2%
unpow284.2%
times-frac97.9%
unpow297.9%
Simplified97.9%
Final simplification97.9%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -4e+181)
(asin (/ (- (/ l (sqrt 2.0))) t))
(if (<= (/ t l) 2e+120)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -4e+181) {
tmp = asin((-(l / sqrt(2.0)) / t));
} else if ((t / l) <= 2e+120) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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) <= (-4d+181)) then
tmp = asin((-(l / sqrt(2.0d0)) / t))
else if ((t / l) <= 2d+120) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -4e+181) {
tmp = Math.asin((-(l / Math.sqrt(2.0)) / t));
} else if ((t / l) <= 2e+120) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -4e+181: tmp = math.asin((-(l / math.sqrt(2.0)) / t)) elif (t / l) <= 2e+120: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -4e+181) tmp = asin(Float64(Float64(-Float64(l / sqrt(2.0))) / t)); elseif (Float64(t / l) <= 2e+120) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -4e+181) tmp = asin((-(l / sqrt(2.0)) / t)); elseif ((t / l) <= 2e+120) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -4e+181], N[ArcSin[N[((-N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]) / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+120], 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 / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -4 \cdot 10^{+181}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{\sqrt{2}}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+120}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -3.9999999999999997e181Initial program 37.0%
sqrt-div37.0%
div-inv37.0%
add-sqr-sqrt37.0%
hypot-1-def37.0%
*-commutative37.0%
sqrt-prod37.0%
unpow237.0%
sqrt-prod0.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
unpow297.6%
times-frac87.3%
unpow287.3%
unpow287.3%
associate-*r/87.3%
*-rgt-identity87.3%
unpow287.3%
unpow287.3%
times-frac97.6%
unpow297.6%
Simplified97.6%
Taylor expanded in Om around 0 37.0%
associate-/l*37.0%
unpow237.0%
unpow237.0%
Simplified37.0%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
distribute-neg-frac99.6%
associate-/r*99.6%
Simplified99.6%
if -3.9999999999999997e181 < (/.f64 t l) < 2e120Initial program 97.8%
unpow297.8%
Applied egg-rr97.8%
unpow297.8%
clear-num97.8%
un-div-inv97.8%
Applied egg-rr97.8%
if 2e120 < (/.f64 t l) Initial program 51.0%
sqrt-div50.9%
div-inv50.9%
add-sqr-sqrt50.9%
hypot-1-def50.9%
*-commutative50.9%
sqrt-prod51.0%
unpow251.0%
sqrt-prod99.3%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
unpow299.5%
times-frac94.1%
unpow294.1%
unpow294.1%
associate-*r/94.1%
*-rgt-identity94.1%
unpow294.1%
unpow294.1%
times-frac99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in Om around 0 48.4%
associate-/l*48.3%
unpow248.3%
unpow248.3%
Simplified48.3%
unpow248.3%
add-sqr-sqrt48.4%
Applied egg-rr48.4%
Taylor expanded in l around 0 99.6%
Final simplification98.3%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+85)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 2e+100)
(asin (sqrt (/ 1.0 (+ 1.0 (/ 2.0 (* (/ l t) (/ l t)))))))
(asin (/ (/ l t) (sqrt 2.0))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+85) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 2e+100) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t)))))));
} else {
tmp = asin(((l / t) / sqrt(2.0)));
}
return tmp;
}
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+85)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 2d+100) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 / ((l / t) * (l / t)))))))
else
tmp = asin(((l / t) / sqrt(2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+85) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 2e+100) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t)))))));
} else {
tmp = Math.asin(((l / t) / Math.sqrt(2.0)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+85: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 2e+100: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t))))))) else: tmp = math.asin(((l / t) / math.sqrt(2.0))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+85) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 2e+100) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 / Float64(Float64(l / t) * Float64(l / t))))))); else tmp = asin(Float64(Float64(l / t) / sqrt(2.0))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+85) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 2e+100) tmp = asin(sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t))))))); else tmp = asin(((l / t) / sqrt(2.0))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+85], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+100], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 / N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+85}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+100}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2e85Initial program 55.3%
sqrt-div55.3%
div-inv55.3%
add-sqr-sqrt55.3%
hypot-1-def55.3%
*-commutative55.3%
sqrt-prod55.2%
unpow255.2%
sqrt-prod0.0%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
unpow298.0%
times-frac78.6%
unpow278.6%
unpow278.6%
associate-*r/78.6%
*-rgt-identity78.6%
unpow278.6%
unpow278.6%
times-frac98.0%
unpow298.0%
Simplified98.0%
Taylor expanded in Om around 0 32.0%
associate-/l*32.0%
unpow232.0%
unpow232.0%
Simplified32.0%
unpow232.0%
add-sqr-sqrt32.0%
Applied egg-rr32.0%
Taylor expanded in t around -inf 99.6%
if -2e85 < (/.f64 t l) < 2.00000000000000003e100Initial program 97.6%
sqrt-div97.5%
div-inv97.5%
add-sqr-sqrt97.5%
hypot-1-def97.5%
*-commutative97.5%
sqrt-prod97.5%
unpow297.5%
sqrt-prod60.7%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
unpow297.5%
times-frac83.6%
unpow283.6%
unpow283.6%
associate-*r/83.6%
*-rgt-identity83.6%
unpow283.6%
unpow283.6%
times-frac97.5%
unpow297.5%
Simplified97.5%
Taylor expanded in Om around 0 78.4%
associate-/l*78.4%
unpow278.4%
unpow278.4%
Simplified78.4%
unpow278.4%
add-sqr-sqrt78.4%
Applied egg-rr78.4%
times-frac96.8%
Applied egg-rr96.8%
if 2.00000000000000003e100 < (/.f64 t l) Initial program 56.9%
sqrt-div56.9%
div-inv56.9%
add-sqr-sqrt56.9%
hypot-1-def56.9%
*-commutative56.9%
sqrt-prod56.9%
unpow256.9%
sqrt-prod99.3%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
unpow299.5%
times-frac92.3%
unpow292.3%
unpow292.3%
associate-*r/92.3%
*-rgt-identity92.3%
unpow292.3%
unpow292.3%
times-frac99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in Om around 0 47.0%
associate-/l*47.0%
unpow247.0%
unpow247.0%
Simplified47.0%
Taylor expanded in l around 0 99.5%
*-commutative99.5%
associate-/r*99.6%
Simplified99.6%
Final simplification97.7%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2.0)
(asin (/ (- l) (* t (sqrt 2.0))))
(if (<= (/ t l) 0.02)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2.0) {
tmp = asin((-l / (t * sqrt(2.0))));
} else if ((t / l) <= 0.02) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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) <= (-2.0d0)) then
tmp = asin((-l / (t * sqrt(2.0d0))))
else if ((t / l) <= 0.02d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2.0) {
tmp = Math.asin((-l / (t * Math.sqrt(2.0))));
} else if ((t / l) <= 0.02) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2.0: tmp = math.asin((-l / (t * math.sqrt(2.0)))) elif (t / l) <= 0.02: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2.0) tmp = asin(Float64(Float64(-l) / Float64(t * sqrt(2.0)))); elseif (Float64(t / l) <= 0.02) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2.0) tmp = asin((-l / (t * sqrt(2.0)))); elseif ((t / l) <= 0.02) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2.0], N[ArcSin[N[((-l) / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.02], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t \cdot \sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.02:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2Initial program 64.7%
sqrt-div64.7%
div-inv64.7%
add-sqr-sqrt64.7%
hypot-1-def64.7%
*-commutative64.7%
sqrt-prod64.5%
unpow264.5%
sqrt-prod0.0%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
unpow298.3%
times-frac81.1%
unpow281.1%
unpow281.1%
associate-*r/81.1%
*-rgt-identity81.1%
unpow281.1%
unpow281.1%
times-frac98.3%
unpow298.3%
Simplified98.3%
Taylor expanded in Om around 0 35.9%
associate-/l*35.9%
unpow235.9%
unpow235.9%
Simplified35.9%
Taylor expanded in t around -inf 97.4%
mul-1-neg97.4%
*-commutative97.4%
Simplified97.4%
if -2 < (/.f64 t l) < 0.0200000000000000004Initial program 97.2%
sqrt-div97.1%
div-inv97.1%
add-sqr-sqrt97.1%
hypot-1-def97.2%
*-commutative97.2%
sqrt-prod97.2%
unpow297.2%
sqrt-prod60.3%
add-sqr-sqrt97.2%
Applied egg-rr97.2%
unpow297.2%
times-frac81.7%
unpow281.7%
unpow281.7%
associate-*r/81.7%
*-rgt-identity81.7%
unpow281.7%
unpow281.7%
times-frac97.2%
unpow297.2%
Simplified97.2%
Taylor expanded in Om around 0 83.8%
associate-/l*83.8%
unpow283.8%
unpow283.8%
Simplified83.8%
unpow283.8%
add-sqr-sqrt83.8%
Applied egg-rr83.8%
Taylor expanded in l around inf 82.9%
mul-1-neg82.9%
unsub-neg82.9%
unpow282.9%
unpow282.9%
times-frac95.2%
unpow295.2%
Simplified95.2%
if 0.0200000000000000004 < (/.f64 t l) Initial program 70.4%
sqrt-div70.3%
div-inv70.3%
add-sqr-sqrt70.3%
hypot-1-def70.3%
*-commutative70.3%
sqrt-prod70.2%
unpow270.2%
sqrt-prod99.1%
add-sqr-sqrt99.3%
Applied egg-rr99.3%
unpow299.3%
times-frac92.8%
unpow292.8%
unpow292.8%
associate-*r/92.8%
*-rgt-identity92.8%
unpow292.8%
unpow292.8%
times-frac99.3%
unpow299.3%
Simplified99.3%
Taylor expanded in Om around 0 48.9%
associate-/l*48.9%
unpow248.9%
unpow248.9%
Simplified48.9%
unpow248.9%
add-sqr-sqrt49.0%
Applied egg-rr49.0%
Taylor expanded in l around 0 97.8%
Final simplification96.3%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (asin (* l (- (/ (sqrt 0.5) t))))))
(if (<= t -2e+220)
t_1
(if (<= t -2.5e+171)
(asin (/ (* l (sqrt 0.5)) t))
(if (<= t -5.5e+100)
t_1
(if (<= t 1.75e+93) (asin 1.0) (asin (/ l (* t (sqrt 2.0))))))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = asin((l * -(sqrt(0.5) / t)));
double tmp;
if (t <= -2e+220) {
tmp = t_1;
} else if (t <= -2.5e+171) {
tmp = asin(((l * sqrt(0.5)) / t));
} else if (t <= -5.5e+100) {
tmp = t_1;
} else if (t <= 1.75e+93) {
tmp = asin(1.0);
} else {
tmp = asin((l / (t * sqrt(2.0))));
}
return tmp;
}
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 = asin((l * -(sqrt(0.5d0) / t)))
if (t <= (-2d+220)) then
tmp = t_1
else if (t <= (-2.5d+171)) then
tmp = asin(((l * sqrt(0.5d0)) / t))
else if (t <= (-5.5d+100)) then
tmp = t_1
else if (t <= 1.75d+93) then
tmp = asin(1.0d0)
else
tmp = asin((l / (t * sqrt(2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = Math.asin((l * -(Math.sqrt(0.5) / t)));
double tmp;
if (t <= -2e+220) {
tmp = t_1;
} else if (t <= -2.5e+171) {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
} else if (t <= -5.5e+100) {
tmp = t_1;
} else if (t <= 1.75e+93) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l / (t * Math.sqrt(2.0))));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = math.asin((l * -(math.sqrt(0.5) / t))) tmp = 0 if t <= -2e+220: tmp = t_1 elif t <= -2.5e+171: tmp = math.asin(((l * math.sqrt(0.5)) / t)) elif t <= -5.5e+100: tmp = t_1 elif t <= 1.75e+93: tmp = math.asin(1.0) else: tmp = math.asin((l / (t * math.sqrt(2.0)))) return tmp
function code(t, l, Om, Omc) t_1 = asin(Float64(l * Float64(-Float64(sqrt(0.5) / t)))) tmp = 0.0 if (t <= -2e+220) tmp = t_1; elseif (t <= -2.5e+171) tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); elseif (t <= -5.5e+100) tmp = t_1; elseif (t <= 1.75e+93) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t * sqrt(2.0)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = asin((l * -(sqrt(0.5) / t))); tmp = 0.0; if (t <= -2e+220) tmp = t_1; elseif (t <= -2.5e+171) tmp = asin(((l * sqrt(0.5)) / t)); elseif (t <= -5.5e+100) tmp = t_1; elseif (t <= 1.75e+93) tmp = asin(1.0); else tmp = asin((l / (t * sqrt(2.0)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[ArcSin[N[(l * (-N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2e+220], t$95$1, If[LessEqual[t, -2.5e+171], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, -5.5e+100], t$95$1, If[LessEqual[t, 1.75e+93], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin^{-1} \left(\ell \cdot \left(-\frac{\sqrt{0.5}}{t}\right)\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{+220}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{+171}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+93}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < -2e220 or -2.5000000000000002e171 < t < -5.5000000000000002e100Initial program 67.5%
sqrt-div67.4%
div-inv67.4%
add-sqr-sqrt67.4%
hypot-1-def67.4%
*-commutative67.4%
sqrt-prod67.3%
unpow267.3%
sqrt-prod42.3%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
unpow299.5%
times-frac87.2%
unpow287.2%
unpow287.2%
associate-*r/87.2%
*-rgt-identity87.2%
unpow287.2%
unpow287.2%
times-frac99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in Om around 0 43.0%
associate-/l*43.0%
unpow243.0%
unpow243.0%
Simplified43.0%
unpow243.0%
add-sqr-sqrt43.1%
Applied egg-rr43.1%
Taylor expanded in t around -inf 73.1%
mul-1-neg73.1%
associate-*l/73.1%
Simplified73.1%
if -2e220 < t < -2.5000000000000002e171Initial program 99.8%
sqrt-div99.6%
div-inv99.6%
add-sqr-sqrt99.6%
hypot-1-def99.6%
*-commutative99.6%
sqrt-prod99.6%
unpow299.6%
sqrt-prod74.1%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
unpow299.6%
times-frac99.6%
unpow299.6%
unpow299.6%
associate-*r/99.6%
*-rgt-identity99.6%
unpow299.6%
unpow299.6%
times-frac99.6%
unpow299.6%
Simplified99.6%
Taylor expanded in Om around 0 26.5%
associate-/l*26.5%
unpow226.5%
unpow226.5%
Simplified26.5%
unpow226.5%
add-sqr-sqrt26.5%
Applied egg-rr26.5%
Taylor expanded in l around 0 87.5%
if -5.5000000000000002e100 < t < 1.74999999999999999e93Initial program 89.1%
sqrt-div89.0%
div-inv89.0%
add-sqr-sqrt89.0%
hypot-1-def89.0%
*-commutative89.0%
sqrt-prod89.0%
unpow289.0%
sqrt-prod61.0%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
unpow297.5%
times-frac83.4%
unpow283.4%
unpow283.4%
associate-*r/83.4%
*-rgt-identity83.4%
unpow283.4%
unpow283.4%
times-frac97.5%
unpow297.5%
Simplified97.5%
Taylor expanded in Om around 0 76.8%
associate-/l*76.8%
unpow276.8%
unpow276.8%
Simplified76.8%
Taylor expanded in l around inf 71.9%
if 1.74999999999999999e93 < t Initial program 76.4%
sqrt-div76.2%
div-inv76.2%
add-sqr-sqrt76.2%
hypot-1-def76.2%
*-commutative76.2%
sqrt-prod76.2%
unpow276.2%
sqrt-prod50.6%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
unpow297.5%
times-frac81.1%
unpow281.1%
unpow281.1%
associate-*r/81.1%
*-rgt-identity81.1%
unpow281.1%
unpow281.1%
times-frac97.5%
unpow297.5%
Simplified97.5%
Taylor expanded in Om around 0 46.4%
associate-/l*46.4%
unpow246.4%
unpow246.4%
Simplified46.4%
Taylor expanded in l around 0 53.6%
Final simplification70.1%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (* t (sqrt 2.0))))
(if (<= t -2.05e+220)
(asin (/ (- l) t_1))
(if (<= t -1.35e+172)
(asin (/ (* l (sqrt 0.5)) t))
(if (<= t -4.6e+100)
(asin (* l (- (/ (sqrt 0.5) t))))
(if (<= t 7e+95) (asin 1.0) (asin (/ l t_1))))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = t * sqrt(2.0);
double tmp;
if (t <= -2.05e+220) {
tmp = asin((-l / t_1));
} else if (t <= -1.35e+172) {
tmp = asin(((l * sqrt(0.5)) / t));
} else if (t <= -4.6e+100) {
tmp = asin((l * -(sqrt(0.5) / t)));
} else if (t <= 7e+95) {
tmp = asin(1.0);
} else {
tmp = asin((l / t_1));
}
return tmp;
}
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 = t * sqrt(2.0d0)
if (t <= (-2.05d+220)) then
tmp = asin((-l / t_1))
else if (t <= (-1.35d+172)) then
tmp = asin(((l * sqrt(0.5d0)) / t))
else if (t <= (-4.6d+100)) then
tmp = asin((l * -(sqrt(0.5d0) / t)))
else if (t <= 7d+95) then
tmp = asin(1.0d0)
else
tmp = asin((l / t_1))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = t * Math.sqrt(2.0);
double tmp;
if (t <= -2.05e+220) {
tmp = Math.asin((-l / t_1));
} else if (t <= -1.35e+172) {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
} else if (t <= -4.6e+100) {
tmp = Math.asin((l * -(Math.sqrt(0.5) / t)));
} else if (t <= 7e+95) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l / t_1));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = t * math.sqrt(2.0) tmp = 0 if t <= -2.05e+220: tmp = math.asin((-l / t_1)) elif t <= -1.35e+172: tmp = math.asin(((l * math.sqrt(0.5)) / t)) elif t <= -4.6e+100: tmp = math.asin((l * -(math.sqrt(0.5) / t))) elif t <= 7e+95: tmp = math.asin(1.0) else: tmp = math.asin((l / t_1)) return tmp
function code(t, l, Om, Omc) t_1 = Float64(t * sqrt(2.0)) tmp = 0.0 if (t <= -2.05e+220) tmp = asin(Float64(Float64(-l) / t_1)); elseif (t <= -1.35e+172) tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); elseif (t <= -4.6e+100) tmp = asin(Float64(l * Float64(-Float64(sqrt(0.5) / t)))); elseif (t <= 7e+95) tmp = asin(1.0); else tmp = asin(Float64(l / t_1)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = t * sqrt(2.0); tmp = 0.0; if (t <= -2.05e+220) tmp = asin((-l / t_1)); elseif (t <= -1.35e+172) tmp = asin(((l * sqrt(0.5)) / t)); elseif (t <= -4.6e+100) tmp = asin((l * -(sqrt(0.5) / t))); elseif (t <= 7e+95) tmp = asin(1.0); else tmp = asin((l / t_1)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.05e+220], N[ArcSin[N[((-l) / t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, -1.35e+172], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, -4.6e+100], N[ArcSin[N[(l * (-N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 7e+95], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / t$95$1), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{+220}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t_1}\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{+172}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{+100}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \left(-\frac{\sqrt{0.5}}{t}\right)\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+95}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t_1}\right)\\
\end{array}
\end{array}
if t < -2.0499999999999999e220Initial program 59.4%
sqrt-div59.4%
div-inv59.4%
add-sqr-sqrt59.4%
hypot-1-def59.4%
*-commutative59.4%
sqrt-prod59.3%
unpow259.3%
sqrt-prod43.3%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
unpow299.4%
times-frac95.1%
unpow295.1%
unpow295.1%
associate-*r/95.1%
*-rgt-identity95.1%
unpow295.1%
unpow295.1%
times-frac99.4%
unpow299.4%
Simplified99.4%
Taylor expanded in Om around 0 25.5%
associate-/l*25.5%
unpow225.5%
unpow225.5%
Simplified25.5%
Taylor expanded in t around -inf 74.8%
mul-1-neg74.8%
*-commutative74.8%
Simplified74.8%
if -2.0499999999999999e220 < t < -1.35e172Initial program 99.8%
sqrt-div99.6%
div-inv99.6%
add-sqr-sqrt99.6%
hypot-1-def99.6%
*-commutative99.6%
sqrt-prod99.6%
unpow299.6%
sqrt-prod74.1%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
unpow299.6%
times-frac99.6%
unpow299.6%
unpow299.6%
associate-*r/99.6%
*-rgt-identity99.6%
unpow299.6%
unpow299.6%
times-frac99.6%
unpow299.6%
Simplified99.6%
Taylor expanded in Om around 0 26.5%
associate-/l*26.5%
unpow226.5%
unpow226.5%
Simplified26.5%
unpow226.5%
add-sqr-sqrt26.5%
Applied egg-rr26.5%
Taylor expanded in l around 0 87.5%
if -1.35e172 < t < -4.5999999999999998e100Initial program 78.4%
sqrt-div78.2%
div-inv78.2%
add-sqr-sqrt78.2%
hypot-1-def78.2%
*-commutative78.2%
sqrt-prod78.1%
unpow278.1%
sqrt-prod41.0%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
unpow299.5%
times-frac76.4%
unpow276.4%
unpow276.4%
associate-*r/76.4%
*-rgt-identity76.4%
unpow276.4%
unpow276.4%
times-frac99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in Om around 0 66.6%
associate-/l*66.6%
unpow266.6%
unpow266.6%
Simplified66.6%
unpow266.6%
add-sqr-sqrt66.9%
Applied egg-rr66.9%
Taylor expanded in t around -inf 70.9%
mul-1-neg70.9%
associate-*l/70.9%
Simplified70.9%
if -4.5999999999999998e100 < t < 6.99999999999999999e95Initial program 89.1%
sqrt-div89.0%
div-inv89.0%
add-sqr-sqrt89.0%
hypot-1-def89.0%
*-commutative89.0%
sqrt-prod89.0%
unpow289.0%
sqrt-prod61.0%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
unpow297.5%
times-frac83.4%
unpow283.4%
unpow283.4%
associate-*r/83.4%
*-rgt-identity83.4%
unpow283.4%
unpow283.4%
times-frac97.5%
unpow297.5%
Simplified97.5%
Taylor expanded in Om around 0 76.8%
associate-/l*76.8%
unpow276.8%
unpow276.8%
Simplified76.8%
Taylor expanded in l around inf 71.9%
if 6.99999999999999999e95 < t Initial program 76.4%
sqrt-div76.2%
div-inv76.2%
add-sqr-sqrt76.2%
hypot-1-def76.2%
*-commutative76.2%
sqrt-prod76.2%
unpow276.2%
sqrt-prod50.6%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
unpow297.5%
times-frac81.1%
unpow281.1%
unpow281.1%
associate-*r/81.1%
*-rgt-identity81.1%
unpow281.1%
unpow281.1%
times-frac97.5%
unpow297.5%
Simplified97.5%
Taylor expanded in Om around 0 46.4%
associate-/l*46.4%
unpow246.4%
unpow246.4%
Simplified46.4%
Taylor expanded in l around 0 53.6%
Final simplification70.1%
(FPCore (t l Om Omc) :precision binary64 (if (or (<= t -8.2e+124) (not (<= t 4.6e+89))) (asin (* l (/ (sqrt 0.5) t))) (asin 1.0)))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= -8.2e+124) || !(t <= 4.6e+89)) {
tmp = asin((l * (sqrt(0.5) / t)));
} else {
tmp = asin(1.0);
}
return tmp;
}
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 <= (-8.2d+124)) .or. (.not. (t <= 4.6d+89))) then
tmp = asin((l * (sqrt(0.5d0) / t)))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= -8.2e+124) || !(t <= 4.6e+89)) {
tmp = Math.asin((l * (Math.sqrt(0.5) / t)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t <= -8.2e+124) or not (t <= 4.6e+89): tmp = math.asin((l * (math.sqrt(0.5) / t))) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((t <= -8.2e+124) || !(t <= 4.6e+89)) tmp = asin(Float64(l * Float64(sqrt(0.5) / t))); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t <= -8.2e+124) || ~((t <= 4.6e+89))) tmp = asin((l * (sqrt(0.5) / t))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, -8.2e+124], N[Not[LessEqual[t, 4.6e+89]], $MachinePrecision]], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+124} \lor \neg \left(t \leq 4.6 \cdot 10^{+89}\right):\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if t < -8.20000000000000002e124 or 4.5999999999999998e89 < t Initial program 74.4%
sqrt-div74.3%
div-inv74.3%
add-sqr-sqrt74.3%
hypot-1-def74.3%
*-commutative74.3%
sqrt-prod74.2%
unpow274.2%
sqrt-prod49.4%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
unpow298.6%
times-frac87.2%
unpow287.2%
unpow287.2%
associate-*r/87.2%
*-rgt-identity87.2%
unpow287.2%
unpow287.2%
times-frac98.6%
unpow298.6%
Simplified98.6%
Taylor expanded in Om around 0 40.0%
associate-/l*40.0%
unpow240.0%
unpow240.0%
Simplified40.0%
unpow240.0%
add-sqr-sqrt40.0%
Applied egg-rr40.0%
Taylor expanded in l around 0 54.4%
associate-*l/54.4%
Simplified54.4%
if -8.20000000000000002e124 < t < 4.5999999999999998e89Initial program 88.5%
sqrt-div88.4%
div-inv88.4%
add-sqr-sqrt88.4%
hypot-1-def88.4%
*-commutative88.4%
sqrt-prod88.4%
unpow288.4%
sqrt-prod60.3%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
unpow297.6%
times-frac82.9%
unpow282.9%
unpow282.9%
associate-*r/82.9%
*-rgt-identity82.9%
unpow282.9%
unpow282.9%
times-frac97.6%
unpow297.6%
Simplified97.6%
Taylor expanded in Om around 0 76.7%
associate-/l*76.7%
unpow276.7%
unpow276.7%
Simplified76.7%
Taylor expanded in l around inf 70.3%
Final simplification65.6%
(FPCore (t l Om Omc) :precision binary64 (if (<= t -8.1e+124) (asin (* l (/ (sqrt 0.5) t))) (if (<= t 5.5e+91) (asin 1.0) (asin (/ l (* t (sqrt 2.0)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= -8.1e+124) {
tmp = asin((l * (sqrt(0.5) / t)));
} else if (t <= 5.5e+91) {
tmp = asin(1.0);
} else {
tmp = asin((l / (t * sqrt(2.0))));
}
return tmp;
}
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 <= (-8.1d+124)) then
tmp = asin((l * (sqrt(0.5d0) / t)))
else if (t <= 5.5d+91) then
tmp = asin(1.0d0)
else
tmp = asin((l / (t * sqrt(2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= -8.1e+124) {
tmp = Math.asin((l * (Math.sqrt(0.5) / t)));
} else if (t <= 5.5e+91) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l / (t * Math.sqrt(2.0))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if t <= -8.1e+124: tmp = math.asin((l * (math.sqrt(0.5) / t))) elif t <= 5.5e+91: tmp = math.asin(1.0) else: tmp = math.asin((l / (t * math.sqrt(2.0)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (t <= -8.1e+124) tmp = asin(Float64(l * Float64(sqrt(0.5) / t))); elseif (t <= 5.5e+91) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t * sqrt(2.0)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= -8.1e+124) tmp = asin((l * (sqrt(0.5) / t))); elseif (t <= 5.5e+91) tmp = asin(1.0); else tmp = asin((l / (t * sqrt(2.0)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[t, -8.1e+124], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 5.5e+91], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.1 \cdot 10^{+124}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+91}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < -8.0999999999999998e124Initial program 72.8%
sqrt-div72.6%
div-inv72.6%
add-sqr-sqrt72.6%
hypot-1-def72.6%
*-commutative72.6%
sqrt-prod72.6%
unpow272.6%
sqrt-prod48.4%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
unpow299.5%
times-frac92.3%
unpow292.3%
unpow292.3%
associate-*r/92.3%
*-rgt-identity92.3%
unpow292.3%
unpow292.3%
times-frac99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in Om around 0 34.6%
associate-/l*34.6%
unpow234.6%
unpow234.6%
Simplified34.6%
unpow234.6%
add-sqr-sqrt34.7%
Applied egg-rr34.7%
Taylor expanded in l around 0 55.1%
associate-*l/55.1%
Simplified55.1%
if -8.0999999999999998e124 < t < 5.4999999999999998e91Initial program 88.5%
sqrt-div88.4%
div-inv88.4%
add-sqr-sqrt88.4%
hypot-1-def88.4%
*-commutative88.4%
sqrt-prod88.4%
unpow288.4%
sqrt-prod60.3%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
unpow297.6%
times-frac82.9%
unpow282.9%
unpow282.9%
associate-*r/82.9%
*-rgt-identity82.9%
unpow282.9%
unpow282.9%
times-frac97.6%
unpow297.6%
Simplified97.6%
Taylor expanded in Om around 0 76.7%
associate-/l*76.7%
unpow276.7%
unpow276.7%
Simplified76.7%
Taylor expanded in l around inf 70.3%
if 5.4999999999999998e91 < t Initial program 76.4%
sqrt-div76.2%
div-inv76.2%
add-sqr-sqrt76.2%
hypot-1-def76.2%
*-commutative76.2%
sqrt-prod76.2%
unpow276.2%
sqrt-prod50.6%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
unpow297.5%
times-frac81.1%
unpow281.1%
unpow281.1%
associate-*r/81.1%
*-rgt-identity81.1%
unpow281.1%
unpow281.1%
times-frac97.5%
unpow297.5%
Simplified97.5%
Taylor expanded in Om around 0 46.4%
associate-/l*46.4%
unpow246.4%
unpow246.4%
Simplified46.4%
Taylor expanded in l around 0 53.6%
Final simplification65.7%
(FPCore (t l Om Omc) :precision binary64 (asin 1.0))
double code(double t, double l, double Om, double Omc) {
return asin(1.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(1.0d0)
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(1.0);
}
def code(t, l, Om, Omc): return math.asin(1.0)
function code(t, l, Om, Omc) return asin(1.0) end
function tmp = code(t, l, Om, Omc) tmp = asin(1.0); end
code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} 1
\end{array}
Initial program 84.3%
sqrt-div84.3%
div-inv84.3%
add-sqr-sqrt84.3%
hypot-1-def84.3%
*-commutative84.3%
sqrt-prod84.2%
unpow284.2%
sqrt-prod57.1%
add-sqr-sqrt97.9%
Applied egg-rr97.9%
unpow297.9%
times-frac84.2%
unpow284.2%
unpow284.2%
associate-*r/84.2%
*-rgt-identity84.2%
unpow284.2%
unpow284.2%
times-frac97.9%
unpow297.9%
Simplified97.9%
Taylor expanded in Om around 0 65.9%
associate-/l*65.9%
unpow265.9%
unpow265.9%
Simplified65.9%
Taylor expanded in l around inf 55.2%
Final simplification55.2%
herbie shell --seed 2023194
(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)))))))