
(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 11 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}
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(if (<= (/ t_m l) -1e+146)
(asin
(* (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (* (/ l t_m) (- (sqrt 0.5)))))
(if (<= (/ t_m l) 1e+134)
(asin
(sqrt
(/
(- 1.0 (pow (/ Om Omc) 2.0))
(+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
(asin (* (hypot 1.0 (/ Om Omc)) (/ l (* t_m (pow 0.5 -0.5))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double tmp;
if ((t_m / l) <= -1e+146) {
tmp = asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * ((l / t_m) * -sqrt(0.5))));
} else if ((t_m / l) <= 1e+134) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = asin((hypot(1.0, (Om / Omc)) * (l / (t_m * pow(0.5, -0.5)))));
}
return tmp;
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double tmp;
if ((t_m / l) <= -1e+146) {
tmp = Math.asin((Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * ((l / t_m) * -Math.sqrt(0.5))));
} else if ((t_m / l) <= 1e+134) {
tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = Math.asin((Math.hypot(1.0, (Om / Omc)) * (l / (t_m * Math.pow(0.5, -0.5)))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): tmp = 0 if (t_m / l) <= -1e+146: tmp = math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * ((l / t_m) * -math.sqrt(0.5)))) elif (t_m / l) <= 1e+134: tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))) else: tmp = math.asin((math.hypot(1.0, (Om / Omc)) * (l / (t_m * math.pow(0.5, -0.5))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) tmp = 0.0 if (Float64(t_m / l) <= -1e+146) tmp = asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) * Float64(Float64(l / t_m) * Float64(-sqrt(0.5))))); elseif (Float64(t_m / l) <= 1e+134) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m))))))); else tmp = asin(Float64(hypot(1.0, Float64(Om / Omc)) * Float64(l / Float64(t_m * (0.5 ^ -0.5))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) tmp = 0.0; if ((t_m / l) <= -1e+146) tmp = asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * ((l / t_m) * -sqrt(0.5)))); elseif ((t_m / l) <= 1e+134) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))); else tmp = asin((hypot(1.0, (Om / Omc)) * (l / (t_m * (0.5 ^ -0.5))))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l), $MachinePrecision], -1e+146], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 1e+134], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[1.0 ^ 2 + N[(Om / Omc), $MachinePrecision] ^ 2], $MachinePrecision] * N[(l / N[(t$95$m * N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{\ell} \leq -1 \cdot 10^{+146}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}} \cdot \left(\frac{\ell}{t\_m} \cdot \left(-\sqrt{0.5}\right)\right)\right)\\
\mathbf{elif}\;\frac{t\_m}{\ell} \leq 10^{+134}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \frac{\frac{t\_m}{\ell}}{\frac{\ell}{t\_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\mathsf{hypot}\left(1, \frac{Om}{Omc}\right) \cdot \frac{\ell}{t\_m \cdot {0.5}^{-0.5}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -9.99999999999999934e145Initial program 52.6%
Taylor expanded in t around -inf 88.0%
mul-1-neg88.0%
*-commutative88.0%
distribute-rgt-neg-in88.0%
unpow288.0%
unpow288.0%
times-frac99.6%
unpow299.6%
associate-/l*99.6%
associate-/r/99.6%
Simplified99.6%
unpow299.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if -9.99999999999999934e145 < (/.f64 t l) < 9.99999999999999921e133Initial program 98.0%
unpow298.0%
clear-num98.0%
un-div-inv98.1%
Applied egg-rr98.1%
if 9.99999999999999921e133 < (/.f64 t l) Initial program 50.6%
Taylor expanded in t around -inf 33.7%
mul-1-neg33.7%
*-commutative33.7%
distribute-rgt-neg-in33.7%
unpow233.7%
unpow233.7%
times-frac36.7%
unpow236.7%
associate-/l*36.7%
associate-/r/36.7%
Simplified36.7%
expm1-log1p-u36.7%
expm1-udef37.8%
Applied egg-rr37.8%
expm1-def99.5%
expm1-log1p99.5%
*-commutative99.5%
associate-/l*99.6%
Simplified99.6%
div-inv99.5%
pow1/299.5%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Final simplification98.5%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t_m l) (sqrt 2.0))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t_m / l) * sqrt(2.0)))));
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((t_m / l) * Math.sqrt(2.0)))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t_m / l) * math.sqrt(2.0)))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t_m / l) * sqrt(2.0))))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t_m / l) * sqrt(2.0))))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, 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$95$m / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t\_m}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 83.5%
sqrt-div83.5%
div-inv83.5%
add-sqr-sqrt83.5%
hypot-1-def83.5%
*-commutative83.5%
sqrt-prod83.5%
unpow283.5%
sqrt-prod53.0%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
associate-*r/98.2%
*-rgt-identity98.2%
Simplified98.2%
Final simplification98.2%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (/ (hypot 1.0 (/ Om Omc)) (hypot 1.0 (* (/ t_m l) (sqrt 2.0))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin((hypot(1.0, (Om / Omc)) / hypot(1.0, ((t_m / l) * sqrt(2.0)))));
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin((Math.hypot(1.0, (Om / Omc)) / Math.hypot(1.0, ((t_m / l) * Math.sqrt(2.0)))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin((math.hypot(1.0, (Om / Omc)) / math.hypot(1.0, ((t_m / l) * math.sqrt(2.0)))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(Float64(hypot(1.0, Float64(Om / Omc)) / hypot(1.0, Float64(Float64(t_m / l) * sqrt(2.0))))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin((hypot(1.0, (Om / Omc)) / hypot(1.0, ((t_m / l) * sqrt(2.0))))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[1.0 ^ 2 + N[(Om / Omc), $MachinePrecision] ^ 2], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t$95$m / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\frac{\mathsf{hypot}\left(1, \frac{Om}{Omc}\right)}{\mathsf{hypot}\left(1, \frac{t\_m}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 83.5%
unpow283.5%
div-inv83.6%
associate-*l*80.6%
Applied egg-rr80.6%
Applied egg-rr97.0%
Final simplification97.0%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t_m l) -2e+143)
(asin (* (sqrt t_1) (* (/ l t_m) (- (sqrt 0.5)))))
(if (<= (/ t_m l) 5e+149)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ 1.0 (* (/ l t_m) (/ l t_m))))))))
(asin (* (hypot 1.0 (/ Om Omc)) (/ l (* t_m (pow 0.5 -0.5)))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l) <= -2e+143) {
tmp = asin((sqrt(t_1) * ((l / t_m) * -sqrt(0.5))));
} else if ((t_m / l) <= 5e+149) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))));
} else {
tmp = asin((hypot(1.0, (Om / Omc)) * (l / (t_m * pow(0.5, -0.5)))));
}
return tmp;
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l) <= -2e+143) {
tmp = Math.asin((Math.sqrt(t_1) * ((l / t_m) * -Math.sqrt(0.5))));
} else if ((t_m / l) <= 5e+149) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))));
} else {
tmp = Math.asin((Math.hypot(1.0, (Om / Omc)) * (l / (t_m * Math.pow(0.5, -0.5)))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t_m / l) <= -2e+143: tmp = math.asin((math.sqrt(t_1) * ((l / t_m) * -math.sqrt(0.5)))) elif (t_m / l) <= 5e+149: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m)))))))) else: tmp = math.asin((math.hypot(1.0, (Om / Omc)) * (l / (t_m * math.pow(0.5, -0.5))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t_m / l) <= -2e+143) tmp = asin(Float64(sqrt(t_1) * Float64(Float64(l / t_m) * Float64(-sqrt(0.5))))); elseif (Float64(t_m / l) <= 5e+149) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(1.0 / Float64(Float64(l / t_m) * Float64(l / t_m)))))))); else tmp = asin(Float64(hypot(1.0, Float64(Om / Omc)) * Float64(l / Float64(t_m * (0.5 ^ -0.5))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t_m / l) <= -2e+143) tmp = asin((sqrt(t_1) * ((l / t_m) * -sqrt(0.5)))); elseif ((t_m / l) <= 5e+149) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m)))))))); else tmp = asin((hypot(1.0, (Om / Omc)) * (l / (t_m * (0.5 ^ -0.5))))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, 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$95$m / l), $MachinePrecision], -2e+143], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 5e+149], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(1.0 / N[(N[(l / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[1.0 ^ 2 + N[(Om / Omc), $MachinePrecision] ^ 2], $MachinePrecision] * N[(l / N[(t$95$m * N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t\_m}{\ell} \leq -2 \cdot 10^{+143}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t\_1} \cdot \left(\frac{\ell}{t\_m} \cdot \left(-\sqrt{0.5}\right)\right)\right)\\
\mathbf{elif}\;\frac{t\_m}{\ell} \leq 5 \cdot 10^{+149}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t\_1}{1 + 2 \cdot \frac{1}{\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\mathsf{hypot}\left(1, \frac{Om}{Omc}\right) \cdot \frac{\ell}{t\_m \cdot {0.5}^{-0.5}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2e143Initial program 52.6%
Taylor expanded in t around -inf 88.0%
mul-1-neg88.0%
*-commutative88.0%
distribute-rgt-neg-in88.0%
unpow288.0%
unpow288.0%
times-frac99.6%
unpow299.6%
associate-/l*99.6%
associate-/r/99.6%
Simplified99.6%
unpow299.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if -2e143 < (/.f64 t l) < 4.9999999999999999e149Initial program 98.1%
unpow298.1%
clear-num98.0%
clear-num98.0%
frac-times98.1%
metadata-eval98.1%
Applied egg-rr98.1%
unpow212.7%
clear-num12.7%
un-div-inv12.7%
Applied egg-rr98.1%
if 4.9999999999999999e149 < (/.f64 t l) Initial program 43.0%
Taylor expanded in t around -inf 38.6%
mul-1-neg38.6%
*-commutative38.6%
distribute-rgt-neg-in38.6%
unpow238.6%
unpow238.6%
times-frac42.0%
unpow242.0%
associate-/l*42.0%
associate-/r/42.0%
Simplified42.0%
expm1-log1p-u42.0%
expm1-udef43.0%
Applied egg-rr43.0%
expm1-def99.6%
expm1-log1p99.6%
*-commutative99.6%
associate-/l*99.6%
Simplified99.6%
div-inv99.5%
pow1/299.5%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification98.5%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (* t_m (* (/ t_m l) (/ 1.0 l)))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (t_m * ((t_m / l) * (1.0d0 / l))))))))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(t_m * Float64(Float64(t_m / l) * Float64(1.0 / l)))))))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := 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[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{1}{\ell}\right)\right)}}\right)
\end{array}
Initial program 83.5%
unpow283.5%
div-inv83.6%
associate-*l*80.6%
Applied egg-rr80.6%
unpow231.0%
clear-num31.0%
un-div-inv31.0%
Applied egg-rr80.6%
Final simplification80.6%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ 1.0 (* (/ l t_m) (/ l t_m)))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))));
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (1.0d0 / ((l / t_m) * (l / t_m))))))))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(1.0 / Float64(Float64(l / t_m) * Float64(l / t_m)))))))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m)))))))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := 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[(1.0 / N[(N[(l / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{1}{\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m}}}}\right)
\end{array}
Initial program 83.5%
unpow283.5%
clear-num83.5%
clear-num83.5%
frac-times83.6%
metadata-eval83.6%
Applied egg-rr83.6%
unpow231.0%
clear-num31.0%
un-div-inv31.0%
Applied egg-rr83.6%
Final simplification83.6%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (/ (sqrt 0.5) t_m)))
(if (<= t_m 1.65e+27)
(asin (hypot 1.0 (/ Om Omc)))
(if (<= t_m 5.5e+161) (asin (* l t_1)) (asin (* l (- t_1)))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = sqrt(0.5) / t_m;
double tmp;
if (t_m <= 1.65e+27) {
tmp = asin(hypot(1.0, (Om / Omc)));
} else if (t_m <= 5.5e+161) {
tmp = asin((l * t_1));
} else {
tmp = asin((l * -t_1));
}
return tmp;
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double t_1 = Math.sqrt(0.5) / t_m;
double tmp;
if (t_m <= 1.65e+27) {
tmp = Math.asin(Math.hypot(1.0, (Om / Omc)));
} else if (t_m <= 5.5e+161) {
tmp = Math.asin((l * t_1));
} else {
tmp = Math.asin((l * -t_1));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = math.sqrt(0.5) / t_m tmp = 0 if t_m <= 1.65e+27: tmp = math.asin(math.hypot(1.0, (Om / Omc))) elif t_m <= 5.5e+161: tmp = math.asin((l * t_1)) else: tmp = math.asin((l * -t_1)) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(sqrt(0.5) / t_m) tmp = 0.0 if (t_m <= 1.65e+27) tmp = asin(hypot(1.0, Float64(Om / Omc))); elseif (t_m <= 5.5e+161) tmp = asin(Float64(l * t_1)); else tmp = asin(Float64(l * Float64(-t_1))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = sqrt(0.5) / t_m; tmp = 0.0; if (t_m <= 1.65e+27) tmp = asin(hypot(1.0, (Om / Omc))); elseif (t_m <= 5.5e+161) tmp = asin((l * t_1)); else tmp = asin((l * -t_1)); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]}, If[LessEqual[t$95$m, 1.65e+27], N[ArcSin[N[Sqrt[1.0 ^ 2 + N[(Om / Omc), $MachinePrecision] ^ 2], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 5.5e+161], N[ArcSin[N[(l * t$95$1), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * (-t$95$1)), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := \frac{\sqrt{0.5}}{t\_m}\\
\mathbf{if}\;t\_m \leq 1.65 \cdot 10^{+27}:\\
\;\;\;\;\sin^{-1} \left(\mathsf{hypot}\left(1, \frac{Om}{Omc}\right)\right)\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+161}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \left(-t\_1\right)\right)\\
\end{array}
\end{array}
if t < 1.6499999999999999e27Initial program 86.8%
Taylor expanded in t around 0 52.2%
unpow252.2%
unpow252.2%
times-frac59.6%
unpow259.6%
Simplified59.6%
expm1-log1p-u59.6%
expm1-udef59.6%
Applied egg-rr58.3%
expm1-def58.3%
expm1-log1p58.3%
Simplified58.3%
if 1.6499999999999999e27 < t < 5.5000000000000005e161Initial program 76.9%
Taylor expanded in t around -inf 35.7%
mul-1-neg35.7%
*-commutative35.7%
distribute-rgt-neg-in35.7%
unpow235.7%
unpow235.7%
times-frac42.2%
unpow242.2%
associate-/l*42.1%
associate-/r/42.1%
Simplified42.1%
Taylor expanded in Om around 0 42.2%
metadata-eval42.2%
times-frac42.2%
neg-mul-142.2%
distribute-rgt-neg-in42.2%
times-frac42.1%
/-rgt-identity42.1%
Simplified42.1%
expm1-log1p-u42.1%
expm1-udef25.6%
add-sqr-sqrt0.0%
sqrt-unprod25.6%
sqr-neg25.6%
sqrt-unprod25.6%
add-sqr-sqrt25.6%
Applied egg-rr25.6%
expm1-def55.0%
expm1-log1p55.0%
Simplified55.0%
if 5.5000000000000005e161 < t Initial program 73.3%
Taylor expanded in t around -inf 58.1%
mul-1-neg58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
unpow258.1%
unpow258.1%
times-frac60.9%
unpow260.9%
associate-/l*60.9%
associate-/r/60.9%
Simplified60.9%
Taylor expanded in Om around 0 60.9%
metadata-eval60.9%
times-frac60.9%
neg-mul-160.9%
distribute-rgt-neg-in60.9%
times-frac60.9%
/-rgt-identity60.9%
Simplified60.9%
Final simplification58.3%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(if (<= t_m 1.25e+27)
(asin (hypot 1.0 (/ Om Omc)))
(if (<= t_m 1e+162)
(asin (* l (/ (sqrt 0.5) t_m)))
(asin (/ l (/ (- t_m) (sqrt 0.5)))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double tmp;
if (t_m <= 1.25e+27) {
tmp = asin(hypot(1.0, (Om / Omc)));
} else if (t_m <= 1e+162) {
tmp = asin((l * (sqrt(0.5) / t_m)));
} else {
tmp = asin((l / (-t_m / sqrt(0.5))));
}
return tmp;
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double tmp;
if (t_m <= 1.25e+27) {
tmp = Math.asin(Math.hypot(1.0, (Om / Omc)));
} else if (t_m <= 1e+162) {
tmp = Math.asin((l * (Math.sqrt(0.5) / t_m)));
} else {
tmp = Math.asin((l / (-t_m / Math.sqrt(0.5))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): tmp = 0 if t_m <= 1.25e+27: tmp = math.asin(math.hypot(1.0, (Om / Omc))) elif t_m <= 1e+162: tmp = math.asin((l * (math.sqrt(0.5) / t_m))) else: tmp = math.asin((l / (-t_m / math.sqrt(0.5)))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) tmp = 0.0 if (t_m <= 1.25e+27) tmp = asin(hypot(1.0, Float64(Om / Omc))); elseif (t_m <= 1e+162) tmp = asin(Float64(l * Float64(sqrt(0.5) / t_m))); else tmp = asin(Float64(l / Float64(Float64(-t_m) / sqrt(0.5)))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) tmp = 0.0; if (t_m <= 1.25e+27) tmp = asin(hypot(1.0, (Om / Omc))); elseif (t_m <= 1e+162) tmp = asin((l * (sqrt(0.5) / t_m))); else tmp = asin((l / (-t_m / sqrt(0.5)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := If[LessEqual[t$95$m, 1.25e+27], N[ArcSin[N[Sqrt[1.0 ^ 2 + N[(Om / Omc), $MachinePrecision] ^ 2], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 1e+162], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[((-t$95$m) / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 1.25 \cdot 10^{+27}:\\
\;\;\;\;\sin^{-1} \left(\mathsf{hypot}\left(1, \frac{Om}{Omc}\right)\right)\\
\mathbf{elif}\;t\_m \leq 10^{+162}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{-t\_m}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if t < 1.24999999999999995e27Initial program 86.8%
Taylor expanded in t around 0 52.2%
unpow252.2%
unpow252.2%
times-frac59.6%
unpow259.6%
Simplified59.6%
expm1-log1p-u59.6%
expm1-udef59.6%
Applied egg-rr58.3%
expm1-def58.3%
expm1-log1p58.3%
Simplified58.3%
if 1.24999999999999995e27 < t < 9.9999999999999994e161Initial program 76.9%
Taylor expanded in t around -inf 35.7%
mul-1-neg35.7%
*-commutative35.7%
distribute-rgt-neg-in35.7%
unpow235.7%
unpow235.7%
times-frac42.2%
unpow242.2%
associate-/l*42.1%
associate-/r/42.1%
Simplified42.1%
Taylor expanded in Om around 0 42.2%
metadata-eval42.2%
times-frac42.2%
neg-mul-142.2%
distribute-rgt-neg-in42.2%
times-frac42.1%
/-rgt-identity42.1%
Simplified42.1%
expm1-log1p-u42.1%
expm1-udef25.6%
add-sqr-sqrt0.0%
sqrt-unprod25.6%
sqr-neg25.6%
sqrt-unprod25.6%
add-sqr-sqrt25.6%
Applied egg-rr25.6%
expm1-def55.0%
expm1-log1p55.0%
Simplified55.0%
if 9.9999999999999994e161 < t Initial program 73.3%
Taylor expanded in t around -inf 58.1%
mul-1-neg58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
unpow258.1%
unpow258.1%
times-frac60.9%
unpow260.9%
associate-/l*60.9%
associate-/r/60.9%
Simplified60.9%
Taylor expanded in Om around 0 60.9%
metadata-eval60.9%
times-frac60.9%
neg-mul-160.9%
distribute-rgt-neg-in60.9%
times-frac60.9%
/-rgt-identity60.9%
Simplified60.9%
Taylor expanded in l around 0 60.9%
metadata-eval60.9%
associate-/l*60.9%
times-frac60.9%
*-lft-identity60.9%
neg-mul-160.9%
Simplified60.9%
Final simplification58.3%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(if (<= t_m 9.5e+27)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= t_m 2.6e+162)
(asin (* l (/ (sqrt 0.5) t_m)))
(asin (/ l (/ (- t_m) (sqrt 0.5)))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double tmp;
if (t_m <= 9.5e+27) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if (t_m <= 2.6e+162) {
tmp = asin((l * (sqrt(0.5) / t_m)));
} else {
tmp = asin((l / (-t_m / sqrt(0.5))));
}
return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (t_m <= 9.5d+27) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else if (t_m <= 2.6d+162) then
tmp = asin((l * (sqrt(0.5d0) / t_m)))
else
tmp = asin((l / (-t_m / sqrt(0.5d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double tmp;
if (t_m <= 9.5e+27) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if (t_m <= 2.6e+162) {
tmp = Math.asin((l * (Math.sqrt(0.5) / t_m)));
} else {
tmp = Math.asin((l / (-t_m / Math.sqrt(0.5))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): tmp = 0 if t_m <= 9.5e+27: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) elif t_m <= 2.6e+162: tmp = math.asin((l * (math.sqrt(0.5) / t_m))) else: tmp = math.asin((l / (-t_m / math.sqrt(0.5)))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) tmp = 0.0 if (t_m <= 9.5e+27) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); elseif (t_m <= 2.6e+162) tmp = asin(Float64(l * Float64(sqrt(0.5) / t_m))); else tmp = asin(Float64(l / Float64(Float64(-t_m) / sqrt(0.5)))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) tmp = 0.0; if (t_m <= 9.5e+27) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); elseif (t_m <= 2.6e+162) tmp = asin((l * (sqrt(0.5) / t_m))); else tmp = asin((l / (-t_m / sqrt(0.5)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := If[LessEqual[t$95$m, 9.5e+27], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 2.6e+162], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[((-t$95$m) / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 9.5 \cdot 10^{+27}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{+162}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{-t\_m}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if t < 9.4999999999999997e27Initial program 86.8%
Taylor expanded in t around 0 52.2%
unpow252.2%
unpow252.2%
times-frac59.6%
unpow259.6%
Simplified59.6%
unpow222.9%
clear-num22.9%
un-div-inv22.9%
Applied egg-rr59.6%
if 9.4999999999999997e27 < t < 2.6e162Initial program 76.9%
Taylor expanded in t around -inf 35.7%
mul-1-neg35.7%
*-commutative35.7%
distribute-rgt-neg-in35.7%
unpow235.7%
unpow235.7%
times-frac42.2%
unpow242.2%
associate-/l*42.1%
associate-/r/42.1%
Simplified42.1%
Taylor expanded in Om around 0 42.2%
metadata-eval42.2%
times-frac42.2%
neg-mul-142.2%
distribute-rgt-neg-in42.2%
times-frac42.1%
/-rgt-identity42.1%
Simplified42.1%
expm1-log1p-u42.1%
expm1-udef25.6%
add-sqr-sqrt0.0%
sqrt-unprod25.6%
sqr-neg25.6%
sqrt-unprod25.6%
add-sqr-sqrt25.6%
Applied egg-rr25.6%
expm1-def55.0%
expm1-log1p55.0%
Simplified55.0%
if 2.6e162 < t Initial program 73.3%
Taylor expanded in t around -inf 58.1%
mul-1-neg58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
unpow258.1%
unpow258.1%
times-frac60.9%
unpow260.9%
associate-/l*60.9%
associate-/r/60.9%
Simplified60.9%
Taylor expanded in Om around 0 60.9%
metadata-eval60.9%
times-frac60.9%
neg-mul-160.9%
distribute-rgt-neg-in60.9%
times-frac60.9%
/-rgt-identity60.9%
Simplified60.9%
Taylor expanded in l around 0 60.9%
metadata-eval60.9%
associate-/l*60.9%
times-frac60.9%
*-lft-identity60.9%
neg-mul-160.9%
Simplified60.9%
Final simplification59.2%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (if (<= t_m 4.1e+27) (asin (hypot 1.0 (/ Om Omc))) (asin (* l (/ (sqrt 0.5) t_m)))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double tmp;
if (t_m <= 4.1e+27) {
tmp = asin(hypot(1.0, (Om / Omc)));
} else {
tmp = asin((l * (sqrt(0.5) / t_m)));
}
return tmp;
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double tmp;
if (t_m <= 4.1e+27) {
tmp = Math.asin(Math.hypot(1.0, (Om / Omc)));
} else {
tmp = Math.asin((l * (Math.sqrt(0.5) / t_m)));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): tmp = 0 if t_m <= 4.1e+27: tmp = math.asin(math.hypot(1.0, (Om / Omc))) else: tmp = math.asin((l * (math.sqrt(0.5) / t_m))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) tmp = 0.0 if (t_m <= 4.1e+27) tmp = asin(hypot(1.0, Float64(Om / Omc))); else tmp = asin(Float64(l * Float64(sqrt(0.5) / t_m))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) tmp = 0.0; if (t_m <= 4.1e+27) tmp = asin(hypot(1.0, (Om / Omc))); else tmp = asin((l * (sqrt(0.5) / t_m))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := If[LessEqual[t$95$m, 4.1e+27], N[ArcSin[N[Sqrt[1.0 ^ 2 + N[(Om / Omc), $MachinePrecision] ^ 2], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 4.1 \cdot 10^{+27}:\\
\;\;\;\;\sin^{-1} \left(\mathsf{hypot}\left(1, \frac{Om}{Omc}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\end{array}
\end{array}
if t < 4.1000000000000002e27Initial program 86.8%
Taylor expanded in t around 0 52.2%
unpow252.2%
unpow252.2%
times-frac59.6%
unpow259.6%
Simplified59.6%
expm1-log1p-u59.6%
expm1-udef59.6%
Applied egg-rr58.3%
expm1-def58.3%
expm1-log1p58.3%
Simplified58.3%
if 4.1000000000000002e27 < t Initial program 74.9%
Taylor expanded in t around -inf 47.9%
mul-1-neg47.9%
*-commutative47.9%
distribute-rgt-neg-in47.9%
unpow247.9%
unpow247.9%
times-frac52.3%
unpow252.3%
associate-/l*52.3%
associate-/r/52.3%
Simplified52.3%
Taylor expanded in Om around 0 52.3%
metadata-eval52.3%
times-frac52.3%
neg-mul-152.3%
distribute-rgt-neg-in52.3%
times-frac52.3%
/-rgt-identity52.3%
Simplified52.3%
expm1-log1p-u52.3%
expm1-udef28.7%
add-sqr-sqrt0.0%
sqrt-unprod28.7%
sqr-neg28.7%
sqrt-unprod28.7%
add-sqr-sqrt28.7%
Applied egg-rr28.7%
expm1-def53.4%
expm1-log1p53.4%
Simplified53.4%
Final simplification57.0%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (hypot 1.0 (/ Om Omc))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin(hypot(1.0, (Om / Omc)));
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin(Math.hypot(1.0, (Om / Omc)));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin(math.hypot(1.0, (Om / Omc)))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(hypot(1.0, Float64(Om / Omc))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin(hypot(1.0, (Om / Omc))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[1.0 ^ 2 + N[(Om / Omc), $MachinePrecision] ^ 2], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\mathsf{hypot}\left(1, \frac{Om}{Omc}\right)\right)
\end{array}
Initial program 83.5%
Taylor expanded in t around 0 43.2%
unpow243.2%
unpow243.2%
times-frac49.4%
unpow249.4%
Simplified49.4%
expm1-log1p-u49.4%
expm1-udef49.4%
Applied egg-rr48.4%
expm1-def48.4%
expm1-log1p48.4%
Simplified48.4%
Final simplification48.4%
herbie shell --seed 2024033
(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)))))))