
(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 17 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 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (/ (* (sqrt 2.0) t) l)))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((sqrt(2.0) * t) / l))));
}
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, ((Math.sqrt(2.0) * t) / l))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((math.sqrt(2.0) * t) / l))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(sqrt(2.0) * t) / l)))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((sqrt(2.0) * t) / l)))); 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[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / l), $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{\sqrt{2} \cdot t}{\ell}\right)}\right)
\end{array}
Initial program 82.2%
sqrt-div82.1%
div-inv82.1%
add-sqr-sqrt82.1%
hypot-1-def82.1%
*-commutative82.1%
sqrt-prod82.1%
unpow282.1%
sqrt-prod50.4%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
unpow298.0%
times-frac84.3%
unpow284.3%
unpow284.3%
associate-*r/84.3%
*-rgt-identity84.3%
unpow284.3%
unpow284.3%
times-frac98.0%
unpow298.0%
Simplified98.0%
Taylor expanded in t around 0 98.0%
Final simplification98.0%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (sqrt 2.0) (/ t l))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, (sqrt(2.0) * (t / l)))));
}
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, (Math.sqrt(2.0) * (t / l)))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, (math.sqrt(2.0) * (t / l)))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(sqrt(2.0) * Float64(t / l))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, (sqrt(2.0) * (t / l))))); 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[Sqrt[2.0], $MachinePrecision] * N[(t / l), $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, \sqrt{2} \cdot \frac{t}{\ell}\right)}\right)
\end{array}
Initial program 82.2%
sqrt-div82.1%
div-inv82.1%
add-sqr-sqrt82.1%
hypot-1-def82.1%
*-commutative82.1%
sqrt-prod82.1%
unpow282.1%
sqrt-prod50.4%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
unpow298.0%
times-frac84.3%
unpow284.3%
unpow284.3%
associate-*r/84.3%
*-rgt-identity84.3%
unpow284.3%
unpow284.3%
times-frac98.0%
unpow298.0%
Simplified98.0%
Final simplification98.0%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -5e+159)
(- (asin (* l (/ (sqrt (* 0.5 (- 1.0 (/ (/ Om Omc) (/ Omc Om))))) t))))
(if (<= (/ t l) 1e+154)
(asin
(sqrt
(/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin
(/ (fma (* Om (/ Om (* Omc Omc))) -0.5 1.0) (* (sqrt 2.0) (/ t l)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+159) {
tmp = -asin((l * (sqrt((0.5 * (1.0 - ((Om / Omc) / (Omc / Om))))) / t)));
} else if ((t / l) <= 1e+154) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin((fma((Om * (Om / (Omc * Omc))), -0.5, 1.0) / (sqrt(2.0) * (t / l))));
}
return tmp;
}
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -5e+159) tmp = Float64(-asin(Float64(l * Float64(sqrt(Float64(0.5 * Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))) / t)))); elseif (Float64(t / l) <= 1e+154) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(fma(Float64(Om * Float64(Om / Float64(Omc * Omc))), -0.5, 1.0) / Float64(sqrt(2.0) * Float64(t / l)))); end return tmp end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+159], (-N[ArcSin[N[(l * N[(N[Sqrt[N[(0.5 * N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 1e+154], 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[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(N[(Om * N[(Om / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5 + 1.0), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+159}:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5 \cdot \left(1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\right)}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\mathsf{fma}\left(Om \cdot \frac{Om}{Omc \cdot Omc}, -0.5, 1\right)}{\sqrt{2} \cdot \frac{t}{\ell}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.00000000000000003e159Initial program 32.9%
Taylor expanded in t around -inf 89.3%
mul-1-neg89.3%
*-commutative89.3%
unpow289.3%
unpow289.3%
times-frac99.4%
unpow299.4%
associate-/l*99.4%
Simplified99.4%
expm1-log1p-u99.4%
expm1-udef32.9%
asin-neg32.9%
associate-*r/32.9%
pow1/232.9%
pow1/232.9%
pow-prod-down32.9%
Applied egg-rr32.9%
expm1-def99.3%
expm1-log1p99.3%
associate-/r/99.6%
unpow1/299.6%
*-commutative99.6%
Simplified99.6%
unpow23.7%
clear-num3.7%
un-div-inv3.7%
Applied egg-rr99.6%
if -5.00000000000000003e159 < (/.f64 t l) < 1.00000000000000004e154Initial program 98.3%
unpow298.3%
Applied egg-rr98.3%
if 1.00000000000000004e154 < (/.f64 t l) Initial program 52.0%
sqrt-div52.0%
div-inv52.0%
add-sqr-sqrt52.0%
hypot-1-def52.0%
*-commutative52.0%
sqrt-prod52.0%
unpow252.0%
sqrt-prod95.0%
add-sqr-sqrt95.4%
Applied egg-rr95.4%
unpow295.4%
times-frac77.8%
unpow277.8%
unpow277.8%
associate-*r/77.8%
*-rgt-identity77.8%
unpow277.8%
unpow277.8%
times-frac95.4%
unpow295.4%
Simplified95.4%
Taylor expanded in Om around 0 77.8%
unpow22.8%
unpow22.8%
Simplified77.8%
times-frac3.4%
clear-num3.4%
div-inv3.4%
associate-/r/3.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 81.9%
associate-/l*77.8%
+-commutative77.8%
*-commutative77.8%
unpow277.8%
associate-*r/89.6%
unpow289.6%
fma-udef89.6%
associate-*r/89.6%
Simplified89.6%
Final simplification97.3%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t l) -5.5e+25)
(- (asin (* l (/ (sqrt (* 0.5 t_1)) t))))
(if (<= (/ t l) 1e+154)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (* t (/ t l)) l))))))
(asin
(*
(sqrt (- 1.0 (/ (* Om Om) (* Omc Omc))))
(* l (/ (sqrt 0.5) t))))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -5.5e+25) {
tmp = -asin((l * (sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 1e+154) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l))))));
} else {
tmp = asin((sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t / l) <= (-5.5d+25)) then
tmp = -asin((l * (sqrt((0.5d0 * t_1)) / t)))
else if ((t / l) <= 1d+154) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t * (t / l)) / l))))))
else
tmp = asin((sqrt((1.0d0 - ((om * om) / (omc * omc)))) * (l * (sqrt(0.5d0) / t))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -5.5e+25) {
tmp = -Math.asin((l * (Math.sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 1e+154) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l))))));
} else {
tmp = Math.asin((Math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (l * (Math.sqrt(0.5) / t))));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t / l) <= -5.5e+25: tmp = -math.asin((l * (math.sqrt((0.5 * t_1)) / t))) elif (t / l) <= 1e+154: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l)))))) else: tmp = math.asin((math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (l * (math.sqrt(0.5) / t)))) return tmp
function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t / l) <= -5.5e+25) tmp = Float64(-asin(Float64(l * Float64(sqrt(Float64(0.5 * t_1)) / t)))); elseif (Float64(t / l) <= 1e+154) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t * Float64(t / l)) / l)))))); else tmp = asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om * Om) / Float64(Omc * Omc)))) * Float64(l * Float64(sqrt(0.5) / t)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t / l) <= -5.5e+25) tmp = -asin((l * (sqrt((0.5 * t_1)) / t))); elseif ((t / l) <= 1e+154) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l)))))); else tmp = asin((sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (l * (sqrt(0.5) / t)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -5.5e+25], (-N[ArcSin[N[(l * N[(N[Sqrt[N[(0.5 * t$95$1), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 1e+154], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t * N[(t / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om * Om), $MachinePrecision] / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -5.5 \cdot 10^{+25}:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5 \cdot t_1}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{t \cdot \frac{t}{\ell}}{\ell}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{Omc \cdot Omc}} \cdot \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.50000000000000018e25Initial program 58.3%
Taylor expanded in t around -inf 88.3%
mul-1-neg88.3%
*-commutative88.3%
unpow288.3%
unpow288.3%
times-frac99.3%
unpow299.3%
associate-/l*99.3%
Simplified99.3%
expm1-log1p-u99.3%
expm1-udef21.8%
asin-neg21.8%
associate-*r/21.8%
pow1/221.8%
pow1/221.8%
pow-prod-down21.8%
Applied egg-rr21.8%
expm1-def99.3%
expm1-log1p99.3%
associate-/r/99.5%
unpow1/299.5%
*-commutative99.5%
Simplified99.5%
unpow24.8%
clear-num4.8%
un-div-inv4.8%
Applied egg-rr99.5%
if -5.50000000000000018e25 < (/.f64 t l) < 1.00000000000000004e154Initial program 98.1%
unpow298.1%
associate-*r/98.1%
Applied egg-rr98.1%
unpow277.8%
clear-num77.8%
un-div-inv77.8%
Applied egg-rr98.1%
if 1.00000000000000004e154 < (/.f64 t l) Initial program 52.0%
unpow252.0%
associate-*r/52.0%
Applied egg-rr52.0%
Taylor expanded in t around inf 82.1%
associate-/l*77.8%
*-commutative77.8%
unpow277.8%
unpow277.8%
times-frac95.4%
unpow295.4%
associate-/r/99.6%
*-commutative99.6%
unpow299.6%
times-frac82.0%
Simplified82.0%
Final simplification96.3%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t l) -5.5e+25)
(- (asin (* l (/ (sqrt (* 0.5 t_1)) t))))
(if (<= (/ t l) 1e+154)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (* t (/ t l)) l))))))
(asin
(/
(fma (* Om (/ Om (* Omc Omc))) -0.5 1.0)
(* (sqrt 2.0) (/ t l))))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -5.5e+25) {
tmp = -asin((l * (sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 1e+154) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l))))));
} else {
tmp = asin((fma((Om * (Om / (Omc * Omc))), -0.5, 1.0) / (sqrt(2.0) * (t / l))));
}
return tmp;
}
function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t / l) <= -5.5e+25) tmp = Float64(-asin(Float64(l * Float64(sqrt(Float64(0.5 * t_1)) / t)))); elseif (Float64(t / l) <= 1e+154) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t * Float64(t / l)) / l)))))); else tmp = asin(Float64(fma(Float64(Om * Float64(Om / Float64(Omc * Omc))), -0.5, 1.0) / Float64(sqrt(2.0) * Float64(t / l)))); end return tmp end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -5.5e+25], (-N[ArcSin[N[(l * N[(N[Sqrt[N[(0.5 * t$95$1), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 1e+154], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t * N[(t / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(N[(Om * N[(Om / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5 + 1.0), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -5.5 \cdot 10^{+25}:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5 \cdot t_1}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{t \cdot \frac{t}{\ell}}{\ell}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\mathsf{fma}\left(Om \cdot \frac{Om}{Omc \cdot Omc}, -0.5, 1\right)}{\sqrt{2} \cdot \frac{t}{\ell}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.50000000000000018e25Initial program 58.3%
Taylor expanded in t around -inf 88.3%
mul-1-neg88.3%
*-commutative88.3%
unpow288.3%
unpow288.3%
times-frac99.3%
unpow299.3%
associate-/l*99.3%
Simplified99.3%
expm1-log1p-u99.3%
expm1-udef21.8%
asin-neg21.8%
associate-*r/21.8%
pow1/221.8%
pow1/221.8%
pow-prod-down21.8%
Applied egg-rr21.8%
expm1-def99.3%
expm1-log1p99.3%
associate-/r/99.5%
unpow1/299.5%
*-commutative99.5%
Simplified99.5%
unpow24.8%
clear-num4.8%
un-div-inv4.8%
Applied egg-rr99.5%
if -5.50000000000000018e25 < (/.f64 t l) < 1.00000000000000004e154Initial program 98.1%
unpow298.1%
associate-*r/98.1%
Applied egg-rr98.1%
unpow277.8%
clear-num77.8%
un-div-inv77.8%
Applied egg-rr98.1%
if 1.00000000000000004e154 < (/.f64 t l) Initial program 52.0%
sqrt-div52.0%
div-inv52.0%
add-sqr-sqrt52.0%
hypot-1-def52.0%
*-commutative52.0%
sqrt-prod52.0%
unpow252.0%
sqrt-prod95.0%
add-sqr-sqrt95.4%
Applied egg-rr95.4%
unpow295.4%
times-frac77.8%
unpow277.8%
unpow277.8%
associate-*r/77.8%
*-rgt-identity77.8%
unpow277.8%
unpow277.8%
times-frac95.4%
unpow295.4%
Simplified95.4%
Taylor expanded in Om around 0 77.8%
unpow22.8%
unpow22.8%
Simplified77.8%
times-frac3.4%
clear-num3.4%
div-inv3.4%
associate-/r/3.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 81.9%
associate-/l*77.8%
+-commutative77.8%
*-commutative77.8%
unpow277.8%
associate-*r/89.6%
unpow289.6%
fma-udef89.6%
associate-*r/89.6%
Simplified89.6%
Final simplification97.3%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (+ 1.0 (* -0.5 (* Om (/ (/ Om Omc) Omc)))) (hypot 1.0 (* (sqrt 2.0) (/ t l))))))
double code(double t, double l, double Om, double Omc) {
return asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / hypot(1.0, (sqrt(2.0) * (t / l)))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / Math.hypot(1.0, (Math.sqrt(2.0) * (t / l)))));
}
def code(t, l, Om, Omc): return math.asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / math.hypot(1.0, (math.sqrt(2.0) * (t / l)))))
function code(t, l, Om, Omc) return asin(Float64(Float64(1.0 + Float64(-0.5 * Float64(Om * Float64(Float64(Om / Omc) / Omc)))) / hypot(1.0, Float64(sqrt(2.0) * Float64(t / l))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / hypot(1.0, (sqrt(2.0) * (t / l))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[(1.0 + N[(-0.5 * N[(Om * N[(N[(Om / Omc), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{1 + -0.5 \cdot \left(Om \cdot \frac{\frac{Om}{Omc}}{Omc}\right)}{\mathsf{hypot}\left(1, \sqrt{2} \cdot \frac{t}{\ell}\right)}\right)
\end{array}
Initial program 82.2%
sqrt-div82.1%
div-inv82.1%
add-sqr-sqrt82.1%
hypot-1-def82.1%
*-commutative82.1%
sqrt-prod82.1%
unpow282.1%
sqrt-prod50.4%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
unpow298.0%
times-frac84.3%
unpow284.3%
unpow284.3%
associate-*r/84.3%
*-rgt-identity84.3%
unpow284.3%
unpow284.3%
times-frac98.0%
unpow298.0%
Simplified98.0%
Taylor expanded in Om around 0 84.2%
unpow242.4%
unpow242.4%
Simplified84.2%
times-frac49.4%
clear-num49.4%
div-inv49.4%
associate-/r/49.4%
Applied egg-rr97.4%
Final simplification97.4%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (+ 1.0 (* -0.5 (* Om (/ (/ Om Omc) Omc)))) (hypot 1.0 (/ (* (sqrt 2.0) t) l)))))
double code(double t, double l, double Om, double Omc) {
return asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / hypot(1.0, ((sqrt(2.0) * t) / l))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / Math.hypot(1.0, ((Math.sqrt(2.0) * t) / l))));
}
def code(t, l, Om, Omc): return math.asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / math.hypot(1.0, ((math.sqrt(2.0) * t) / l))))
function code(t, l, Om, Omc) return asin(Float64(Float64(1.0 + Float64(-0.5 * Float64(Om * Float64(Float64(Om / Omc) / Omc)))) / hypot(1.0, Float64(Float64(sqrt(2.0) * t) / l)))) end
function tmp = code(t, l, Om, Omc) tmp = asin(((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))) / hypot(1.0, ((sqrt(2.0) * t) / l)))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[(1.0 + N[(-0.5 * N[(Om * N[(N[(Om / Omc), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{1 + -0.5 \cdot \left(Om \cdot \frac{\frac{Om}{Omc}}{Omc}\right)}{\mathsf{hypot}\left(1, \frac{\sqrt{2} \cdot t}{\ell}\right)}\right)
\end{array}
Initial program 82.2%
sqrt-div82.1%
div-inv82.1%
add-sqr-sqrt82.1%
hypot-1-def82.1%
*-commutative82.1%
sqrt-prod82.1%
unpow282.1%
sqrt-prod50.4%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
unpow298.0%
times-frac84.3%
unpow284.3%
unpow284.3%
associate-*r/84.3%
*-rgt-identity84.3%
unpow284.3%
unpow284.3%
times-frac98.0%
unpow298.0%
Simplified98.0%
Taylor expanded in Om around 0 84.2%
unpow242.4%
unpow242.4%
Simplified84.2%
times-frac49.4%
clear-num49.4%
div-inv49.4%
associate-/r/49.4%
Applied egg-rr97.4%
Taylor expanded in t around 0 97.4%
Final simplification97.4%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t l) -5.5e+25)
(- (asin (* l (/ (sqrt (* 0.5 t_1)) t))))
(if (<= (/ t l) 1e+154)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (* t (/ t l)) l))))))
(asin
(*
(/ (+ 1.0 (* -0.5 (/ (* Om Om) (* Omc Omc)))) (sqrt 2.0))
(/ l t)))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -5.5e+25) {
tmp = -asin((l * (sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 1e+154) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l))))));
} else {
tmp = asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / sqrt(2.0)) * (l / 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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t / l) <= (-5.5d+25)) then
tmp = -asin((l * (sqrt((0.5d0 * t_1)) / t)))
else if ((t / l) <= 1d+154) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t * (t / l)) / l))))))
else
tmp = asin((((1.0d0 + ((-0.5d0) * ((om * om) / (omc * omc)))) / sqrt(2.0d0)) * (l / t)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -5.5e+25) {
tmp = -Math.asin((l * (Math.sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 1e+154) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l))))));
} else {
tmp = Math.asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / Math.sqrt(2.0)) * (l / t)));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t / l) <= -5.5e+25: tmp = -math.asin((l * (math.sqrt((0.5 * t_1)) / t))) elif (t / l) <= 1e+154: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l)))))) else: tmp = math.asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / math.sqrt(2.0)) * (l / t))) return tmp
function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t / l) <= -5.5e+25) tmp = Float64(-asin(Float64(l * Float64(sqrt(Float64(0.5 * t_1)) / t)))); elseif (Float64(t / l) <= 1e+154) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t * Float64(t / l)) / l)))))); else tmp = asin(Float64(Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om * Om) / Float64(Omc * Omc)))) / sqrt(2.0)) * Float64(l / t))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t / l) <= -5.5e+25) tmp = -asin((l * (sqrt((0.5 * t_1)) / t))); elseif ((t / l) <= 1e+154) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t * (t / l)) / l)))))); else tmp = asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / sqrt(2.0)) * (l / t))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -5.5e+25], (-N[ArcSin[N[(l * N[(N[Sqrt[N[(0.5 * t$95$1), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 1e+154], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t * N[(t / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(N[(1.0 + N[(-0.5 * N[(N[(Om * Om), $MachinePrecision] / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -5.5 \cdot 10^{+25}:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5 \cdot t_1}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{t \cdot \frac{t}{\ell}}{\ell}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1 + -0.5 \cdot \frac{Om \cdot Om}{Omc \cdot Omc}}{\sqrt{2}} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.50000000000000018e25Initial program 58.3%
Taylor expanded in t around -inf 88.3%
mul-1-neg88.3%
*-commutative88.3%
unpow288.3%
unpow288.3%
times-frac99.3%
unpow299.3%
associate-/l*99.3%
Simplified99.3%
expm1-log1p-u99.3%
expm1-udef21.8%
asin-neg21.8%
associate-*r/21.8%
pow1/221.8%
pow1/221.8%
pow-prod-down21.8%
Applied egg-rr21.8%
expm1-def99.3%
expm1-log1p99.3%
associate-/r/99.5%
unpow1/299.5%
*-commutative99.5%
Simplified99.5%
unpow24.8%
clear-num4.8%
un-div-inv4.8%
Applied egg-rr99.5%
if -5.50000000000000018e25 < (/.f64 t l) < 1.00000000000000004e154Initial program 98.1%
unpow298.1%
associate-*r/98.1%
Applied egg-rr98.1%
unpow277.8%
clear-num77.8%
un-div-inv77.8%
Applied egg-rr98.1%
if 1.00000000000000004e154 < (/.f64 t l) Initial program 52.0%
sqrt-div52.0%
div-inv52.0%
add-sqr-sqrt52.0%
hypot-1-def52.0%
*-commutative52.0%
sqrt-prod52.0%
unpow252.0%
sqrt-prod95.0%
add-sqr-sqrt95.4%
Applied egg-rr95.4%
unpow295.4%
times-frac77.8%
unpow277.8%
unpow277.8%
associate-*r/77.8%
*-rgt-identity77.8%
unpow277.8%
unpow277.8%
times-frac95.4%
unpow295.4%
Simplified95.4%
Taylor expanded in Om around 0 77.8%
unpow22.8%
unpow22.8%
Simplified77.8%
Taylor expanded in t around inf 81.9%
times-frac82.0%
unpow282.0%
unpow282.0%
Simplified82.0%
Final simplification96.3%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t l) -40000.0)
(- (asin (* l (/ (sqrt (* 0.5 t_1)) t))))
(if (<= (/ t l) 1e-7)
(asin (sqrt t_1))
(asin
(*
(/ (+ 1.0 (* -0.5 (/ (* Om Om) (* Omc Omc)))) (sqrt 2.0))
(/ l t)))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -40000.0) {
tmp = -asin((l * (sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 1e-7) {
tmp = asin(sqrt(t_1));
} else {
tmp = asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / sqrt(2.0)) * (l / 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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t / l) <= (-40000.0d0)) then
tmp = -asin((l * (sqrt((0.5d0 * t_1)) / t)))
else if ((t / l) <= 1d-7) then
tmp = asin(sqrt(t_1))
else
tmp = asin((((1.0d0 + ((-0.5d0) * ((om * om) / (omc * omc)))) / sqrt(2.0d0)) * (l / t)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -40000.0) {
tmp = -Math.asin((l * (Math.sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 1e-7) {
tmp = Math.asin(Math.sqrt(t_1));
} else {
tmp = Math.asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / Math.sqrt(2.0)) * (l / t)));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t / l) <= -40000.0: tmp = -math.asin((l * (math.sqrt((0.5 * t_1)) / t))) elif (t / l) <= 1e-7: tmp = math.asin(math.sqrt(t_1)) else: tmp = math.asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / math.sqrt(2.0)) * (l / t))) return tmp
function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t / l) <= -40000.0) tmp = Float64(-asin(Float64(l * Float64(sqrt(Float64(0.5 * t_1)) / t)))); elseif (Float64(t / l) <= 1e-7) tmp = asin(sqrt(t_1)); else tmp = asin(Float64(Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om * Om) / Float64(Omc * Omc)))) / sqrt(2.0)) * Float64(l / t))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t / l) <= -40000.0) tmp = -asin((l * (sqrt((0.5 * t_1)) / t))); elseif ((t / l) <= 1e-7) tmp = asin(sqrt(t_1)); else tmp = asin((((1.0 + (-0.5 * ((Om * Om) / (Omc * Omc)))) / sqrt(2.0)) * (l / t))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -40000.0], (-N[ArcSin[N[(l * N[(N[Sqrt[N[(0.5 * t$95$1), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 1e-7], N[ArcSin[N[Sqrt[t$95$1], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(N[(1.0 + N[(-0.5 * N[(N[(Om * Om), $MachinePrecision] / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -40000:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5 \cdot t_1}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{-7}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1 + -0.5 \cdot \frac{Om \cdot Om}{Omc \cdot Omc}}{\sqrt{2}} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e4Initial program 62.4%
Taylor expanded in t around -inf 87.0%
mul-1-neg87.0%
*-commutative87.0%
unpow287.0%
unpow287.0%
times-frac98.4%
unpow298.4%
associate-/l*98.5%
Simplified98.5%
expm1-log1p-u98.5%
expm1-udef23.8%
asin-neg23.8%
associate-*r/23.8%
pow1/223.8%
pow1/223.8%
pow-prod-down23.8%
Applied egg-rr23.8%
expm1-def98.4%
expm1-log1p98.4%
associate-/r/98.6%
unpow1/298.6%
*-commutative98.6%
Simplified98.6%
unpow25.4%
clear-num5.4%
un-div-inv5.4%
Applied egg-rr98.6%
if -4e4 < (/.f64 t l) < 9.9999999999999995e-8Initial program 97.7%
Taylor expanded in t around 0 82.8%
unpow282.8%
unpow282.8%
times-frac97.4%
unpow297.4%
Simplified97.4%
unpow297.4%
clear-num97.4%
un-div-inv97.4%
Applied egg-rr97.4%
if 9.9999999999999995e-8 < (/.f64 t l) Initial program 73.5%
sqrt-div73.4%
div-inv73.4%
add-sqr-sqrt73.4%
hypot-1-def73.4%
*-commutative73.4%
sqrt-prod73.3%
unpow273.3%
sqrt-prod96.8%
add-sqr-sqrt97.1%
Applied egg-rr97.1%
unpow297.1%
times-frac82.6%
unpow282.6%
unpow282.6%
associate-*r/82.6%
*-rgt-identity82.6%
unpow282.6%
unpow282.6%
times-frac97.1%
unpow297.1%
Simplified97.1%
Taylor expanded in Om around 0 82.7%
unpow24.8%
unpow24.8%
Simplified82.7%
Taylor expanded in t around inf 83.3%
times-frac83.2%
unpow283.2%
unpow283.2%
Simplified83.2%
Final simplification94.3%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -40000.0)
(- (asin (* l (/ (sqrt 0.5) t))))
(if (<= (/ t l) 5e-10)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (/ (* t t) (* l l))))))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -asin((l * (sqrt(0.5) / t)));
} else if ((t / l) <= 5e-10) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t * t) / (l * l)))))));
}
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) <= (-40000.0d0)) then
tmp = -asin((l * (sqrt(0.5d0) / t)))
else if ((t / l) <= 5d-10) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t * t) / (l * l)))))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -Math.asin((l * (Math.sqrt(0.5) / t)));
} else if ((t / l) <= 5e-10) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t * t) / (l * l)))))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -40000.0: tmp = -math.asin((l * (math.sqrt(0.5) / t))) elif (t / l) <= 5e-10: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t * t) / (l * l))))))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -40000.0) tmp = Float64(-asin(Float64(l * Float64(sqrt(0.5) / t)))); elseif (Float64(t / l) <= 5e-10) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(Float64(t * t) / Float64(l * l))))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -40000.0) tmp = -asin((l * (sqrt(0.5) / t))); elseif ((t / l) <= 5e-10) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t * t) / (l * l))))))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -40000.0], (-N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 5e-10], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(N[(t * t), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -40000:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e4Initial program 62.4%
Taylor expanded in t around -inf 87.0%
mul-1-neg87.0%
*-commutative87.0%
unpow287.0%
unpow287.0%
times-frac98.4%
unpow298.4%
associate-/l*98.5%
Simplified98.5%
expm1-log1p-u98.5%
expm1-udef23.8%
asin-neg23.8%
associate-*r/23.8%
pow1/223.8%
pow1/223.8%
pow-prod-down23.8%
Applied egg-rr23.8%
expm1-def98.4%
expm1-log1p98.4%
associate-/r/98.6%
unpow1/298.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.0%
if -4e4 < (/.f64 t l) < 5.00000000000000031e-10Initial program 97.9%
Taylor expanded in t around 0 83.0%
unpow283.0%
unpow283.0%
times-frac97.7%
unpow297.7%
Simplified97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if 5.00000000000000031e-10 < (/.f64 t l) Initial program 73.4%
unpow273.4%
associate-*r/73.4%
Applied egg-rr73.4%
Taylor expanded in Om around 0 62.2%
associate-*r/62.2%
rem-square-sqrt62.0%
unpow262.0%
unpow262.0%
rem-square-sqrt62.2%
associate-*r/62.2%
unpow262.2%
unpow262.2%
Simplified62.2%
Final simplification89.1%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -40000.0)
(- (asin (* l (/ (sqrt 0.5) t))))
(if (<= (/ t l) 5e-10)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(asin (sqrt (/ 1.0 (+ 1.0 (* (/ 2.0 l) (/ (* t t) l)))))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -asin((l * (sqrt(0.5) / t)));
} else if ((t / l) <= 5e-10) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l))))));
}
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) <= (-40000.0d0)) then
tmp = -asin((l * (sqrt(0.5d0) / t)))
else if ((t / l) <= 5d-10) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin(sqrt((1.0d0 / (1.0d0 + ((2.0d0 / l) * ((t * t) / l))))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -Math.asin((l * (Math.sqrt(0.5) / t)));
} else if ((t / l) <= 5e-10) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l))))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -40000.0: tmp = -math.asin((l * (math.sqrt(0.5) / t))) elif (t / l) <= 5e-10: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin(math.sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l)))))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -40000.0) tmp = Float64(-asin(Float64(l * Float64(sqrt(0.5) / t)))); elseif (Float64(t / l) <= 5e-10) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(Float64(2.0 / l) * Float64(Float64(t * t) / l)))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -40000.0) tmp = -asin((l * (sqrt(0.5) / t))); elseif ((t / l) <= 5e-10) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l)))))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -40000.0], (-N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 5e-10], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -40000:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2}{\ell} \cdot \frac{t \cdot t}{\ell}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e4Initial program 62.4%
Taylor expanded in t around -inf 87.0%
mul-1-neg87.0%
*-commutative87.0%
unpow287.0%
unpow287.0%
times-frac98.4%
unpow298.4%
associate-/l*98.5%
Simplified98.5%
expm1-log1p-u98.5%
expm1-udef23.8%
asin-neg23.8%
associate-*r/23.8%
pow1/223.8%
pow1/223.8%
pow-prod-down23.8%
Applied egg-rr23.8%
expm1-def98.4%
expm1-log1p98.4%
associate-/r/98.6%
unpow1/298.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.0%
if -4e4 < (/.f64 t l) < 5.00000000000000031e-10Initial program 97.9%
Taylor expanded in t around 0 83.0%
unpow283.0%
unpow283.0%
times-frac97.7%
unpow297.7%
Simplified97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if 5.00000000000000031e-10 < (/.f64 t l) Initial program 73.4%
sqrt-div73.4%
div-inv73.4%
add-sqr-sqrt73.4%
hypot-1-def73.4%
*-commutative73.4%
sqrt-prod73.2%
unpow273.2%
sqrt-prod96.3%
add-sqr-sqrt96.6%
Applied egg-rr96.6%
unpow296.6%
times-frac82.4%
unpow282.4%
unpow282.4%
associate-*r/82.4%
*-rgt-identity82.4%
unpow282.4%
unpow282.4%
times-frac96.6%
unpow296.6%
Simplified96.6%
Taylor expanded in Om around 0 82.4%
unpow25.5%
unpow25.5%
Simplified82.4%
times-frac6.2%
clear-num6.2%
div-inv6.2%
associate-/r/6.2%
Applied egg-rr96.7%
Taylor expanded in Om around 0 62.0%
associate-/l*62.0%
unpow262.0%
rem-square-sqrt62.2%
associate-/l*62.2%
unpow262.2%
times-frac64.9%
unpow264.9%
Simplified64.9%
Final simplification89.7%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t l) -40000.0)
(- (asin (* l (/ (sqrt (* 0.5 t_1)) t))))
(if (<= (/ t l) 5e-10)
(asin (sqrt t_1))
(asin (sqrt (/ 1.0 (+ 1.0 (* (/ 2.0 l) (/ (* t t) l))))))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -40000.0) {
tmp = -asin((l * (sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 5e-10) {
tmp = asin(sqrt(t_1));
} else {
tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l))))));
}
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 = 1.0d0 - ((om / omc) / (omc / om))
if ((t / l) <= (-40000.0d0)) then
tmp = -asin((l * (sqrt((0.5d0 * t_1)) / t)))
else if ((t / l) <= 5d-10) then
tmp = asin(sqrt(t_1))
else
tmp = asin(sqrt((1.0d0 / (1.0d0 + ((2.0d0 / l) * ((t * t) / l))))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -40000.0) {
tmp = -Math.asin((l * (Math.sqrt((0.5 * t_1)) / t)));
} else if ((t / l) <= 5e-10) {
tmp = Math.asin(Math.sqrt(t_1));
} else {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l))))));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t / l) <= -40000.0: tmp = -math.asin((l * (math.sqrt((0.5 * t_1)) / t))) elif (t / l) <= 5e-10: tmp = math.asin(math.sqrt(t_1)) else: tmp = math.asin(math.sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l)))))) return tmp
function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t / l) <= -40000.0) tmp = Float64(-asin(Float64(l * Float64(sqrt(Float64(0.5 * t_1)) / t)))); elseif (Float64(t / l) <= 5e-10) tmp = asin(sqrt(t_1)); else tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(Float64(2.0 / l) * Float64(Float64(t * t) / l)))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t / l) <= -40000.0) tmp = -asin((l * (sqrt((0.5 * t_1)) / t))); elseif ((t / l) <= 5e-10) tmp = asin(sqrt(t_1)); else tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * ((t * t) / l)))))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -40000.0], (-N[ArcSin[N[(l * N[(N[Sqrt[N[(0.5 * t$95$1), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 5e-10], N[ArcSin[N[Sqrt[t$95$1], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -40000:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5 \cdot t_1}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{-10}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2}{\ell} \cdot \frac{t \cdot t}{\ell}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e4Initial program 62.4%
Taylor expanded in t around -inf 87.0%
mul-1-neg87.0%
*-commutative87.0%
unpow287.0%
unpow287.0%
times-frac98.4%
unpow298.4%
associate-/l*98.5%
Simplified98.5%
expm1-log1p-u98.5%
expm1-udef23.8%
asin-neg23.8%
associate-*r/23.8%
pow1/223.8%
pow1/223.8%
pow-prod-down23.8%
Applied egg-rr23.8%
expm1-def98.4%
expm1-log1p98.4%
associate-/r/98.6%
unpow1/298.6%
*-commutative98.6%
Simplified98.6%
unpow25.4%
clear-num5.4%
un-div-inv5.4%
Applied egg-rr98.6%
if -4e4 < (/.f64 t l) < 5.00000000000000031e-10Initial program 97.9%
Taylor expanded in t around 0 83.0%
unpow283.0%
unpow283.0%
times-frac97.7%
unpow297.7%
Simplified97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if 5.00000000000000031e-10 < (/.f64 t l) Initial program 73.4%
sqrt-div73.4%
div-inv73.4%
add-sqr-sqrt73.4%
hypot-1-def73.4%
*-commutative73.4%
sqrt-prod73.2%
unpow273.2%
sqrt-prod96.3%
add-sqr-sqrt96.6%
Applied egg-rr96.6%
unpow296.6%
times-frac82.4%
unpow282.4%
unpow282.4%
associate-*r/82.4%
*-rgt-identity82.4%
unpow282.4%
unpow282.4%
times-frac96.6%
unpow296.6%
Simplified96.6%
Taylor expanded in Om around 0 82.4%
unpow25.5%
unpow25.5%
Simplified82.4%
times-frac6.2%
clear-num6.2%
div-inv6.2%
associate-/r/6.2%
Applied egg-rr96.7%
Taylor expanded in Om around 0 62.0%
associate-/l*62.0%
unpow262.0%
rem-square-sqrt62.2%
associate-/l*62.2%
unpow262.2%
times-frac64.9%
unpow264.9%
Simplified64.9%
Final simplification89.9%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -40000.0)
(- (asin (* l (/ (sqrt 0.5) t))))
(if (<= (/ t l) 2e+184)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(- (asin (/ (sqrt 0.5) (/ t l)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -asin((l * (sqrt(0.5) / t)));
} else if ((t / l) <= 2e+184) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = -asin((sqrt(0.5) / (t / l)));
}
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) <= (-40000.0d0)) then
tmp = -asin((l * (sqrt(0.5d0) / t)))
else if ((t / l) <= 2d+184) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = -asin((sqrt(0.5d0) / (t / l)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -Math.asin((l * (Math.sqrt(0.5) / t)));
} else if ((t / l) <= 2e+184) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = -Math.asin((Math.sqrt(0.5) / (t / l)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -40000.0: tmp = -math.asin((l * (math.sqrt(0.5) / t))) elif (t / l) <= 2e+184: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = -math.asin((math.sqrt(0.5) / (t / l))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -40000.0) tmp = Float64(-asin(Float64(l * Float64(sqrt(0.5) / t)))); elseif (Float64(t / l) <= 2e+184) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = Float64(-asin(Float64(sqrt(0.5) / Float64(t / l)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -40000.0) tmp = -asin((l * (sqrt(0.5) / t))); elseif ((t / l) <= 2e+184) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = -asin((sqrt(0.5) / (t / l))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -40000.0], (-N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 2e+184], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], (-N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -40000:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+184}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;-\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e4Initial program 62.4%
Taylor expanded in t around -inf 87.0%
mul-1-neg87.0%
*-commutative87.0%
unpow287.0%
unpow287.0%
times-frac98.4%
unpow298.4%
associate-/l*98.5%
Simplified98.5%
expm1-log1p-u98.5%
expm1-udef23.8%
asin-neg23.8%
associate-*r/23.8%
pow1/223.8%
pow1/223.8%
pow-prod-down23.8%
Applied egg-rr23.8%
expm1-def98.4%
expm1-log1p98.4%
associate-/r/98.6%
unpow1/298.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.0%
if -4e4 < (/.f64 t l) < 2.00000000000000003e184Initial program 95.1%
Taylor expanded in t around 0 66.8%
unpow266.8%
unpow266.8%
times-frac78.5%
unpow278.5%
Simplified78.5%
unpow278.5%
clear-num78.5%
un-div-inv78.5%
Applied egg-rr78.5%
if 2.00000000000000003e184 < (/.f64 t l) Initial program 60.1%
Taylor expanded in t around -inf 48.5%
mul-1-neg48.5%
*-commutative48.5%
unpow248.5%
unpow248.5%
times-frac59.3%
unpow259.3%
associate-/l*59.6%
Simplified59.6%
expm1-log1p-u59.6%
expm1-udef60.1%
asin-neg60.1%
associate-*r/60.1%
pow1/260.1%
pow1/260.1%
pow-prod-down60.1%
Applied egg-rr60.1%
expm1-def59.6%
expm1-log1p59.6%
associate-/r/59.3%
unpow1/259.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in Om around 0 59.3%
associate-/l*59.6%
Simplified59.6%
Final simplification81.7%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -40000.0)
(- (asin (* l (/ (sqrt 0.5) t))))
(if (<= (/ t l) 2e+184)
(asin (+ 1.0 (* -0.5 (* Om (/ (/ Om Omc) Omc)))))
(- (asin (/ (sqrt 0.5) (/ t l)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -asin((l * (sqrt(0.5) / t)));
} else if ((t / l) <= 2e+184) {
tmp = asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
} else {
tmp = -asin((sqrt(0.5) / (t / l)));
}
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) <= (-40000.0d0)) then
tmp = -asin((l * (sqrt(0.5d0) / t)))
else if ((t / l) <= 2d+184) then
tmp = asin((1.0d0 + ((-0.5d0) * (om * ((om / omc) / omc)))))
else
tmp = -asin((sqrt(0.5d0) / (t / l)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -40000.0) {
tmp = -Math.asin((l * (Math.sqrt(0.5) / t)));
} else if ((t / l) <= 2e+184) {
tmp = Math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
} else {
tmp = -Math.asin((Math.sqrt(0.5) / (t / l)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -40000.0: tmp = -math.asin((l * (math.sqrt(0.5) / t))) elif (t / l) <= 2e+184: tmp = math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc))))) else: tmp = -math.asin((math.sqrt(0.5) / (t / l))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -40000.0) tmp = Float64(-asin(Float64(l * Float64(sqrt(0.5) / t)))); elseif (Float64(t / l) <= 2e+184) tmp = asin(Float64(1.0 + Float64(-0.5 * Float64(Om * Float64(Float64(Om / Omc) / Omc))))); else tmp = Float64(-asin(Float64(sqrt(0.5) / Float64(t / l)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -40000.0) tmp = -asin((l * (sqrt(0.5) / t))); elseif ((t / l) <= 2e+184) tmp = asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc))))); else tmp = -asin((sqrt(0.5) / (t / l))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -40000.0], (-N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[N[(t / l), $MachinePrecision], 2e+184], N[ArcSin[N[(1.0 + N[(-0.5 * N[(Om * N[(N[(Om / Omc), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], (-N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -40000:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+184}:\\
\;\;\;\;\sin^{-1} \left(1 + -0.5 \cdot \left(Om \cdot \frac{\frac{Om}{Omc}}{Omc}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e4Initial program 62.4%
Taylor expanded in t around -inf 87.0%
mul-1-neg87.0%
*-commutative87.0%
unpow287.0%
unpow287.0%
times-frac98.4%
unpow298.4%
associate-/l*98.5%
Simplified98.5%
expm1-log1p-u98.5%
expm1-udef23.8%
asin-neg23.8%
associate-*r/23.8%
pow1/223.8%
pow1/223.8%
pow-prod-down23.8%
Applied egg-rr23.8%
expm1-def98.4%
expm1-log1p98.4%
associate-/r/98.6%
unpow1/298.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.0%
if -4e4 < (/.f64 t l) < 2.00000000000000003e184Initial program 95.1%
Taylor expanded in t around 0 66.8%
unpow266.8%
unpow266.8%
times-frac78.5%
unpow278.5%
Simplified78.5%
Taylor expanded in Om around 0 66.5%
unpow266.5%
unpow266.5%
Simplified66.5%
times-frac77.5%
clear-num77.5%
div-inv77.5%
associate-/r/77.5%
Applied egg-rr77.5%
if 2.00000000000000003e184 < (/.f64 t l) Initial program 60.1%
Taylor expanded in t around -inf 48.5%
mul-1-neg48.5%
*-commutative48.5%
unpow248.5%
unpow248.5%
times-frac59.3%
unpow259.3%
associate-/l*59.6%
Simplified59.6%
expm1-log1p-u59.6%
expm1-udef60.1%
asin-neg60.1%
associate-*r/60.1%
pow1/260.1%
pow1/260.1%
pow-prod-down60.1%
Applied egg-rr60.1%
expm1-def59.6%
expm1-log1p59.6%
associate-/r/59.3%
unpow1/259.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in Om around 0 59.3%
associate-/l*59.6%
Simplified59.6%
Final simplification81.1%
(FPCore (t l Om Omc) :precision binary64 (if (or (<= t -2e-43) (not (<= t 1.35e+94))) (asin (/ (- l) (* (sqrt 2.0) t))) (asin (+ 1.0 (* -0.5 (* Om (/ (/ Om Omc) Omc)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= -2e-43) || !(t <= 1.35e+94)) {
tmp = asin((-l / (sqrt(2.0) * t)));
} else {
tmp = asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
}
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 <= (-2d-43)) .or. (.not. (t <= 1.35d+94))) then
tmp = asin((-l / (sqrt(2.0d0) * t)))
else
tmp = asin((1.0d0 + ((-0.5d0) * (om * ((om / omc) / omc)))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= -2e-43) || !(t <= 1.35e+94)) {
tmp = Math.asin((-l / (Math.sqrt(2.0) * t)));
} else {
tmp = Math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t <= -2e-43) or not (t <= 1.35e+94): tmp = math.asin((-l / (math.sqrt(2.0) * t))) else: tmp = math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc))))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((t <= -2e-43) || !(t <= 1.35e+94)) tmp = asin(Float64(Float64(-l) / Float64(sqrt(2.0) * t))); else tmp = asin(Float64(1.0 + Float64(-0.5 * Float64(Om * Float64(Float64(Om / Omc) / Omc))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t <= -2e-43) || ~((t <= 1.35e+94))) tmp = asin((-l / (sqrt(2.0) * t))); else tmp = asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc))))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, -2e-43], N[Not[LessEqual[t, 1.35e+94]], $MachinePrecision]], N[ArcSin[N[((-l) / N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(1.0 + N[(-0.5 * N[(Om * N[(N[(Om / Omc), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-43} \lor \neg \left(t \leq 1.35 \cdot 10^{+94}\right):\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{\sqrt{2} \cdot t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(1 + -0.5 \cdot \left(Om \cdot \frac{\frac{Om}{Omc}}{Omc}\right)\right)\\
\end{array}
\end{array}
if t < -2.00000000000000015e-43 or 1.3500000000000001e94 < t Initial program 71.9%
sqrt-div71.8%
div-inv71.8%
add-sqr-sqrt71.8%
hypot-1-def71.8%
*-commutative71.8%
sqrt-prod71.7%
unpow271.7%
sqrt-prod37.7%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
unpow297.5%
times-frac82.0%
unpow282.0%
unpow282.0%
associate-*r/82.0%
*-rgt-identity82.0%
unpow282.0%
unpow282.0%
times-frac97.5%
unpow297.5%
Simplified97.5%
Taylor expanded in Om around 0 82.0%
unpow218.6%
unpow218.6%
Simplified82.0%
Taylor expanded in t around -inf 54.4%
mul-1-neg54.4%
times-frac54.3%
unpow254.3%
unpow254.3%
Simplified54.3%
Taylor expanded in Om around 0 61.6%
if -2.00000000000000015e-43 < t < 1.3500000000000001e94Initial program 91.6%
Taylor expanded in t around 0 64.3%
unpow264.3%
unpow264.3%
times-frac74.3%
unpow274.3%
Simplified74.3%
Taylor expanded in Om around 0 64.0%
unpow264.0%
unpow264.0%
Simplified64.0%
times-frac73.6%
clear-num73.6%
div-inv73.6%
associate-/r/73.6%
Applied egg-rr73.6%
Final simplification67.9%
(FPCore (t l Om Omc)
:precision binary64
(if (<= t -9.5e-43)
(- (asin (* l (/ (sqrt 0.5) t))))
(if (<= t 3.45e+95)
(asin (+ 1.0 (* -0.5 (* Om (/ (/ Om Omc) Omc)))))
(asin (/ (- l) (* (sqrt 2.0) t))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= -9.5e-43) {
tmp = -asin((l * (sqrt(0.5) / t)));
} else if (t <= 3.45e+95) {
tmp = asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
} else {
tmp = asin((-l / (sqrt(2.0) * 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 <= (-9.5d-43)) then
tmp = -asin((l * (sqrt(0.5d0) / t)))
else if (t <= 3.45d+95) then
tmp = asin((1.0d0 + ((-0.5d0) * (om * ((om / omc) / omc)))))
else
tmp = asin((-l / (sqrt(2.0d0) * t)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= -9.5e-43) {
tmp = -Math.asin((l * (Math.sqrt(0.5) / t)));
} else if (t <= 3.45e+95) {
tmp = Math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
} else {
tmp = Math.asin((-l / (Math.sqrt(2.0) * t)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if t <= -9.5e-43: tmp = -math.asin((l * (math.sqrt(0.5) / t))) elif t <= 3.45e+95: tmp = math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc))))) else: tmp = math.asin((-l / (math.sqrt(2.0) * t))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (t <= -9.5e-43) tmp = Float64(-asin(Float64(l * Float64(sqrt(0.5) / t)))); elseif (t <= 3.45e+95) tmp = asin(Float64(1.0 + Float64(-0.5 * Float64(Om * Float64(Float64(Om / Omc) / Omc))))); else tmp = asin(Float64(Float64(-l) / Float64(sqrt(2.0) * t))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= -9.5e-43) tmp = -asin((l * (sqrt(0.5) / t))); elseif (t <= 3.45e+95) tmp = asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc))))); else tmp = asin((-l / (sqrt(2.0) * t))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[t, -9.5e-43], (-N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 3.45e+95], N[ArcSin[N[(1.0 + N[(-0.5 * N[(Om * N[(N[(Om / Omc), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[((-l) / N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-43}:\\
\;\;\;\;-\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;t \leq 3.45 \cdot 10^{+95}:\\
\;\;\;\;\sin^{-1} \left(1 + -0.5 \cdot \left(Om \cdot \frac{\frac{Om}{Omc}}{Omc}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{\sqrt{2} \cdot t}\right)\\
\end{array}
\end{array}
if t < -9.50000000000000044e-43Initial program 67.1%
Taylor expanded in t around -inf 55.1%
mul-1-neg55.1%
*-commutative55.1%
unpow255.1%
unpow255.1%
times-frac61.7%
unpow261.7%
associate-/l*61.7%
Simplified61.7%
expm1-log1p-u61.7%
expm1-udef21.9%
asin-neg21.9%
associate-*r/21.9%
pow1/221.9%
pow1/221.9%
pow-prod-down21.9%
Applied egg-rr21.9%
expm1-def61.7%
expm1-log1p61.7%
associate-/r/61.8%
unpow1/261.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in Om around 0 61.8%
if -9.50000000000000044e-43 < t < 3.45000000000000011e95Initial program 91.6%
Taylor expanded in t around 0 64.3%
unpow264.3%
unpow264.3%
times-frac74.3%
unpow274.3%
Simplified74.3%
Taylor expanded in Om around 0 64.0%
unpow264.0%
unpow264.0%
Simplified64.0%
times-frac73.6%
clear-num73.6%
div-inv73.6%
associate-/r/73.6%
Applied egg-rr73.6%
if 3.45000000000000011e95 < t Initial program 80.0%
sqrt-div80.0%
div-inv80.0%
add-sqr-sqrt80.0%
hypot-1-def80.0%
*-commutative80.0%
sqrt-prod80.0%
unpow280.0%
sqrt-prod39.3%
add-sqr-sqrt96.4%
Applied egg-rr96.4%
unpow296.4%
times-frac76.5%
unpow276.5%
unpow276.5%
associate-*r/76.5%
*-rgt-identity76.5%
unpow276.5%
unpow276.5%
times-frac96.4%
unpow296.4%
Simplified96.4%
Taylor expanded in Om around 0 76.5%
unpow215.3%
unpow215.3%
Simplified76.5%
Taylor expanded in t around -inf 53.2%
mul-1-neg53.2%
times-frac53.2%
unpow253.2%
unpow253.2%
Simplified53.2%
Taylor expanded in Om around 0 61.4%
Final simplification67.9%
(FPCore (t l Om Omc) :precision binary64 (asin (+ 1.0 (* -0.5 (* Om (/ (/ Om Omc) Omc))))))
double code(double t, double l, double Om, double Omc) {
return asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
}
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 + ((-0.5d0) * (om * ((om / omc) / omc)))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))));
}
def code(t, l, Om, Omc): return math.asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc)))))
function code(t, l, Om, Omc) return asin(Float64(1.0 + Float64(-0.5 * Float64(Om * Float64(Float64(Om / Omc) / Omc))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((1.0 + (-0.5 * (Om * ((Om / Omc) / Omc))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(1.0 + N[(-0.5 * N[(Om * N[(N[(Om / Omc), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(1 + -0.5 \cdot \left(Om \cdot \frac{\frac{Om}{Omc}}{Omc}\right)\right)
\end{array}
Initial program 82.2%
Taylor expanded in t around 0 42.5%
unpow242.5%
unpow242.5%
times-frac50.0%
unpow250.0%
Simplified50.0%
Taylor expanded in Om around 0 42.4%
unpow242.4%
unpow242.4%
Simplified42.4%
times-frac49.4%
clear-num49.4%
div-inv49.4%
associate-/r/49.4%
Applied egg-rr49.4%
Final simplification49.4%
herbie shell --seed 2023196
(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)))))))