
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -3.9e+103)
(asin (/ (* (sqrt 0.5) (- l)) t))
(if (<= (/ t l) 10000000000.0)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (* (/ t l) (* t (/ 1.0 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) <= -3.9e+103) {
tmp = asin(((sqrt(0.5) * -l) / t));
} else if ((t / l) <= 10000000000.0) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t * (1.0 / 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) <= (-3.9d+103)) then
tmp = asin(((sqrt(0.5d0) * -l) / t))
else if ((t / l) <= 10000000000.0d0) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t / l) * (t * (1.0d0 / 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) <= -3.9e+103) {
tmp = Math.asin(((Math.sqrt(0.5) * -l) / t));
} else if ((t / l) <= 10000000000.0) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t * (1.0 / 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) <= -3.9e+103: tmp = math.asin(((math.sqrt(0.5) * -l) / t)) elif (t / l) <= 10000000000.0: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t * (1.0 / 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) <= -3.9e+103) tmp = asin(Float64(Float64(sqrt(0.5) * Float64(-l)) / t)); elseif (Float64(t / l) <= 10000000000.0) 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 * Float64(1.0 / 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) <= -3.9e+103) tmp = asin(((sqrt(0.5) * -l) / t)); elseif ((t / l) <= 10000000000.0) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) * (t * (1.0 / 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], -3.9e+103], N[ArcSin[N[(N[(N[Sqrt[0.5], $MachinePrecision] * (-l)), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 10000000000.0], 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 * N[(1.0 / l), $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}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -3.9 \cdot 10^{+103}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5} \cdot \left(-\ell\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10000000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \left(t \cdot \frac{1}{\ell}\right)\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -3.8999999999999998e103Initial program 57.3%
Taylor expanded in Om around 0 42.4%
unpow242.4%
unpow242.4%
Simplified42.4%
Taylor expanded in t around -inf 99.8%
if -3.8999999999999998e103 < (/.f64 t l) < 1e10Initial program 97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
div-inv97.7%
div-inv97.7%
times-frac97.7%
Applied egg-rr97.7%
associate-/r/97.7%
Simplified97.7%
if 1e10 < (/.f64 t l) Initial program 64.1%
Taylor expanded in Om around 0 41.8%
unpow241.8%
unpow241.8%
Simplified41.8%
Taylor expanded in t around inf 99.5%
Final simplification98.5%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -3.9e+103)
(asin (/ (* (sqrt 0.5) (- l)) t))
(if (<= (/ t l) 10000000000.0)
(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) <= -3.9e+103) {
tmp = asin(((sqrt(0.5) * -l) / t));
} else if ((t / l) <= 10000000000.0) {
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) <= (-3.9d+103)) then
tmp = asin(((sqrt(0.5d0) * -l) / t))
else if ((t / l) <= 10000000000.0d0) 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) <= -3.9e+103) {
tmp = Math.asin(((Math.sqrt(0.5) * -l) / t));
} else if ((t / l) <= 10000000000.0) {
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) <= -3.9e+103: tmp = math.asin(((math.sqrt(0.5) * -l) / t)) elif (t / l) <= 10000000000.0: 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) <= -3.9e+103) tmp = asin(Float64(Float64(sqrt(0.5) * Float64(-l)) / t)); elseif (Float64(t / l) <= 10000000000.0) 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) <= -3.9e+103) tmp = asin(((sqrt(0.5) * -l) / t)); elseif ((t / l) <= 10000000000.0) 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], -3.9e+103], N[ArcSin[N[(N[(N[Sqrt[0.5], $MachinePrecision] * (-l)), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 10000000000.0], 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 -3.9 \cdot 10^{+103}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5} \cdot \left(-\ell\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10000000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -3.8999999999999998e103Initial program 57.3%
Taylor expanded in Om around 0 42.4%
unpow242.4%
unpow242.4%
Simplified42.4%
Taylor expanded in t around -inf 99.8%
if -3.8999999999999998e103 < (/.f64 t l) < 1e10Initial program 97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.7%
unpow297.7%
Applied egg-rr97.7%
if 1e10 < (/.f64 t l) Initial program 64.1%
Taylor expanded in Om around 0 41.8%
unpow241.8%
unpow241.8%
Simplified41.8%
Taylor expanded in t around inf 99.5%
Final simplification98.5%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -4e+74)
(asin (/ (* (sqrt 0.5) (- l)) t))
(if (<= (/ t l) 10000000000.0)
(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) <= -4e+74) {
tmp = asin(((sqrt(0.5) * -l) / t));
} else if ((t / l) <= 10000000000.0) {
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) <= (-4d+74)) then
tmp = asin(((sqrt(0.5d0) * -l) / t))
else if ((t / l) <= 10000000000.0d0) 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) <= -4e+74) {
tmp = Math.asin(((Math.sqrt(0.5) * -l) / t));
} else if ((t / l) <= 10000000000.0) {
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) <= -4e+74: tmp = math.asin(((math.sqrt(0.5) * -l) / t)) elif (t / l) <= 10000000000.0: 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) <= -4e+74) tmp = asin(Float64(Float64(sqrt(0.5) * Float64(-l)) / t)); elseif (Float64(t / l) <= 10000000000.0) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / Float64(l / 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) <= -4e+74) tmp = asin(((sqrt(0.5) * -l) / t)); elseif ((t / l) <= 10000000000.0) 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], -4e+74], N[ArcSin[N[(N[(N[Sqrt[0.5], $MachinePrecision] * (-l)), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 10000000000.0], 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 / N[(l / t), $MachinePrecision]), $MachinePrecision] / l), $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 -4 \cdot 10^{+74}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5} \cdot \left(-\ell\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10000000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{\frac{t}{\frac{\ell}{t}}}{\ell}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -3.99999999999999981e74Initial program 60.2%
Taylor expanded in Om around 0 39.6%
unpow239.6%
unpow239.6%
Simplified39.6%
Taylor expanded in t around -inf 99.7%
if -3.99999999999999981e74 < (/.f64 t l) < 1e10Initial program 97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.7%
unpow297.7%
associate-*l/97.7%
clear-num97.7%
div-inv97.7%
Applied egg-rr97.7%
if 1e10 < (/.f64 t l) Initial program 64.1%
Taylor expanded in Om around 0 41.8%
unpow241.8%
unpow241.8%
Simplified41.8%
Taylor expanded in t around inf 99.5%
Final simplification98.5%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (asin (* (sqrt 0.5) (/ (- l) t)))))
(if (<= l -4.8e+40)
(asin 1.0)
(if (<= l -80000000000.0)
t_1
(if (<= l -2.2e-56)
(asin 1.0)
(if (<= l -1e-310)
t_1
(if (<= l 8.5e+43) (asin (/ (* l (sqrt 0.5)) t)) (asin 1.0))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = asin((sqrt(0.5) * (-l / t)));
double tmp;
if (l <= -4.8e+40) {
tmp = asin(1.0);
} else if (l <= -80000000000.0) {
tmp = t_1;
} else if (l <= -2.2e-56) {
tmp = asin(1.0);
} else if (l <= -1e-310) {
tmp = t_1;
} else if (l <= 8.5e+43) {
tmp = asin(((l * sqrt(0.5)) / t));
} 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) :: t_1
real(8) :: tmp
t_1 = asin((sqrt(0.5d0) * (-l / t)))
if (l <= (-4.8d+40)) then
tmp = asin(1.0d0)
else if (l <= (-80000000000.0d0)) then
tmp = t_1
else if (l <= (-2.2d-56)) then
tmp = asin(1.0d0)
else if (l <= (-1d-310)) then
tmp = t_1
else if (l <= 8.5d+43) then
tmp = asin(((l * sqrt(0.5d0)) / t))
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 t_1 = Math.asin((Math.sqrt(0.5) * (-l / t)));
double tmp;
if (l <= -4.8e+40) {
tmp = Math.asin(1.0);
} else if (l <= -80000000000.0) {
tmp = t_1;
} else if (l <= -2.2e-56) {
tmp = Math.asin(1.0);
} else if (l <= -1e-310) {
tmp = t_1;
} else if (l <= 8.5e+43) {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = math.asin((math.sqrt(0.5) * (-l / t))) tmp = 0 if l <= -4.8e+40: tmp = math.asin(1.0) elif l <= -80000000000.0: tmp = t_1 elif l <= -2.2e-56: tmp = math.asin(1.0) elif l <= -1e-310: tmp = t_1 elif l <= 8.5e+43: tmp = math.asin(((l * math.sqrt(0.5)) / t)) else: tmp = math.asin(1.0) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = asin(Float64(sqrt(0.5) * Float64(Float64(-l) / t))) tmp = 0.0 if (l <= -4.8e+40) tmp = asin(1.0); elseif (l <= -80000000000.0) tmp = t_1; elseif (l <= -2.2e-56) tmp = asin(1.0); elseif (l <= -1e-310) tmp = t_1; elseif (l <= 8.5e+43) tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); else tmp = asin(1.0); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = asin((sqrt(0.5) * (-l / t))); tmp = 0.0; if (l <= -4.8e+40) tmp = asin(1.0); elseif (l <= -80000000000.0) tmp = t_1; elseif (l <= -2.2e-56) tmp = asin(1.0); elseif (l <= -1e-310) tmp = t_1; elseif (l <= 8.5e+43) tmp = asin(((l * sqrt(0.5)) / t)); else tmp = asin(1.0); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[((-l) / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -4.8e+40], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, -80000000000.0], t$95$1, If[LessEqual[l, -2.2e-56], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, -1e-310], t$95$1, If[LessEqual[l, 8.5e+43], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := \sin^{-1} \left(\sqrt{0.5} \cdot \frac{-\ell}{t}\right)\\
\mathbf{if}\;\ell \leq -4.8 \cdot 10^{+40}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq -80000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq -2.2 \cdot 10^{-56}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 8.5 \cdot 10^{+43}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -4.8e40 or -8e10 < l < -2.20000000000000004e-56 or 8.5e43 < l Initial program 95.3%
Taylor expanded in Om around 0 78.9%
unpow278.9%
unpow278.9%
Simplified78.9%
Taylor expanded in t around 0 79.5%
if -4.8e40 < l < -8e10 or -2.20000000000000004e-56 < l < -9.999999999999969e-311Initial program 75.4%
Taylor expanded in Om around 0 55.5%
unpow255.5%
unpow255.5%
Simplified55.5%
Taylor expanded in t around -inf 49.6%
mul-1-neg49.6%
associate-/l*49.6%
distribute-frac-neg49.6%
associate-/r/49.5%
distribute-neg-frac49.5%
*-commutative49.5%
distribute-neg-frac49.5%
Simplified49.5%
if -9.999999999999969e-311 < l < 8.5e43Initial program 66.9%
Taylor expanded in Om around 0 52.9%
unpow252.9%
unpow252.9%
Simplified52.9%
Taylor expanded in t around inf 40.9%
Final simplification61.9%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= l -9.5e+39)
(asin 1.0)
(if (<= l -1150000000.0)
(asin (* (sqrt 0.5) (/ (- l) t)))
(if (<= l -1.46e-55)
(asin 1.0)
(if (<= l -1e-310)
(asin (/ (* (sqrt 0.5) (- l)) t))
(if (<= l 4.5e+43) (asin (/ (* l (sqrt 0.5)) t)) (asin 1.0)))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -9.5e+39) {
tmp = asin(1.0);
} else if (l <= -1150000000.0) {
tmp = asin((sqrt(0.5) * (-l / t)));
} else if (l <= -1.46e-55) {
tmp = asin(1.0);
} else if (l <= -1e-310) {
tmp = asin(((sqrt(0.5) * -l) / t));
} else if (l <= 4.5e+43) {
tmp = asin(((l * sqrt(0.5)) / t));
} 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 (l <= (-9.5d+39)) then
tmp = asin(1.0d0)
else if (l <= (-1150000000.0d0)) then
tmp = asin((sqrt(0.5d0) * (-l / t)))
else if (l <= (-1.46d-55)) then
tmp = asin(1.0d0)
else if (l <= (-1d-310)) then
tmp = asin(((sqrt(0.5d0) * -l) / t))
else if (l <= 4.5d+43) then
tmp = asin(((l * sqrt(0.5d0)) / t))
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 (l <= -9.5e+39) {
tmp = Math.asin(1.0);
} else if (l <= -1150000000.0) {
tmp = Math.asin((Math.sqrt(0.5) * (-l / t)));
} else if (l <= -1.46e-55) {
tmp = Math.asin(1.0);
} else if (l <= -1e-310) {
tmp = Math.asin(((Math.sqrt(0.5) * -l) / t));
} else if (l <= 4.5e+43) {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if l <= -9.5e+39: tmp = math.asin(1.0) elif l <= -1150000000.0: tmp = math.asin((math.sqrt(0.5) * (-l / t))) elif l <= -1.46e-55: tmp = math.asin(1.0) elif l <= -1e-310: tmp = math.asin(((math.sqrt(0.5) * -l) / t)) elif l <= 4.5e+43: tmp = math.asin(((l * math.sqrt(0.5)) / t)) else: tmp = math.asin(1.0) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (l <= -9.5e+39) tmp = asin(1.0); elseif (l <= -1150000000.0) tmp = asin(Float64(sqrt(0.5) * Float64(Float64(-l) / t))); elseif (l <= -1.46e-55) tmp = asin(1.0); elseif (l <= -1e-310) tmp = asin(Float64(Float64(sqrt(0.5) * Float64(-l)) / t)); elseif (l <= 4.5e+43) tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); else tmp = asin(1.0); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (l <= -9.5e+39) tmp = asin(1.0); elseif (l <= -1150000000.0) tmp = asin((sqrt(0.5) * (-l / t))); elseif (l <= -1.46e-55) tmp = asin(1.0); elseif (l <= -1e-310) tmp = asin(((sqrt(0.5) * -l) / t)); elseif (l <= 4.5e+43) tmp = asin(((l * sqrt(0.5)) / t)); 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[LessEqual[l, -9.5e+39], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, -1150000000.0], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[((-l) / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -1.46e-55], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, -1e-310], N[ArcSin[N[(N[(N[Sqrt[0.5], $MachinePrecision] * (-l)), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 4.5e+43], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -9.5 \cdot 10^{+39}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq -1150000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{-\ell}{t}\right)\\
\mathbf{elif}\;\ell \leq -1.46 \cdot 10^{-55}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5} \cdot \left(-\ell\right)}{t}\right)\\
\mathbf{elif}\;\ell \leq 4.5 \cdot 10^{+43}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -9.50000000000000011e39 or -1.15e9 < l < -1.46000000000000009e-55 or 4.5e43 < l Initial program 95.3%
Taylor expanded in Om around 0 78.9%
unpow278.9%
unpow278.9%
Simplified78.9%
Taylor expanded in t around 0 79.5%
if -9.50000000000000011e39 < l < -1.15e9Initial program 46.6%
Taylor expanded in Om around 0 32.9%
unpow232.9%
unpow232.9%
Simplified32.9%
Taylor expanded in t around -inf 44.7%
mul-1-neg44.7%
associate-/l*44.7%
distribute-frac-neg44.7%
associate-/r/44.5%
distribute-neg-frac44.5%
*-commutative44.5%
distribute-neg-frac44.5%
Simplified44.5%
if -1.46000000000000009e-55 < l < -9.999999999999969e-311Initial program 79.5%
Taylor expanded in Om around 0 58.7%
unpow258.7%
unpow258.7%
Simplified58.7%
Taylor expanded in t around -inf 50.3%
if -9.999999999999969e-311 < l < 4.5e43Initial program 66.9%
Taylor expanded in Om around 0 52.9%
unpow252.9%
unpow252.9%
Simplified52.9%
Taylor expanded in t around inf 40.9%
Final simplification62.0%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -20000.0)
(asin (/ (* (sqrt 0.5) (- l)) t))
(if (<= (/ t l) 2e-6)
(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) <= -20000.0) {
tmp = asin(((sqrt(0.5) * -l) / t));
} else if ((t / l) <= 2e-6) {
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) <= (-20000.0d0)) then
tmp = asin(((sqrt(0.5d0) * -l) / t))
else if ((t / l) <= 2d-6) 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) <= -20000.0) {
tmp = Math.asin(((Math.sqrt(0.5) * -l) / t));
} else if ((t / l) <= 2e-6) {
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) <= -20000.0: tmp = math.asin(((math.sqrt(0.5) * -l) / t)) elif (t / l) <= 2e-6: 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) <= -20000.0) tmp = asin(Float64(Float64(sqrt(0.5) * Float64(-l)) / t)); elseif (Float64(t / l) <= 2e-6) 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) <= -20000.0) tmp = asin(((sqrt(0.5) * -l) / t)); elseif ((t / l) <= 2e-6) 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], -20000.0], N[ArcSin[N[(N[(N[Sqrt[0.5], $MachinePrecision] * (-l)), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e-6], 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 -20000:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5} \cdot \left(-\ell\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{-6}:\\
\;\;\;\;\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) < -2e4Initial program 67.3%
Taylor expanded in Om around 0 43.6%
unpow243.6%
unpow243.6%
Simplified43.6%
Taylor expanded in t around -inf 98.9%
if -2e4 < (/.f64 t l) < 1.99999999999999991e-6Initial program 97.6%
Taylor expanded in Om around 0 87.4%
unpow287.4%
unpow287.4%
Simplified87.4%
Taylor expanded in t around 0 87.4%
mul-1-neg87.4%
unpow287.4%
unpow287.4%
times-frac94.8%
unpow294.8%
Simplified94.8%
if 1.99999999999999991e-6 < (/.f64 t l) Initial program 65.1%
Taylor expanded in Om around 0 42.2%
unpow242.2%
unpow242.2%
Simplified42.2%
Taylor expanded in t around inf 97.3%
Final simplification96.4%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (<= t 4.5e+129) (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 <= 4.5e+129) {
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 <= 4.5d+129) 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 <= 4.5e+129) {
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 <= 4.5e+129: 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 (t <= 4.5e+129) tmp = asin(1.0); else tmp = asin(Float64(l * Float64(sqrt(0.5) / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= 4.5e+129) 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[t, 4.5e+129], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.5 \cdot 10^{+129}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if t < 4.5000000000000001e129Initial program 84.1%
Taylor expanded in Om around 0 68.5%
unpow268.5%
unpow268.5%
Simplified68.5%
Taylor expanded in t around 0 58.5%
if 4.5000000000000001e129 < t Initial program 74.3%
Taylor expanded in Om around 0 51.6%
unpow251.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around inf 66.2%
associate-*r/66.2%
Simplified66.2%
Final simplification59.4%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (<= t 5.2e+128) (asin 1.0) (asin (* (sqrt 0.5) (/ l t)))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 5.2e+128) {
tmp = asin(1.0);
} else {
tmp = asin((sqrt(0.5) * (l / 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 <= 5.2d+128) then
tmp = asin(1.0d0)
else
tmp = asin((sqrt(0.5d0) * (l / 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 <= 5.2e+128) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if t <= 5.2e+128: tmp = math.asin(1.0) else: tmp = math.asin((math.sqrt(0.5) * (l / t))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (t <= 5.2e+128) tmp = asin(1.0); else tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= 5.2e+128) tmp = asin(1.0); else tmp = asin((sqrt(0.5) * (l / t))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[t, 5.2e+128], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.2 \cdot 10^{+128}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if t < 5.2e128Initial program 84.1%
Taylor expanded in Om around 0 68.5%
unpow268.5%
unpow268.5%
Simplified68.5%
Taylor expanded in t around 0 58.5%
if 5.2e128 < t Initial program 74.3%
Taylor expanded in Om around 0 51.6%
unpow251.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around inf 50.8%
unpow250.8%
unpow250.8%
times-frac66.0%
Simplified66.0%
*-commutative66.0%
sqrt-prod65.8%
pow265.8%
sqrt-pow166.1%
metadata-eval66.1%
metadata-eval66.1%
pow-flip64.9%
inv-pow64.9%
remove-double-div66.1%
Applied egg-rr66.1%
Final simplification59.4%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (<= t 1.48e+130) (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 <= 1.48e+130) {
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 <= 1.48d+130) 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 <= 1.48e+130) {
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 <= 1.48e+130: 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 (t <= 1.48e+130) 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 <= 1.48e+130) 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[t, 1.48e+130], 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}\;t \leq 1.48 \cdot 10^{+130}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if t < 1.47999999999999991e130Initial program 84.1%
Taylor expanded in Om around 0 68.5%
unpow268.5%
unpow268.5%
Simplified68.5%
Taylor expanded in t around 0 58.5%
if 1.47999999999999991e130 < t Initial program 74.3%
Taylor expanded in Om around 0 51.6%
unpow251.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around inf 66.2%
Final simplification59.4%
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 82.9%
Taylor expanded in Om around 0 66.4%
unpow266.4%
unpow266.4%
Simplified66.4%
Taylor expanded in t around 0 52.3%
Final simplification52.3%
herbie shell --seed 2023297
(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)))))))