
(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 12 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 (/ (* t (sqrt 2.0)) l)))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t * sqrt(2.0)) / 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, ((t * Math.sqrt(2.0)) / l))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t * math.sqrt(2.0)) / l))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t * sqrt(2.0)) / l)))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t * sqrt(2.0)) / 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[(t * N[Sqrt[2.0], $MachinePrecision]), $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{t \cdot \sqrt{2}}{\ell}\right)}\right)
\end{array}
Initial program 83.1%
sqrt-div83.0%
div-inv83.0%
add-sqr-sqrt83.1%
hypot-1-def83.1%
*-commutative83.1%
sqrt-prod83.0%
unpow283.0%
sqrt-prod57.1%
add-sqr-sqrt99.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
Simplified99.0%
Taylor expanded in t around 0 99.0%
Final simplification99.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 83.1%
sqrt-div83.0%
div-inv83.0%
add-sqr-sqrt83.1%
hypot-1-def83.1%
*-commutative83.1%
sqrt-prod83.0%
unpow283.0%
sqrt-prod57.1%
add-sqr-sqrt99.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
Simplified99.0%
Final simplification99.0%
(FPCore (t l Om Omc) :precision binary64 (asin (/ 1.0 (hypot 1.0 (* (sqrt 2.0) (/ t l))))))
double code(double t, double l, double Om, double Omc) {
return asin((1.0 / 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 / Math.hypot(1.0, (Math.sqrt(2.0) * (t / l)))));
}
def code(t, l, Om, Omc): return math.asin((1.0 / math.hypot(1.0, (math.sqrt(2.0) * (t / l)))))
function code(t, l, Om, Omc) return asin(Float64(1.0 / hypot(1.0, Float64(sqrt(2.0) * Float64(t / l))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((1.0 / hypot(1.0, (sqrt(2.0) * (t / l))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(1.0 / 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}{\mathsf{hypot}\left(1, \sqrt{2} \cdot \frac{t}{\ell}\right)}\right)
\end{array}
Initial program 83.1%
sqrt-div83.0%
div-inv83.0%
add-sqr-sqrt83.1%
hypot-1-def83.1%
*-commutative83.1%
sqrt-prod83.0%
unpow283.0%
sqrt-prod57.1%
add-sqr-sqrt99.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
Simplified99.0%
Taylor expanded in t around 0 99.0%
Taylor expanded in Om around 0 66.0%
unpow266.0%
unpow266.0%
swap-sqr66.1%
unpow266.1%
times-frac82.0%
associate-*l/82.0%
associate-*l/82.0%
associate-/r/82.0%
associate-/r/82.0%
unpow282.0%
associate-/r/82.0%
*-commutative82.0%
Simplified82.0%
sqrt-div82.0%
metadata-eval82.0%
unpow282.0%
hypot-1-def98.0%
Applied egg-rr98.0%
Final simplification98.0%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -500.0)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= (/ t l) 0.1)
(asin (sqrt (- 1.0 (* (/ Om Omc) (/ Om Omc)))))
(asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -500.0) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.1) {
tmp = asin(sqrt((1.0 - ((Om / Omc) * (Om / Omc)))));
} 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) <= (-500.0d0)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.1d0) then
tmp = asin(sqrt((1.0d0 - ((om / omc) * (om / omc)))))
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) <= -500.0) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.1) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) * (Om / Omc)))));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -500.0: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 0.1: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) * (Om / Omc))))) 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) <= -500.0) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 0.1) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -500.0) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 0.1) tmp = asin(sqrt((1.0 - ((Om / Omc) * (Om / Omc))))); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -500.0], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.1], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -500:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.1:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -500Initial program 73.3%
sqrt-div73.3%
div-inv73.3%
add-sqr-sqrt73.3%
hypot-1-def73.3%
*-commutative73.3%
sqrt-prod73.3%
unpow273.3%
sqrt-prod0.0%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
associate-*r/99.4%
*-rgt-identity99.4%
Simplified99.4%
Taylor expanded in t around 0 99.5%
Taylor expanded in Om around 0 52.6%
unpow252.6%
unpow252.6%
swap-sqr52.8%
unpow252.8%
times-frac72.5%
associate-*l/72.5%
associate-*l/72.4%
associate-/r/72.5%
associate-/r/72.4%
unpow272.4%
associate-/r/72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
associate-/r*98.0%
distribute-neg-frac98.0%
Simplified98.0%
if -500 < (/.f64 t l) < 0.10000000000000001Initial program 99.2%
Taylor expanded in t around 0 83.2%
unpow283.2%
unpow283.2%
times-frac98.1%
unpow298.1%
Simplified98.1%
unpow298.1%
Applied egg-rr98.1%
if 0.10000000000000001 < (/.f64 t l) Initial program 64.9%
Taylor expanded in t around inf 43.6%
associate-/l*43.6%
unpow243.6%
unpow243.6%
unpow243.6%
unpow243.6%
Simplified43.6%
Taylor expanded in Om around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Final simplification98.3%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -500.0)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= (/ t l) 0.1)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -500.0) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.1) {
tmp = asin((1.0 - pow((t / l), 2.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) <= (-500.0d0)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.1d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.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) <= -500.0) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.1) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -500.0: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 0.1: tmp = math.asin((1.0 - math.pow((t / l), 2.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) <= -500.0) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 0.1) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -500.0) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 0.1) tmp = asin((1.0 - ((t / l) ^ 2.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], -500.0], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.1], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -500:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.1:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -500Initial program 73.3%
sqrt-div73.3%
div-inv73.3%
add-sqr-sqrt73.3%
hypot-1-def73.3%
*-commutative73.3%
sqrt-prod73.3%
unpow273.3%
sqrt-prod0.0%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
associate-*r/99.4%
*-rgt-identity99.4%
Simplified99.4%
Taylor expanded in t around 0 99.5%
Taylor expanded in Om around 0 52.6%
unpow252.6%
unpow252.6%
swap-sqr52.8%
unpow252.8%
times-frac72.5%
associate-*l/72.5%
associate-*l/72.4%
associate-/r/72.5%
associate-/r/72.4%
unpow272.4%
associate-/r/72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
associate-/r*98.0%
distribute-neg-frac98.0%
Simplified98.0%
if -500 < (/.f64 t l) < 0.10000000000000001Initial program 99.2%
sqrt-div99.2%
div-inv99.2%
add-sqr-sqrt99.2%
hypot-1-def99.2%
*-commutative99.2%
sqrt-prod99.2%
unpow299.2%
sqrt-prod63.0%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
associate-*r/99.2%
*-rgt-identity99.2%
Simplified99.2%
Taylor expanded in t around 0 99.2%
Taylor expanded in Om around 0 83.7%
unpow283.7%
unpow283.7%
swap-sqr83.7%
unpow283.7%
times-frac97.5%
associate-*l/97.5%
associate-*l/97.5%
associate-/r/97.5%
associate-/r/97.5%
unpow297.5%
associate-/r/97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in t around 0 83.0%
unpow283.0%
*-commutative83.0%
unpow283.0%
unpow283.0%
swap-sqr83.0%
times-frac96.8%
associate-*r/96.8%
associate-*r/96.8%
swap-sqr96.8%
rem-square-sqrt96.8%
unpow296.8%
associate-*r*96.8%
metadata-eval96.8%
Simplified96.8%
if 0.10000000000000001 < (/.f64 t l) Initial program 64.9%
Taylor expanded in t around inf 43.6%
associate-/l*43.6%
unpow243.6%
unpow243.6%
unpow243.6%
unpow243.6%
Simplified43.6%
Taylor expanded in Om around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Final simplification97.7%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -2e+208) (asin (/ (sqrt 0.5) (/ t l))) (if (<= (/ t l) 0.1) (asin 1.0) (asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+208) {
tmp = asin((sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.1) {
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) <= (-2d+208)) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.1d0) 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) <= -2e+208) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.1) {
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) <= -2e+208: tmp = math.asin((math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.1: 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) <= -2e+208) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); elseif (Float64(t / l) <= 0.1) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+208) tmp = asin((sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.1) 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], -2e+208], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.1], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+208}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.1:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2e208Initial program 66.8%
Taylor expanded in t around inf 62.8%
associate-/l*62.8%
unpow262.8%
unpow262.8%
unpow262.8%
unpow262.8%
Simplified62.8%
Taylor expanded in Om around 0 66.2%
associate-/l*66.2%
associate-/r/66.2%
Simplified66.2%
*-commutative66.2%
clear-num66.2%
un-div-inv66.2%
Applied egg-rr66.2%
if -2e208 < (/.f64 t l) < 0.10000000000000001Initial program 93.8%
sqrt-div93.8%
div-inv93.8%
add-sqr-sqrt93.8%
hypot-1-def93.8%
*-commutative93.8%
sqrt-prod93.8%
unpow293.8%
sqrt-prod47.5%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
associate-*r/99.2%
*-rgt-identity99.2%
Simplified99.2%
Taylor expanded in t around 0 99.2%
Taylor expanded in Om around 0 73.9%
unpow273.9%
unpow273.9%
swap-sqr73.9%
unpow273.9%
times-frac92.3%
associate-*l/92.3%
associate-*l/92.2%
associate-/r/92.3%
associate-/r/92.3%
unpow292.3%
associate-/r/92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in t around 0 74.3%
if 0.10000000000000001 < (/.f64 t l) Initial program 64.9%
Taylor expanded in t around inf 43.6%
associate-/l*43.6%
unpow243.6%
unpow243.6%
unpow243.6%
unpow243.6%
Simplified43.6%
Taylor expanded in Om around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Final simplification80.4%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -500.0) (asin (/ (- l) (* t (sqrt 2.0)))) (if (<= (/ t l) 0.1) (asin 1.0) (asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -500.0) {
tmp = asin((-l / (t * sqrt(2.0))));
} else if ((t / l) <= 0.1) {
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) <= (-500.0d0)) then
tmp = asin((-l / (t * sqrt(2.0d0))))
else if ((t / l) <= 0.1d0) 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) <= -500.0) {
tmp = Math.asin((-l / (t * Math.sqrt(2.0))));
} else if ((t / l) <= 0.1) {
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) <= -500.0: tmp = math.asin((-l / (t * math.sqrt(2.0)))) elif (t / l) <= 0.1: 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) <= -500.0) tmp = asin(Float64(Float64(-l) / Float64(t * sqrt(2.0)))); elseif (Float64(t / l) <= 0.1) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -500.0) tmp = asin((-l / (t * sqrt(2.0)))); elseif ((t / l) <= 0.1) 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], -500.0], N[ArcSin[N[((-l) / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.1], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -500:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t \cdot \sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.1:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -500Initial program 73.3%
sqrt-div73.3%
div-inv73.3%
add-sqr-sqrt73.3%
hypot-1-def73.3%
*-commutative73.3%
sqrt-prod73.3%
unpow273.3%
sqrt-prod0.0%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
associate-*r/99.4%
*-rgt-identity99.4%
Simplified99.4%
Taylor expanded in t around 0 99.5%
Taylor expanded in Om around 0 52.6%
unpow252.6%
unpow252.6%
swap-sqr52.8%
unpow252.8%
times-frac72.5%
associate-*l/72.5%
associate-*l/72.4%
associate-/r/72.5%
associate-/r/72.4%
unpow272.4%
associate-/r/72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
Simplified97.9%
if -500 < (/.f64 t l) < 0.10000000000000001Initial program 99.2%
sqrt-div99.2%
div-inv99.2%
add-sqr-sqrt99.2%
hypot-1-def99.2%
*-commutative99.2%
sqrt-prod99.2%
unpow299.2%
sqrt-prod63.0%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
associate-*r/99.2%
*-rgt-identity99.2%
Simplified99.2%
Taylor expanded in t around 0 99.2%
Taylor expanded in Om around 0 83.7%
unpow283.7%
unpow283.7%
swap-sqr83.7%
unpow283.7%
times-frac97.5%
associate-*l/97.5%
associate-*l/97.5%
associate-/r/97.5%
associate-/r/97.5%
unpow297.5%
associate-/r/97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in t around 0 96.4%
if 0.10000000000000001 < (/.f64 t l) Initial program 64.9%
Taylor expanded in t around inf 43.6%
associate-/l*43.6%
unpow243.6%
unpow243.6%
unpow243.6%
unpow243.6%
Simplified43.6%
Taylor expanded in Om around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Final simplification97.5%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -500.0) (asin (/ (/ (- l) t) (sqrt 2.0))) (if (<= (/ t l) 0.1) (asin 1.0) (asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -500.0) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.1) {
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) <= (-500.0d0)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.1d0) 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) <= -500.0) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.1) {
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) <= -500.0: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 0.1: 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) <= -500.0) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 0.1) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -500.0) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 0.1) 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], -500.0], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.1], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -500:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.1:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -500Initial program 73.3%
sqrt-div73.3%
div-inv73.3%
add-sqr-sqrt73.3%
hypot-1-def73.3%
*-commutative73.3%
sqrt-prod73.3%
unpow273.3%
sqrt-prod0.0%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
associate-*r/99.4%
*-rgt-identity99.4%
Simplified99.4%
Taylor expanded in t around 0 99.5%
Taylor expanded in Om around 0 52.6%
unpow252.6%
unpow252.6%
swap-sqr52.8%
unpow252.8%
times-frac72.5%
associate-*l/72.5%
associate-*l/72.4%
associate-/r/72.5%
associate-/r/72.4%
unpow272.4%
associate-/r/72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
associate-/r*98.0%
distribute-neg-frac98.0%
Simplified98.0%
if -500 < (/.f64 t l) < 0.10000000000000001Initial program 99.2%
sqrt-div99.2%
div-inv99.2%
add-sqr-sqrt99.2%
hypot-1-def99.2%
*-commutative99.2%
sqrt-prod99.2%
unpow299.2%
sqrt-prod63.0%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
associate-*r/99.2%
*-rgt-identity99.2%
Simplified99.2%
Taylor expanded in t around 0 99.2%
Taylor expanded in Om around 0 83.7%
unpow283.7%
unpow283.7%
swap-sqr83.7%
unpow283.7%
times-frac97.5%
associate-*l/97.5%
associate-*l/97.5%
associate-/r/97.5%
associate-/r/97.5%
unpow297.5%
associate-/r/97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in t around 0 96.4%
if 0.10000000000000001 < (/.f64 t l) Initial program 64.9%
Taylor expanded in t around inf 43.6%
associate-/l*43.6%
unpow243.6%
unpow243.6%
unpow243.6%
unpow243.6%
Simplified43.6%
Taylor expanded in Om around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Final simplification97.5%
(FPCore (t l Om Omc) :precision binary64 (if (<= t 3.05e+60) (asin 1.0) (asin (* l (/ (sqrt 0.5) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 3.05e+60) {
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 <= 3.05d+60) 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 <= 3.05e+60) {
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 <= 3.05e+60: 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 (t <= 3.05e+60) tmp = asin(1.0); else tmp = asin(Float64(l * Float64(sqrt(0.5) / t))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= 3.05e+60) tmp = asin(1.0); else tmp = asin((l * (sqrt(0.5) / t))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[t, 3.05e+60], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.05 \cdot 10^{+60}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if t < 3.05e60Initial program 85.0%
sqrt-div85.0%
div-inv85.0%
add-sqr-sqrt85.0%
hypot-1-def85.0%
*-commutative85.0%
sqrt-prod84.9%
unpow284.9%
sqrt-prod56.4%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in t around 0 99.1%
Taylor expanded in Om around 0 67.8%
unpow267.8%
unpow267.8%
swap-sqr67.9%
unpow267.9%
times-frac83.7%
associate-*l/83.7%
associate-*l/83.7%
associate-/r/83.7%
associate-/r/83.7%
unpow283.7%
associate-/r/83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in t around 0 57.0%
if 3.05e60 < t Initial program 76.5%
Taylor expanded in t around inf 49.7%
associate-/l*49.7%
unpow249.7%
unpow249.7%
unpow249.7%
unpow249.7%
Simplified49.7%
Taylor expanded in Om around 0 71.0%
associate-/l*71.0%
associate-/r/70.9%
Simplified70.9%
Taylor expanded in l around 0 71.0%
associate-*r/71.0%
Simplified71.0%
Final simplification60.2%
(FPCore (t l Om Omc) :precision binary64 (if (<= t 6.8e+60) (asin 1.0) (asin (* (/ l t) (sqrt 0.5)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 6.8e+60) {
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 <= 6.8d+60) 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 <= 6.8e+60) {
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 <= 6.8e+60: 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 (t <= 6.8e+60) 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 <= 6.8e+60) tmp = asin(1.0); else tmp = asin(((l / t) * sqrt(0.5))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[t, 6.8e+60], 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}\;t \leq 6.8 \cdot 10^{+60}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
if t < 6.7999999999999999e60Initial program 85.0%
sqrt-div85.0%
div-inv85.0%
add-sqr-sqrt85.0%
hypot-1-def85.0%
*-commutative85.0%
sqrt-prod84.9%
unpow284.9%
sqrt-prod56.4%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in t around 0 99.1%
Taylor expanded in Om around 0 67.8%
unpow267.8%
unpow267.8%
swap-sqr67.9%
unpow267.9%
times-frac83.7%
associate-*l/83.7%
associate-*l/83.7%
associate-/r/83.7%
associate-/r/83.7%
unpow283.7%
associate-/r/83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in t around 0 57.0%
if 6.7999999999999999e60 < t Initial program 76.5%
Taylor expanded in t around inf 49.7%
associate-/l*49.7%
unpow249.7%
unpow249.7%
unpow249.7%
unpow249.7%
Simplified49.7%
Taylor expanded in Om around 0 71.0%
associate-/l*71.0%
associate-/r/70.9%
Simplified70.9%
Final simplification60.1%
(FPCore (t l Om Omc) :precision binary64 (if (<= t 7.2e+60) (asin 1.0) (asin (/ l (* t (sqrt 2.0))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 7.2e+60) {
tmp = asin(1.0);
} else {
tmp = asin((l / (t * sqrt(2.0))));
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (t <= 7.2d+60) then
tmp = asin(1.0d0)
else
tmp = asin((l / (t * sqrt(2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 7.2e+60) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l / (t * Math.sqrt(2.0))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if t <= 7.2e+60: tmp = math.asin(1.0) else: tmp = math.asin((l / (t * math.sqrt(2.0)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (t <= 7.2e+60) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t * sqrt(2.0)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= 7.2e+60) tmp = asin(1.0); else tmp = asin((l / (t * sqrt(2.0)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[t, 7.2e+60], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.2 \cdot 10^{+60}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 7.19999999999999935e60Initial program 85.0%
sqrt-div85.0%
div-inv85.0%
add-sqr-sqrt85.0%
hypot-1-def85.0%
*-commutative85.0%
sqrt-prod84.9%
unpow284.9%
sqrt-prod56.4%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in t around 0 99.1%
Taylor expanded in Om around 0 67.8%
unpow267.8%
unpow267.8%
swap-sqr67.9%
unpow267.9%
times-frac83.7%
associate-*l/83.7%
associate-*l/83.7%
associate-/r/83.7%
associate-/r/83.7%
unpow283.7%
associate-/r/83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in t around 0 57.0%
if 7.19999999999999935e60 < t Initial program 76.5%
sqrt-div76.4%
div-inv76.4%
add-sqr-sqrt76.4%
hypot-1-def76.4%
*-commutative76.4%
sqrt-prod76.4%
unpow276.4%
sqrt-prod59.7%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
associate-*r/98.7%
*-rgt-identity98.7%
Simplified98.7%
Taylor expanded in t around 0 98.7%
Taylor expanded in Om around 0 59.8%
unpow259.8%
unpow259.8%
swap-sqr59.9%
unpow259.9%
times-frac76.4%
associate-*l/76.4%
associate-*l/76.3%
associate-/r/76.4%
associate-/r/76.4%
unpow276.4%
associate-/r/76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in t around inf 71.1%
Final simplification60.2%
(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 83.1%
sqrt-div83.0%
div-inv83.0%
add-sqr-sqrt83.1%
hypot-1-def83.1%
*-commutative83.1%
sqrt-prod83.0%
unpow283.0%
sqrt-prod57.1%
add-sqr-sqrt99.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
Simplified99.0%
Taylor expanded in t around 0 99.0%
Taylor expanded in Om around 0 66.0%
unpow266.0%
unpow266.0%
swap-sqr66.1%
unpow266.1%
times-frac82.0%
associate-*l/82.0%
associate-*l/82.0%
associate-/r/82.0%
associate-/r/82.0%
unpow282.0%
associate-/r/82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in t around 0 48.0%
Final simplification48.0%
herbie shell --seed 2023271
(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)))))))