
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t l) -5e+117)
(asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (/ (- l) (sqrt 2.0)) t)))
(if (<= (/ t l) 4e+42)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (* (/ (* l (sqrt 0.5)) t) (sqrt t_1)))))))t = abs(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) <= -5e+117) {
tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * ((-l / sqrt(2.0)) / t)));
} else if ((t / l) <= 4e+42) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin((((l * sqrt(0.5)) / t) * sqrt(t_1)));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t / l) <= (-5d+117)) then
tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * ((-l / sqrt(2.0d0)) / t)))
else if ((t / l) <= 4d+42) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin((((l * sqrt(0.5d0)) / t) * sqrt(t_1)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -5e+117) {
tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * ((-l / Math.sqrt(2.0)) / t)));
} else if ((t / l) <= 4e+42) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin((((l * Math.sqrt(0.5)) / t) * Math.sqrt(t_1)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t / l) <= -5e+117: tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * ((-l / math.sqrt(2.0)) / t))) elif (t / l) <= 4e+42: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin((((l * math.sqrt(0.5)) / t) * math.sqrt(t_1))) return tmp
t = abs(t) 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) <= -5e+117) tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(Float64(Float64(-l) / sqrt(2.0)) / t))); elseif (Float64(t / l) <= 4e+42) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(Float64(l * sqrt(0.5)) / t) * sqrt(t_1))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t / l) <= -5e+117) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * ((-l / sqrt(2.0)) / t))); elseif ((t / l) <= 4e+42) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin((((l * sqrt(0.5)) / t) * sqrt(t_1))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
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], -5e+117], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[((-l) / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e+42], N[ArcSin[N[Sqrt[N[(t$95$1 / 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[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+117}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{-\ell}{\sqrt{2}}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{+42}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{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} \cdot \sqrt{t_1}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4.99999999999999983e117Initial program 83.5%
sqrt-div83.4%
div-inv83.4%
add-sqr-sqrt83.4%
hypot-1-def83.4%
*-commutative83.4%
sqrt-prod83.4%
unpow283.4%
sqrt-prod0.0%
add-sqr-sqrt97.9%
Applied egg-rr97.9%
unpow297.9%
times-frac91.7%
unpow291.7%
unpow291.7%
associate-*r/91.7%
*-rgt-identity91.7%
unpow291.7%
unpow291.7%
times-frac97.9%
unpow297.9%
Simplified97.9%
Taylor expanded in t around -inf 93.6%
mul-1-neg93.6%
*-commutative93.6%
unpow293.6%
unpow293.6%
times-frac99.8%
unpow299.8%
associate-/r*99.7%
Simplified99.7%
if -4.99999999999999983e117 < (/.f64 t l) < 4.00000000000000018e42Initial program 98.1%
unpow298.1%
Applied egg-rr98.1%
unpow298.1%
clear-num98.1%
un-div-inv98.1%
Applied egg-rr98.1%
if 4.00000000000000018e42 < (/.f64 t l) Initial program 66.4%
Taylor expanded in t around inf 89.0%
div-inv87.2%
unpow287.2%
unpow287.2%
Applied egg-rr87.2%
un-div-inv89.0%
frac-times99.6%
clear-num99.6%
div-inv99.6%
Applied egg-rr99.6%
Final simplification98.6%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0)))));
}
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
}
t = abs(t) def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t / l) * math.sqrt(2.0)))))
t = abs(t) function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0))))) end
t = abs(t) function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0))))); end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 89.3%
sqrt-div89.3%
div-inv89.3%
add-sqr-sqrt89.3%
hypot-1-def89.3%
*-commutative89.3%
sqrt-prod89.3%
unpow289.3%
sqrt-prod60.3%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
unpow297.6%
times-frac89.5%
unpow289.5%
unpow289.5%
associate-*r/89.5%
*-rgt-identity89.5%
unpow289.5%
unpow289.5%
times-frac97.6%
unpow297.6%
Simplified97.6%
Final simplification97.6%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t l) -1e+166)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 4e+42)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (* (/ (* l (sqrt 0.5)) t) (sqrt t_1)))))))t = abs(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) <= -1e+166) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 4e+42) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin((((l * sqrt(0.5)) / t) * sqrt(t_1)));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t / l) <= (-1d+166)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 4d+42) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin((((l * sqrt(0.5d0)) / t) * sqrt(t_1)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t / l) <= -1e+166) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 4e+42) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin((((l * Math.sqrt(0.5)) / t) * Math.sqrt(t_1)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t / l) <= -1e+166: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 4e+42: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin((((l * math.sqrt(0.5)) / t) * math.sqrt(t_1))) return tmp
t = abs(t) 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) <= -1e+166) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 4e+42) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(Float64(l * sqrt(0.5)) / t) * sqrt(t_1))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t / l) <= -1e+166) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 4e+42) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin((((l * sqrt(0.5)) / t) * sqrt(t_1))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
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], -1e+166], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e+42], N[ArcSin[N[Sqrt[N[(t$95$1 / 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[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+166}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{+42}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{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} \cdot \sqrt{t_1}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -9.9999999999999994e165Initial program 82.8%
unpow282.8%
clear-num82.8%
clear-num82.8%
frac-times82.8%
metadata-eval82.8%
Applied egg-rr82.8%
Taylor expanded in Om around 0 82.8%
unpow282.8%
unpow282.8%
Simplified82.8%
Taylor expanded in t around -inf 99.1%
if -9.9999999999999994e165 < (/.f64 t l) < 4.00000000000000018e42Initial program 97.6%
unpow297.6%
Applied egg-rr97.6%
unpow297.6%
clear-num97.6%
un-div-inv97.6%
Applied egg-rr97.6%
if 4.00000000000000018e42 < (/.f64 t l) Initial program 66.4%
Taylor expanded in t around inf 89.0%
div-inv87.2%
unpow287.2%
unpow287.2%
Applied egg-rr87.2%
un-div-inv89.0%
frac-times99.6%
clear-num99.6%
div-inv99.6%
Applied egg-rr99.6%
Final simplification98.2%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (t_2 (sqrt t_1)))
(if (<= (/ t l) -5e+142)
(asin (* t_2 (* (/ (sqrt 0.5) t) (- l))))
(if (<= (/ t l) 4e+42)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (* (/ (* l (sqrt 0.5)) t) t_2))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double t_2 = sqrt(t_1);
double tmp;
if ((t / l) <= -5e+142) {
tmp = asin((t_2 * ((sqrt(0.5) / t) * -l)));
} else if ((t / l) <= 4e+42) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin((((l * sqrt(0.5)) / t) * t_2));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
t_2 = sqrt(t_1)
if ((t / l) <= (-5d+142)) then
tmp = asin((t_2 * ((sqrt(0.5d0) / t) * -l)))
else if ((t / l) <= 4d+42) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin((((l * sqrt(0.5d0)) / t) * t_2))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double t_2 = Math.sqrt(t_1);
double tmp;
if ((t / l) <= -5e+142) {
tmp = Math.asin((t_2 * ((Math.sqrt(0.5) / t) * -l)));
} else if ((t / l) <= 4e+42) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin((((l * Math.sqrt(0.5)) / t) * t_2));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) t_2 = math.sqrt(t_1) tmp = 0 if (t / l) <= -5e+142: tmp = math.asin((t_2 * ((math.sqrt(0.5) / t) * -l))) elif (t / l) <= 4e+42: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin((((l * math.sqrt(0.5)) / t) * t_2)) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) t_2 = sqrt(t_1) tmp = 0.0 if (Float64(t / l) <= -5e+142) tmp = asin(Float64(t_2 * Float64(Float64(sqrt(0.5) / t) * Float64(-l)))); elseif (Float64(t / l) <= 4e+42) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(Float64(l * sqrt(0.5)) / t) * t_2)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); t_2 = sqrt(t_1); tmp = 0.0; if ((t / l) <= -5e+142) tmp = asin((t_2 * ((sqrt(0.5) / t) * -l))); elseif ((t / l) <= 4e+42) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin((((l * sqrt(0.5)) / t) * t_2)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[t$95$1], $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -5e+142], N[ArcSin[N[(t$95$2 * N[(N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision] * (-l)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e+42], N[ArcSin[N[Sqrt[N[(t$95$1 / 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[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
t_2 := \sqrt{t_1}\\
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+142}:\\
\;\;\;\;\sin^{-1} \left(t_2 \cdot \left(\frac{\sqrt{0.5}}{t} \cdot \left(-\ell\right)\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{+42}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{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} \cdot t_2\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.0000000000000001e142Initial program 80.5%
unpow280.5%
clear-num80.5%
clear-num80.5%
frac-times80.5%
metadata-eval80.5%
Applied egg-rr80.5%
Taylor expanded in t around -inf 96.2%
mul-1-neg96.2%
associate-/l*94.1%
*-commutative94.1%
distribute-rgt-neg-in94.1%
unpow294.1%
unpow294.1%
times-frac97.8%
unpow297.8%
associate-/r/99.8%
Simplified99.8%
unpow280.5%
clear-num80.5%
un-div-inv80.5%
Applied egg-rr99.8%
if -5.0000000000000001e142 < (/.f64 t l) < 4.00000000000000018e42Initial program 98.2%
unpow298.2%
Applied egg-rr98.2%
unpow298.2%
clear-num98.2%
un-div-inv98.2%
Applied egg-rr98.2%
if 4.00000000000000018e42 < (/.f64 t l) Initial program 66.4%
Taylor expanded in t around inf 89.0%
div-inv87.2%
unpow287.2%
unpow287.2%
Applied egg-rr87.2%
un-div-inv89.0%
frac-times99.6%
clear-num99.6%
div-inv99.6%
Applied egg-rr99.6%
Final simplification98.7%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (let* ((t_1 (pow (/ t l) 2.0))) (if (<= t_1 5e-6) (asin (- 1.0 t_1)) (asin (/ (* l (sqrt 0.5)) t)))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = pow((t / l), 2.0);
double tmp;
if (t_1 <= 5e-6) {
tmp = asin((1.0 - t_1));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = (t / l) ** 2.0d0
if (t_1 <= 5d-6) then
tmp = asin((1.0d0 - t_1))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = Math.pow((t / l), 2.0);
double tmp;
if (t_1 <= 5e-6) {
tmp = Math.asin((1.0 - t_1));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = math.pow((t / l), 2.0) tmp = 0 if t_1 <= 5e-6: tmp = math.asin((1.0 - t_1)) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = Float64(t / l) ^ 2.0 tmp = 0.0 if (t_1 <= 5e-6) tmp = asin(Float64(1.0 - t_1)); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = (t / l) ^ 2.0; tmp = 0.0; if (t_1 <= 5e-6) tmp = asin((1.0 - t_1)); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$1, 5e-6], N[ArcSin[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{t}{\ell}\right)}^{2}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\sin^{-1} \left(1 - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (pow.f64 (/.f64 t l) 2) < 5.00000000000000041e-6Initial program 97.8%
unpow297.8%
clear-num97.8%
clear-num97.8%
frac-times97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Taylor expanded in Om around 0 82.8%
unpow282.8%
unpow282.8%
Simplified82.8%
Taylor expanded in t around 0 82.6%
mul-1-neg82.6%
unsub-neg82.6%
unpow282.6%
unpow282.6%
times-frac95.1%
unpow295.1%
Simplified95.1%
if 5.00000000000000041e-6 < (pow.f64 (/.f64 t l) 2) Initial program 79.3%
unpow279.3%
clear-num79.3%
clear-num79.2%
frac-times79.2%
metadata-eval79.2%
Applied egg-rr79.2%
Taylor expanded in Om around 0 54.9%
unpow254.9%
unpow254.9%
Simplified54.9%
Taylor expanded in t around inf 74.4%
Final simplification85.6%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+166)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 4e+42)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+166) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 4e+42) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-1d+166)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 4d+42) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+166) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 4e+42) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+166: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 4e+42: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+166) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 4e+42) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+166) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 4e+42) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+166], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e+42], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+166}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{+42}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -9.9999999999999994e165Initial program 82.8%
unpow282.8%
clear-num82.8%
clear-num82.8%
frac-times82.8%
metadata-eval82.8%
Applied egg-rr82.8%
Taylor expanded in Om around 0 82.8%
unpow282.8%
unpow282.8%
Simplified82.8%
Taylor expanded in t around -inf 99.1%
if -9.9999999999999994e165 < (/.f64 t l) < 4.00000000000000018e42Initial program 97.6%
unpow297.6%
Applied egg-rr97.6%
unpow297.6%
clear-num97.6%
un-div-inv97.6%
Applied egg-rr97.6%
if 4.00000000000000018e42 < (/.f64 t l) Initial program 66.4%
unpow266.4%
clear-num66.4%
clear-num66.3%
frac-times66.4%
metadata-eval66.4%
Applied egg-rr66.4%
Taylor expanded in Om around 0 45.6%
unpow245.6%
unpow245.6%
Simplified45.6%
Taylor expanded in t around inf 98.8%
Final simplification98.0%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+166)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 4e+42)
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+166) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 4e+42) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-1d+166)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 4d+42) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+166) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 4e+42) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+166: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 4e+42: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+166) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 4e+42) tmp = asin(sqrt(Float64(1.0 / 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
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+166) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 4e+42) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+166], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e+42], N[ArcSin[N[Sqrt[N[(1.0 / 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}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+166}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{+42}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{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) < -9.9999999999999994e165Initial program 82.8%
unpow282.8%
clear-num82.8%
clear-num82.8%
frac-times82.8%
metadata-eval82.8%
Applied egg-rr82.8%
Taylor expanded in Om around 0 82.8%
unpow282.8%
unpow282.8%
Simplified82.8%
Taylor expanded in t around -inf 99.1%
if -9.9999999999999994e165 < (/.f64 t l) < 4.00000000000000018e42Initial program 97.6%
unpow297.6%
clear-num97.6%
clear-num97.6%
frac-times97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Taylor expanded in Om around 0 76.1%
unpow276.1%
unpow276.1%
Simplified76.1%
frac-times95.6%
Applied egg-rr95.6%
if 4.00000000000000018e42 < (/.f64 t l) Initial program 66.4%
unpow266.4%
clear-num66.4%
clear-num66.3%
frac-times66.4%
metadata-eval66.4%
Applied egg-rr66.4%
Taylor expanded in Om around 0 45.6%
unpow245.6%
unpow245.6%
Simplified45.6%
Taylor expanded in t around inf 98.8%
Final simplification96.7%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 0.002)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 0.002) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-100.0d0)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 0.002d0) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.002) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 0.002: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 0.002) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 0.002) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.002], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.002:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 88.9%
unpow288.9%
clear-num88.9%
clear-num88.8%
frac-times88.8%
metadata-eval88.8%
Applied egg-rr88.8%
Taylor expanded in Om around 0 66.1%
unpow266.1%
unpow266.1%
Simplified66.1%
Taylor expanded in t around -inf 99.1%
if -100 < (/.f64 t l) < 2e-3Initial program 97.8%
Taylor expanded in t around 0 90.3%
unpow290.3%
unpow290.3%
times-frac96.7%
unpow296.7%
Simplified96.7%
unpow297.8%
clear-num97.8%
un-div-inv97.8%
Applied egg-rr96.7%
if 2e-3 < (/.f64 t l) Initial program 72.7%
unpow272.7%
clear-num72.7%
clear-num72.6%
frac-times72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Taylor expanded in Om around 0 47.2%
unpow247.2%
unpow247.2%
Simplified47.2%
Taylor expanded in t around inf 95.5%
Final simplification96.8%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 0.002)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.002) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-100.0d0)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.002d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.002) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.002: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 0.002) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.002) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.002], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.002:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 88.9%
unpow288.9%
clear-num88.9%
clear-num88.8%
frac-times88.8%
metadata-eval88.8%
Applied egg-rr88.8%
Taylor expanded in Om around 0 66.1%
unpow266.1%
unpow266.1%
Simplified66.1%
Taylor expanded in t around -inf 99.1%
mul-1-neg99.1%
associate-/l*97.7%
distribute-neg-frac97.7%
Simplified97.7%
if -100 < (/.f64 t l) < 2e-3Initial program 97.8%
unpow297.8%
clear-num97.8%
clear-num97.8%
frac-times97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Taylor expanded in Om around 0 82.8%
unpow282.8%
unpow282.8%
Simplified82.8%
Taylor expanded in t around 0 82.6%
mul-1-neg82.6%
unsub-neg82.6%
unpow282.6%
unpow282.6%
times-frac95.1%
unpow295.1%
Simplified95.1%
if 2e-3 < (/.f64 t l) Initial program 72.7%
unpow272.7%
clear-num72.7%
clear-num72.6%
frac-times72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Taylor expanded in Om around 0 47.2%
unpow247.2%
unpow247.2%
Simplified47.2%
Taylor expanded in t around inf 95.5%
Final simplification95.7%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 0.002)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 0.002) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-100.0d0)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 0.002d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.002) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 0.002: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 0.002) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 0.002) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.002], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.002:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 88.9%
unpow288.9%
clear-num88.9%
clear-num88.8%
frac-times88.8%
metadata-eval88.8%
Applied egg-rr88.8%
Taylor expanded in Om around 0 66.1%
unpow266.1%
unpow266.1%
Simplified66.1%
Taylor expanded in t around -inf 99.1%
if -100 < (/.f64 t l) < 2e-3Initial program 97.8%
unpow297.8%
clear-num97.8%
clear-num97.8%
frac-times97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Taylor expanded in Om around 0 82.8%
unpow282.8%
unpow282.8%
Simplified82.8%
Taylor expanded in t around 0 82.6%
mul-1-neg82.6%
unsub-neg82.6%
unpow282.6%
unpow282.6%
times-frac95.1%
unpow295.1%
Simplified95.1%
if 2e-3 < (/.f64 t l) Initial program 72.7%
unpow272.7%
clear-num72.7%
clear-num72.6%
frac-times72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Taylor expanded in Om around 0 47.2%
unpow247.2%
unpow247.2%
Simplified47.2%
Taylor expanded in t around inf 95.5%
Final simplification95.9%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (or (<= (/ t l) -2e+211) (not (<= (/ t l) 0.002))) (asin (/ (sqrt 0.5) (/ t l))) (asin 1.0)))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if (((t / l) <= -2e+211) || !((t / l) <= 0.002)) {
tmp = asin((sqrt(0.5) / (t / l)));
} else {
tmp = asin(1.0);
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (((t / l) <= (-2d+211)) .or. (.not. ((t / l) <= 0.002d0))) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (((t / l) <= -2e+211) || !((t / l) <= 0.002)) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if ((t / l) <= -2e+211) or not ((t / l) <= 0.002): tmp = math.asin((math.sqrt(0.5) / (t / l))) else: tmp = math.asin(1.0) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if ((Float64(t / l) <= -2e+211) || !(Float64(t / l) <= 0.002)) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); else tmp = asin(1.0); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (((t / l) <= -2e+211) || ~(((t / l) <= 0.002))) tmp = asin((sqrt(0.5) / (t / l))); else tmp = asin(1.0); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[Or[LessEqual[N[(t / l), $MachinePrecision], -2e+211], N[Not[LessEqual[N[(t / l), $MachinePrecision], 0.002]], $MachinePrecision]], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+211} \lor \neg \left(\frac{t}{\ell} \leq 0.002\right):\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if (/.f64 t l) < -1.9999999999999999e211 or 2e-3 < (/.f64 t l) Initial program 76.1%
unpow276.1%
clear-num76.1%
clear-num76.1%
frac-times76.1%
metadata-eval76.1%
Applied egg-rr76.1%
Taylor expanded in Om around 0 57.2%
unpow257.2%
unpow257.2%
Simplified57.2%
Taylor expanded in t around inf 93.0%
associate-/l*91.0%
Simplified91.0%
if -1.9999999999999999e211 < (/.f64 t l) < 2e-3Initial program 96.9%
unpow296.9%
clear-num96.9%
clear-num96.9%
frac-times96.9%
metadata-eval96.9%
Applied egg-rr96.9%
Taylor expanded in Om around 0 77.4%
unpow277.4%
unpow277.4%
Simplified77.4%
Taylor expanded in t around 0 81.3%
Final simplification84.8%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -2e+211) (asin (/ (sqrt 0.5) (/ t l))) (if (<= (/ t l) 0.002) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t)))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+211) {
tmp = asin((sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.002) {
tmp = asin(1.0);
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-2d+211)) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.002d0) then
tmp = asin(1.0d0)
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+211) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.002) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+211: tmp = math.asin((math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.002: tmp = math.asin(1.0) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+211) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); elseif (Float64(t / l) <= 0.002) tmp = asin(1.0); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+211) tmp = asin((sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.002) tmp = asin(1.0); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+211], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.002], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+211}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.002:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.9999999999999999e211Initial program 86.0%
unpow286.0%
clear-num86.0%
clear-num86.0%
frac-times86.0%
metadata-eval86.0%
Applied egg-rr86.0%
Taylor expanded in Om around 0 86.0%
unpow286.0%
unpow286.0%
Simplified86.0%
Taylor expanded in t around inf 85.7%
associate-/l*85.8%
Simplified85.8%
if -1.9999999999999999e211 < (/.f64 t l) < 2e-3Initial program 96.9%
unpow296.9%
clear-num96.9%
clear-num96.9%
frac-times96.9%
metadata-eval96.9%
Applied egg-rr96.9%
Taylor expanded in Om around 0 77.4%
unpow277.4%
unpow277.4%
Simplified77.4%
Taylor expanded in t around 0 81.3%
if 2e-3 < (/.f64 t l) Initial program 72.7%
unpow272.7%
clear-num72.7%
clear-num72.6%
frac-times72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Taylor expanded in Om around 0 47.2%
unpow247.2%
unpow247.2%
Simplified47.2%
Taylor expanded in t around inf 95.5%
Final simplification85.5%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (asin 1.0))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
return asin(1.0);
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(1.0d0)
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(1.0);
}
t = abs(t) def code(t, l, Om, Omc): return math.asin(1.0)
t = abs(t) function code(t, l, Om, Omc) return asin(1.0) end
t = abs(t) function tmp = code(t, l, Om, Omc) tmp = asin(1.0); end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} 1
\end{array}
Initial program 89.3%
unpow289.3%
clear-num89.3%
clear-num89.3%
frac-times89.3%
metadata-eval89.3%
Applied egg-rr89.3%
Taylor expanded in Om around 0 70.1%
unpow270.1%
unpow270.1%
Simplified70.1%
Taylor expanded in t around 0 53.5%
Final simplification53.5%
herbie shell --seed 2023200
(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)))))))