
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+41)
(asin
(* (/ (/ l t) (sqrt 2.0)) (- -1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc))))))
(if (<= (/ t l) 5e+100)
(asin
(sqrt
(/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 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) <= -2e+41) {
tmp = asin((((l / t) / sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc))))));
} else if ((t / l) <= 5e+100) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (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) <= (-2d+41)) then
tmp = asin((((l / t) / sqrt(2.0d0)) * ((-1.0d0) - ((-0.5d0) * ((om / omc) * (om / omc))))))
else if ((t / l) <= 5d+100) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (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) <= -2e+41) {
tmp = Math.asin((((l / t) / Math.sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc))))));
} else if ((t / l) <= 5e+100) {
tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (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) <= -2e+41: tmp = math.asin((((l / t) / math.sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc)))))) elif (t / l) <= 5e+100: tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (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) <= -2e+41) tmp = asin(Float64(Float64(Float64(l / t) / sqrt(2.0)) * Float64(-1.0 - Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc)))))); elseif (Float64(t / l) <= 5e+100) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(t / Float64(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) <= -2e+41) tmp = asin((((l / t) / sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc)))))); elseif ((t / l) <= 5e+100) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (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], -2e+41], N[ArcSin[N[(N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+100], 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[(t / N[(l * N[(l / t), $MachinePrecision]), $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 -2 \cdot 10^{+41}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{\ell}{t}}{\sqrt{2}} \cdot \left(-1 - -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+100}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \frac{t}{\ell \cdot \frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2.00000000000000001e41Initial program 69.3%
sqrt-div69.3%
div-inv69.3%
add-sqr-sqrt69.3%
hypot-1-def69.3%
*-commutative69.3%
sqrt-prod69.2%
unpow269.2%
sqrt-prod0.0%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
associate-*l/99.1%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around -inf 83.5%
mul-1-neg83.5%
*-commutative83.5%
distribute-rgt-neg-in83.5%
unpow283.5%
unpow283.5%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in Om around 0 83.8%
unpow283.8%
unpow283.8%
times-frac99.8%
unpow299.8%
Simplified99.8%
unpow299.8%
Applied egg-rr99.8%
if -2.00000000000000001e41 < (/.f64 t l) < 4.9999999999999999e100Initial program 98.7%
unpow298.7%
clear-num98.7%
frac-times98.7%
*-un-lft-identity98.7%
Applied egg-rr98.7%
if 4.9999999999999999e100 < (/.f64 t l) Initial program 55.7%
unpow255.7%
Applied egg-rr55.7%
Taylor expanded in t around inf 35.1%
associate-/l*35.1%
unpow235.1%
unpow235.1%
unpow235.1%
unpow235.1%
times-frac43.4%
unpow243.4%
Simplified43.4%
Taylor expanded in Om around 0 99.7%
Final simplification99.1%
(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(t / Float64(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[(t / N[(l / N[Sqrt[2.0], $MachinePrecision]), $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}{\frac{\ell}{\sqrt{2}}}\right)}\right)
\end{array}
Initial program 86.2%
sqrt-div86.2%
div-inv86.2%
add-sqr-sqrt86.2%
hypot-1-def86.2%
*-commutative86.2%
sqrt-prod86.1%
unpow286.1%
sqrt-prod57.1%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*l/98.8%
associate-/l*98.9%
Simplified98.9%
Final simplification98.9%
(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 86.2%
sqrt-div86.2%
add-sqr-sqrt86.2%
hypot-1-def86.2%
*-commutative86.2%
sqrt-prod86.1%
unpow286.1%
sqrt-prod57.1%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (* (/ Om Omc) (/ Om Omc))))
(if (<= (/ t l) -2e+41)
(asin (* (/ (/ l t) (sqrt 2.0)) (- -1.0 (* -0.5 t_1))))
(if (<= (/ t l) 5e+100)
(asin (sqrt (/ (- 1.0 t_1) (+ 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 t_1 = (Om / Omc) * (Om / Omc);
double tmp;
if ((t / l) <= -2e+41) {
tmp = asin((((l / t) / sqrt(2.0)) * (-1.0 - (-0.5 * t_1))));
} else if ((t / l) <= 5e+100) {
tmp = asin(sqrt(((1.0 - t_1) / (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) :: t_1
real(8) :: tmp
t_1 = (om / omc) * (om / omc)
if ((t / l) <= (-2d+41)) then
tmp = asin((((l / t) / sqrt(2.0d0)) * ((-1.0d0) - ((-0.5d0) * t_1))))
else if ((t / l) <= 5d+100) then
tmp = asin(sqrt(((1.0d0 - t_1) / (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 t_1 = (Om / Omc) * (Om / Omc);
double tmp;
if ((t / l) <= -2e+41) {
tmp = Math.asin((((l / t) / Math.sqrt(2.0)) * (-1.0 - (-0.5 * t_1))));
} else if ((t / l) <= 5e+100) {
tmp = Math.asin(Math.sqrt(((1.0 - t_1) / (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): t_1 = (Om / Omc) * (Om / Omc) tmp = 0 if (t / l) <= -2e+41: tmp = math.asin((((l / t) / math.sqrt(2.0)) * (-1.0 - (-0.5 * t_1)))) elif (t / l) <= 5e+100: tmp = math.asin(math.sqrt(((1.0 - t_1) / (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) t_1 = Float64(Float64(Om / Omc) * Float64(Om / Omc)) tmp = 0.0 if (Float64(t / l) <= -2e+41) tmp = asin(Float64(Float64(Float64(l / t) / sqrt(2.0)) * Float64(-1.0 - Float64(-0.5 * t_1)))); elseif (Float64(t / l) <= 5e+100) tmp = asin(sqrt(Float64(Float64(1.0 - t_1) / 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) t_1 = (Om / Omc) * (Om / Omc); tmp = 0.0; if ((t / l) <= -2e+41) tmp = asin((((l / t) / sqrt(2.0)) * (-1.0 - (-0.5 * t_1)))); elseif ((t / l) <= 5e+100) tmp = asin(sqrt(((1.0 - t_1) / (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_] := Block[{t$95$1 = N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -2e+41], N[ArcSin[N[(N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+100], N[ArcSin[N[Sqrt[N[(N[(1.0 - t$95$1), $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}
t_1 := \frac{Om}{Omc} \cdot \frac{Om}{Omc}\\
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+41}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{\ell}{t}}{\sqrt{2}} \cdot \left(-1 - -0.5 \cdot t_1\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+100}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - t_1}{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) < -2.00000000000000001e41Initial program 69.3%
sqrt-div69.3%
div-inv69.3%
add-sqr-sqrt69.3%
hypot-1-def69.3%
*-commutative69.3%
sqrt-prod69.2%
unpow269.2%
sqrt-prod0.0%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
associate-*l/99.1%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around -inf 83.5%
mul-1-neg83.5%
*-commutative83.5%
distribute-rgt-neg-in83.5%
unpow283.5%
unpow283.5%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in Om around 0 83.8%
unpow283.8%
unpow283.8%
times-frac99.8%
unpow299.8%
Simplified99.8%
unpow299.8%
Applied egg-rr99.8%
if -2.00000000000000001e41 < (/.f64 t l) < 4.9999999999999999e100Initial program 98.7%
unpow298.7%
Applied egg-rr98.7%
unpow22.0%
Applied egg-rr98.7%
if 4.9999999999999999e100 < (/.f64 t l) Initial program 55.7%
unpow255.7%
Applied egg-rr55.7%
Taylor expanded in t around inf 35.1%
associate-/l*35.1%
unpow235.1%
unpow235.1%
unpow235.1%
unpow235.1%
times-frac43.4%
unpow243.4%
Simplified43.4%
Taylor expanded in Om around 0 99.7%
Final simplification99.1%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+15)
(asin
(* (/ (/ l t) (sqrt 2.0)) (- -1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc))))))
(if (<= (/ t l) 0.05)
(asin (+ 1.0 (* (pow (/ Om Omc) 2.0) -0.5)))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+15) {
tmp = asin((((l / t) / sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc))))));
} else if ((t / l) <= 0.05) {
tmp = asin((1.0 + (pow((Om / Omc), 2.0) * -0.5)));
} 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) <= (-1d+15)) then
tmp = asin((((l / t) / sqrt(2.0d0)) * ((-1.0d0) - ((-0.5d0) * ((om / omc) * (om / omc))))))
else if ((t / l) <= 0.05d0) then
tmp = asin((1.0d0 + (((om / omc) ** 2.0d0) * (-0.5d0))))
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) <= -1e+15) {
tmp = Math.asin((((l / t) / Math.sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc))))));
} else if ((t / l) <= 0.05) {
tmp = Math.asin((1.0 + (Math.pow((Om / Omc), 2.0) * -0.5)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+15: tmp = math.asin((((l / t) / math.sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc)))))) elif (t / l) <= 0.05: tmp = math.asin((1.0 + (math.pow((Om / Omc), 2.0) * -0.5))) 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) <= -1e+15) tmp = asin(Float64(Float64(Float64(l / t) / sqrt(2.0)) * Float64(-1.0 - Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc)))))); elseif (Float64(t / l) <= 0.05) tmp = asin(Float64(1.0 + Float64((Float64(Om / Omc) ^ 2.0) * -0.5))); 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) <= -1e+15) tmp = asin((((l / t) / sqrt(2.0)) * (-1.0 - (-0.5 * ((Om / Omc) * (Om / Omc)))))); elseif ((t / l) <= 0.05) tmp = asin((1.0 + (((Om / Omc) ^ 2.0) * -0.5))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+15], N[ArcSin[N[(N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[N[(1.0 + N[(N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $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 -1 \cdot 10^{+15}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{\ell}{t}}{\sqrt{2}} \cdot \left(-1 - -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(1 + {\left(\frac{Om}{Omc}\right)}^{2} \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e15Initial program 71.0%
sqrt-div71.0%
div-inv71.0%
add-sqr-sqrt71.0%
hypot-1-def71.0%
*-commutative71.0%
sqrt-prod70.9%
unpow270.9%
sqrt-prod0.0%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
associate-*l/99.1%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
unpow284.4%
unpow284.4%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in Om around 0 84.7%
unpow284.7%
unpow284.7%
times-frac99.7%
unpow299.7%
Simplified99.7%
unpow299.7%
Applied egg-rr99.7%
if -1e15 < (/.f64 t l) < 0.050000000000000003Initial program 98.6%
Taylor expanded in t around 0 80.6%
unpow280.6%
unpow280.6%
Simplified80.6%
Taylor expanded in Om around 0 80.6%
unpow280.6%
unpow280.6%
times-frac95.7%
unpow295.7%
Simplified95.7%
if 0.050000000000000003 < (/.f64 t l) Initial program 68.8%
unpow268.8%
Applied egg-rr68.8%
Taylor expanded in t around inf 37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
unpow237.4%
unpow237.4%
times-frac43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in Om around 0 97.5%
Final simplification96.9%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+15)
(asin (/ (- (/ l t)) (sqrt 2.0)))
(if (<= (/ t l) 0.05)
(asin (+ 1.0 (* (pow (/ Om Omc) 2.0) -0.5)))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+15) {
tmp = asin((-(l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.05) {
tmp = asin((1.0 + (pow((Om / Omc), 2.0) * -0.5)));
} 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) <= (-1d+15)) then
tmp = asin((-(l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.05d0) then
tmp = asin((1.0d0 + (((om / omc) ** 2.0d0) * (-0.5d0))))
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) <= -1e+15) {
tmp = Math.asin((-(l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.05) {
tmp = Math.asin((1.0 + (Math.pow((Om / Omc), 2.0) * -0.5)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+15: tmp = math.asin((-(l / t) / math.sqrt(2.0))) elif (t / l) <= 0.05: tmp = math.asin((1.0 + (math.pow((Om / Omc), 2.0) * -0.5))) 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) <= -1e+15) tmp = asin(Float64(Float64(-Float64(l / t)) / sqrt(2.0))); elseif (Float64(t / l) <= 0.05) tmp = asin(Float64(1.0 + Float64((Float64(Om / Omc) ^ 2.0) * -0.5))); 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) <= -1e+15) tmp = asin((-(l / t) / sqrt(2.0))); elseif ((t / l) <= 0.05) tmp = asin((1.0 + (((Om / Omc) ^ 2.0) * -0.5))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+15], N[ArcSin[N[((-N[(l / t), $MachinePrecision]) / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[N[(1.0 + N[(N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $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 -1 \cdot 10^{+15}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(1 + {\left(\frac{Om}{Omc}\right)}^{2} \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e15Initial program 71.0%
sqrt-div71.0%
div-inv71.0%
add-sqr-sqrt71.0%
hypot-1-def71.0%
*-commutative71.0%
sqrt-prod70.9%
unpow270.9%
sqrt-prod0.0%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
associate-*l/99.1%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
unpow284.4%
unpow284.4%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in Om around 0 98.4%
if -1e15 < (/.f64 t l) < 0.050000000000000003Initial program 98.6%
Taylor expanded in t around 0 80.6%
unpow280.6%
unpow280.6%
Simplified80.6%
Taylor expanded in Om around 0 80.6%
unpow280.6%
unpow280.6%
times-frac95.7%
unpow295.7%
Simplified95.7%
if 0.050000000000000003 < (/.f64 t l) Initial program 68.8%
unpow268.8%
Applied egg-rr68.8%
Taylor expanded in t around inf 37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
unpow237.4%
unpow237.4%
times-frac43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in Om around 0 97.5%
Final simplification96.7%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -5e+211) (asin (/ (sqrt 0.5) (/ t l))) (if (<= (/ t l) 0.05) (asin 1.0) (asin (* (/ l t) (sqrt 0.5))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+211) {
tmp = asin((sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = asin(1.0);
} else {
tmp = asin(((l / t) * sqrt(0.5)));
}
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) <= (-5d+211)) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.05d0) then
tmp = asin(1.0d0)
else
tmp = asin(((l / t) * sqrt(0.5d0)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+211) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l / t) * Math.sqrt(0.5)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -5e+211: tmp = math.asin((math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.05: tmp = math.asin(1.0) else: tmp = math.asin(((l / t) * math.sqrt(0.5))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -5e+211) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); elseif (Float64(t / l) <= 0.05) tmp = asin(1.0); else tmp = asin(Float64(Float64(l / t) * sqrt(0.5))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -5e+211) tmp = asin((sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.05) tmp = asin(1.0); else tmp = asin(((l / t) * sqrt(0.5))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+211], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l / t), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+211}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4.9999999999999995e211Initial program 70.7%
unpow270.7%
Applied egg-rr70.7%
Taylor expanded in t around inf 61.1%
associate-/l*61.1%
unpow261.1%
unpow261.1%
unpow261.1%
unpow261.1%
times-frac70.7%
unpow270.7%
Simplified70.7%
Taylor expanded in Om around 0 70.2%
associate-/l*70.2%
Simplified70.2%
if -4.9999999999999995e211 < (/.f64 t l) < 0.050000000000000003Initial program 93.9%
Taylor expanded in t around 0 67.7%
unpow267.7%
unpow267.7%
Simplified67.7%
Taylor expanded in Om around 0 79.9%
if 0.050000000000000003 < (/.f64 t l) Initial program 68.8%
unpow268.8%
Applied egg-rr68.8%
Taylor expanded in t around inf 37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
unpow237.4%
unpow237.4%
times-frac43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in Om around 0 97.5%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in t around 0 97.5%
associate-*r/97.4%
Simplified97.4%
Final simplification82.9%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -5e+211) (asin (/ (sqrt 0.5) (/ t l))) (if (<= (/ t l) 0.05) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+211) {
tmp = asin((sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = asin(1.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) <= (-5d+211)) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.05d0) then
tmp = asin(1.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) <= -5e+211) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -5e+211: tmp = math.asin((math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.05: tmp = math.asin(1.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) <= -5e+211) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); elseif (Float64(t / l) <= 0.05) tmp = asin(1.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) <= -5e+211) tmp = asin((sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.05) tmp = asin(1.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], -5e+211], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[1.0], $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 -5 \cdot 10^{+211}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4.9999999999999995e211Initial program 70.7%
unpow270.7%
Applied egg-rr70.7%
Taylor expanded in t around inf 61.1%
associate-/l*61.1%
unpow261.1%
unpow261.1%
unpow261.1%
unpow261.1%
times-frac70.7%
unpow270.7%
Simplified70.7%
Taylor expanded in Om around 0 70.2%
associate-/l*70.2%
Simplified70.2%
if -4.9999999999999995e211 < (/.f64 t l) < 0.050000000000000003Initial program 93.9%
Taylor expanded in t around 0 67.7%
unpow267.7%
unpow267.7%
Simplified67.7%
Taylor expanded in Om around 0 79.9%
if 0.050000000000000003 < (/.f64 t l) Initial program 68.8%
unpow268.8%
Applied egg-rr68.8%
Taylor expanded in t around inf 37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
unpow237.4%
unpow237.4%
times-frac43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in Om around 0 97.5%
Final simplification83.0%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -1e+15) (asin (* (/ l t) (- (sqrt 0.5)))) (if (<= (/ t l) 0.05) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+15) {
tmp = asin(((l / t) * -sqrt(0.5)));
} else if ((t / l) <= 0.05) {
tmp = asin(1.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) <= (-1d+15)) then
tmp = asin(((l / t) * -sqrt(0.5d0)))
else if ((t / l) <= 0.05d0) then
tmp = asin(1.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) <= -1e+15) {
tmp = Math.asin(((l / t) * -Math.sqrt(0.5)));
} else if ((t / l) <= 0.05) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+15: tmp = math.asin(((l / t) * -math.sqrt(0.5))) elif (t / l) <= 0.05: tmp = math.asin(1.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) <= -1e+15) tmp = asin(Float64(Float64(l / t) * Float64(-sqrt(0.5)))); elseif (Float64(t / l) <= 0.05) tmp = asin(1.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) <= -1e+15) tmp = asin(((l / t) * -sqrt(0.5))); elseif ((t / l) <= 0.05) tmp = asin(1.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], -1e+15], N[ArcSin[N[(N[(l / t), $MachinePrecision] * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[1.0], $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 -1 \cdot 10^{+15}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e15Initial program 71.0%
unpow271.0%
Applied egg-rr71.0%
Taylor expanded in t around inf 45.3%
associate-/l*45.3%
unpow245.3%
unpow245.3%
unpow245.3%
unpow245.3%
times-frac53.3%
unpow253.3%
Simplified53.3%
Taylor expanded in Om around 0 53.0%
unpow253.0%
Simplified53.0%
Taylor expanded in l around -inf 98.1%
mul-1-neg98.1%
associate-*r/98.1%
distribute-rgt-neg-in98.1%
Simplified98.1%
if -1e15 < (/.f64 t l) < 0.050000000000000003Initial program 98.6%
Taylor expanded in t around 0 80.6%
unpow280.6%
unpow280.6%
Simplified80.6%
Taylor expanded in Om around 0 95.2%
if 0.050000000000000003 < (/.f64 t l) Initial program 68.8%
unpow268.8%
Applied egg-rr68.8%
Taylor expanded in t around inf 37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
unpow237.4%
unpow237.4%
times-frac43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in Om around 0 97.5%
Final simplification96.3%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -1e+15) (asin (/ (* l (- (sqrt 0.5))) t)) (if (<= (/ t l) 0.05) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+15) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 0.05) {
tmp = asin(1.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) <= (-1d+15)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 0.05d0) then
tmp = asin(1.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) <= -1e+15) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.05) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+15: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 0.05: tmp = math.asin(1.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) <= -1e+15) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 0.05) tmp = asin(1.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) <= -1e+15) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 0.05) tmp = asin(1.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], -1e+15], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[1.0], $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 -1 \cdot 10^{+15}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e15Initial program 71.0%
unpow271.0%
Applied egg-rr71.0%
Taylor expanded in t around inf 45.3%
associate-/l*45.3%
unpow245.3%
unpow245.3%
unpow245.3%
unpow245.3%
times-frac53.3%
unpow253.3%
Simplified53.3%
Taylor expanded in Om around 0 53.0%
unpow253.0%
Simplified53.0%
Taylor expanded in l around -inf 98.1%
if -1e15 < (/.f64 t l) < 0.050000000000000003Initial program 98.6%
Taylor expanded in t around 0 80.6%
unpow280.6%
unpow280.6%
Simplified80.6%
Taylor expanded in Om around 0 95.2%
if 0.050000000000000003 < (/.f64 t l) Initial program 68.8%
unpow268.8%
Applied egg-rr68.8%
Taylor expanded in t around inf 37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
unpow237.4%
unpow237.4%
times-frac43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in Om around 0 97.5%
Final simplification96.3%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -1e+15) (asin (/ (- (/ l t)) (sqrt 2.0))) (if (<= (/ t l) 0.05) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+15) {
tmp = asin((-(l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.05) {
tmp = asin(1.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) <= (-1d+15)) then
tmp = asin((-(l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.05d0) then
tmp = asin(1.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) <= -1e+15) {
tmp = Math.asin((-(l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.05) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+15: tmp = math.asin((-(l / t) / math.sqrt(2.0))) elif (t / l) <= 0.05: tmp = math.asin(1.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) <= -1e+15) tmp = asin(Float64(Float64(-Float64(l / t)) / sqrt(2.0))); elseif (Float64(t / l) <= 0.05) tmp = asin(1.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) <= -1e+15) tmp = asin((-(l / t) / sqrt(2.0))); elseif ((t / l) <= 0.05) tmp = asin(1.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], -1e+15], N[ArcSin[N[((-N[(l / t), $MachinePrecision]) / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[1.0], $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 -1 \cdot 10^{+15}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e15Initial program 71.0%
sqrt-div71.0%
div-inv71.0%
add-sqr-sqrt71.0%
hypot-1-def71.0%
*-commutative71.0%
sqrt-prod70.9%
unpow270.9%
sqrt-prod0.0%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
associate-*l/99.1%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
unpow284.4%
unpow284.4%
times-frac99.4%
unpow299.4%
*-commutative99.4%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in Om around 0 98.4%
if -1e15 < (/.f64 t l) < 0.050000000000000003Initial program 98.6%
Taylor expanded in t around 0 80.6%
unpow280.6%
unpow280.6%
Simplified80.6%
Taylor expanded in Om around 0 95.2%
if 0.050000000000000003 < (/.f64 t l) Initial program 68.8%
unpow268.8%
Applied egg-rr68.8%
Taylor expanded in t around inf 37.4%
associate-/l*37.4%
unpow237.4%
unpow237.4%
unpow237.4%
unpow237.4%
times-frac43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in Om around 0 97.5%
Final simplification96.4%
(FPCore (t l Om Omc) :precision binary64 (if (or (<= t -6e+49) (not (<= t 6.8e+137))) (asin (* (/ l t) (sqrt 0.5))) (asin 1.0)))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= -6e+49) || !(t <= 6.8e+137)) {
tmp = asin(((l / t) * sqrt(0.5)));
} 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 <= (-6d+49)) .or. (.not. (t <= 6.8d+137))) then
tmp = asin(((l / t) * sqrt(0.5d0)))
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 <= -6e+49) || !(t <= 6.8e+137)) {
tmp = Math.asin(((l / t) * Math.sqrt(0.5)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t <= -6e+49) or not (t <= 6.8e+137): tmp = math.asin(((l / t) * math.sqrt(0.5))) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((t <= -6e+49) || !(t <= 6.8e+137)) tmp = asin(Float64(Float64(l / t) * sqrt(0.5))); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t <= -6e+49) || ~((t <= 6.8e+137))) tmp = asin(((l / t) * sqrt(0.5))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, -6e+49], N[Not[LessEqual[t, 6.8e+137]], $MachinePrecision]], N[ArcSin[N[(N[(l / t), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+49} \lor \neg \left(t \leq 6.8 \cdot 10^{+137}\right):\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if t < -6.0000000000000005e49 or 6.79999999999999973e137 < t Initial program 75.8%
unpow275.8%
Applied egg-rr75.8%
Taylor expanded in t around inf 35.8%
associate-/l*35.8%
unpow235.8%
unpow235.8%
unpow235.8%
unpow235.8%
times-frac41.1%
unpow241.1%
Simplified41.1%
Taylor expanded in Om around 0 61.9%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in t around 0 61.9%
associate-*r/61.9%
Simplified61.9%
if -6.0000000000000005e49 < t < 6.79999999999999973e137Initial program 91.0%
Taylor expanded in t around 0 61.2%
unpow261.2%
unpow261.2%
Simplified61.2%
Taylor expanded in Om around 0 73.3%
Final simplification69.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 86.2%
Taylor expanded in t around 0 47.8%
unpow247.8%
unpow247.8%
Simplified47.8%
Taylor expanded in Om around 0 56.4%
Final simplification56.4%
herbie shell --seed 2023195
(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)))))))