
(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}
(FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0)))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t / l) * math.sqrt(2.0)))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 84.7%
sqrt-div84.7%
add-sqr-sqrt84.7%
hypot-1-def84.7%
*-commutative84.7%
sqrt-prod84.7%
unpow284.7%
sqrt-prod58.5%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (hypot 1.0 (/ t (/ l (sqrt 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, (t / (l / sqrt(2.0))))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / Math.hypot(1.0, (t / (l / Math.sqrt(2.0))))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / math.hypot(1.0, (t / (l / math.sqrt(2.0))))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) / hypot(1.0, Float64(t / Float64(l / sqrt(2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, (t / (l / sqrt(2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(t / N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}}{\mathsf{hypot}\left(1, \frac{t}{\frac{\ell}{\sqrt{2}}}\right)}\right)
\end{array}
Initial program 84.7%
sqrt-div84.7%
div-inv84.7%
add-sqr-sqrt84.7%
hypot-1-def84.7%
*-commutative84.7%
sqrt-prod84.7%
unpow284.7%
sqrt-prod58.5%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
associate-*l/99.1%
associate-/l*99.1%
Simplified99.1%
unpow252.1%
clear-num52.1%
un-div-inv52.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (t l Om Omc) :precision binary64 (asin (/ 1.0 (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
double code(double t, double l, double Om, double Omc) {
return asin((1.0 / hypot(1.0, ((t / l) * sqrt(2.0)))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((1.0 / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
}
def code(t, l, Om, Omc): return math.asin((1.0 / math.hypot(1.0, ((t / l) * math.sqrt(2.0)))))
function code(t, l, Om, Omc) return asin(Float64(1.0 / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((1.0 / hypot(1.0, ((t / l) * sqrt(2.0))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 84.7%
Taylor expanded in Om around 0 70.9%
sqrt-div70.9%
metadata-eval70.9%
add-sqr-sqrt70.9%
hypot-1-def70.9%
sqrt-prod70.8%
sqrt-div75.6%
unpow275.6%
sqrt-prod41.6%
add-sqr-sqrt85.3%
unpow285.3%
sqrt-prod46.3%
add-sqr-sqrt98.5%
Applied egg-rr98.5%
Final simplification98.5%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+154)
(asin (* (/ l t) (- (sqrt 0.5))))
(if (<= (/ t l) 2e+50)
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (/ l (pow 0.5 -0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = asin(((l / t) * -sqrt(0.5)));
} else if ((t / l) <= 2e+50) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((l / pow(0.5, -0.5)) / t));
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-2d+154)) then
tmp = asin(((l / t) * -sqrt(0.5d0)))
else if ((t / l) <= 2d+50) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l / (0.5d0 ** (-0.5d0))) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+154) {
tmp = Math.asin(((l / t) * -Math.sqrt(0.5)));
} else if ((t / l) <= 2e+50) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l / Math.pow(0.5, -0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+154: tmp = math.asin(((l / t) * -math.sqrt(0.5))) elif (t / l) <= 2e+50: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l / math.pow(0.5, -0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+154) tmp = asin(Float64(Float64(l / t) * Float64(-sqrt(0.5)))); elseif (Float64(t / l) <= 2e+50) 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 / (0.5 ^ -0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+154) tmp = asin(((l / t) * -sqrt(0.5))); elseif ((t / l) <= 2e+50) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l / (0.5 ^ -0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+154], N[ArcSin[N[(N[(l / t), $MachinePrecision] * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+50], 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[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+50}:\\
\;\;\;\;\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{\frac{\ell}{{0.5}^{-0.5}}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2.00000000000000007e154Initial program 44.2%
Taylor expanded in Om around 0 44.2%
Taylor expanded in t around -inf 99.5%
mul-1-neg99.5%
associate-/l*99.4%
distribute-neg-frac99.4%
Simplified99.4%
frac-2neg99.4%
associate-/r/99.7%
frac-2neg99.7%
Applied egg-rr99.7%
if -2.00000000000000007e154 < (/.f64 t l) < 2.0000000000000002e50Initial program 99.3%
Taylor expanded in Om around 0 82.9%
add-sqr-sqrt82.8%
pow282.8%
sqrt-div82.9%
unpow282.9%
sqrt-prod43.9%
add-sqr-sqrt89.9%
unpow289.9%
sqrt-prod46.4%
add-sqr-sqrt98.6%
unpow298.6%
Applied egg-rr98.6%
if 2.0000000000000002e50 < (/.f64 t l) Initial program 64.5%
Taylor expanded in Om around 0 49.9%
Taylor expanded in t around -inf 34.6%
mul-1-neg34.6%
associate-/l*34.6%
distribute-neg-frac34.6%
Simplified34.6%
*-un-lft-identity34.6%
div-inv34.6%
times-frac34.6%
add-sqr-sqrt20.0%
sqrt-unprod54.6%
sqr-neg54.6%
sqrt-unprod45.0%
add-sqr-sqrt98.3%
pow1/298.3%
pow-flip98.3%
metadata-eval98.3%
Applied egg-rr98.3%
associate-*l/98.3%
*-lft-identity98.3%
Simplified98.3%
Final simplification98.7%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(- (asin (/ (* l (sqrt 0.5)) t)))
(if (<= (/ t l) 0.0005)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(asin (/ (/ l (pow 0.5 -0.5)) 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.0005) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin(((l / pow(0.5, -0.5)) / t));
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-100.0d0)) then
tmp = -asin(((l * sqrt(0.5d0)) / t))
else if ((t / l) <= 0.0005d0) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin(((l / (0.5d0 ** (-0.5d0))) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = -Math.asin(((l * Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin(((l / Math.pow(0.5, -0.5)) / t));
}
return tmp;
}
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.0005: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin(((l / math.pow(0.5, -0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = Float64(-asin(Float64(Float64(l * sqrt(0.5)) / t))); elseif (Float64(t / l) <= 0.0005) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(Float64(l / (0.5 ^ -0.5)) / t)); end return tmp end
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.0005) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin(((l / (0.5 ^ -0.5)) / t)); end tmp_2 = tmp; end
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.0005], 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[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;-\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{\ell}{{0.5}^{-0.5}}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 70.1%
Taylor expanded in Om around 0 52.0%
Taylor expanded in t around -inf 98.7%
mul-1-neg98.7%
associate-/l*98.6%
distribute-neg-frac98.6%
Simplified98.6%
distribute-frac-neg98.6%
asin-neg98.6%
Applied egg-rr98.6%
associate-/l*98.7%
Simplified98.7%
if -100 < (/.f64 t l) < 5.0000000000000001e-4Initial program 99.2%
Taylor expanded in t around 0 86.9%
unpow286.9%
unpow286.9%
times-frac98.4%
unpow298.4%
Simplified98.4%
unpow298.4%
clear-num98.4%
un-div-inv98.4%
Applied egg-rr98.4%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 70.0%
Taylor expanded in Om around 0 51.5%
Taylor expanded in t around -inf 29.4%
mul-1-neg29.4%
associate-/l*29.4%
distribute-neg-frac29.4%
Simplified29.4%
*-un-lft-identity29.4%
div-inv29.4%
times-frac29.4%
add-sqr-sqrt17.0%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod43.4%
add-sqr-sqrt96.9%
pow1/296.9%
pow-flip96.7%
metadata-eval96.7%
Applied egg-rr96.7%
associate-*l/96.8%
*-lft-identity96.8%
Simplified96.8%
Final simplification98.1%
(FPCore (t l Om Omc)
:precision binary64
(if (<= l -1.08e+76)
(asin 1.0)
(if (<= l -5e-311)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= l 2.5e-17) (asin (* (/ l t) (sqrt 0.5))) (asin 1.0)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -1.08e+76) {
tmp = asin(1.0);
} else if (l <= -5e-311) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if (l <= 2.5e-17) {
tmp = asin(((l / t) * sqrt(0.5)));
} else {
tmp = asin(1.0);
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (l <= (-1.08d+76)) then
tmp = asin(1.0d0)
else if (l <= (-5d-311)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if (l <= 2.5d-17) then
tmp = asin(((l / t) * sqrt(0.5d0)))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -1.08e+76) {
tmp = Math.asin(1.0);
} else if (l <= -5e-311) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if (l <= 2.5e-17) {
tmp = Math.asin(((l / t) * Math.sqrt(0.5)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if l <= -1.08e+76: tmp = math.asin(1.0) elif l <= -5e-311: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif l <= 2.5e-17: tmp = math.asin(((l / t) * math.sqrt(0.5))) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (l <= -1.08e+76) tmp = asin(1.0); elseif (l <= -5e-311) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (l <= 2.5e-17) tmp = asin(Float64(Float64(l / t) * sqrt(0.5))); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (l <= -1.08e+76) tmp = asin(1.0); elseif (l <= -5e-311) tmp = asin(((-l / t) / sqrt(2.0))); elseif (l <= 2.5e-17) tmp = asin(((l / t) * sqrt(0.5))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[l, -1.08e+76], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, -5e-311], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.5e-17], N[ArcSin[N[(N[(l / t), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.08 \cdot 10^{+76}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-311}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{-17}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -1.07999999999999999e76 or 2.4999999999999999e-17 < l Initial program 97.0%
Taylor expanded in Om around 0 80.7%
Taylor expanded in t around 0 85.5%
if -1.07999999999999999e76 < l < -5.00000000000023e-311Initial program 80.6%
Taylor expanded in Om around 0 68.9%
sqrt-div68.9%
metadata-eval68.9%
add-sqr-sqrt68.9%
hypot-1-def68.9%
sqrt-prod68.8%
sqrt-div75.1%
unpow275.1%
sqrt-prod39.8%
add-sqr-sqrt82.6%
unpow282.6%
sqrt-prod0.0%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Taylor expanded in t around -inf 48.2%
mul-1-neg48.2%
associate-/r*48.2%
Simplified48.2%
if -5.00000000000023e-311 < l < 2.4999999999999999e-17Initial program 68.8%
Taylor expanded in Om around 0 56.1%
Taylor expanded in t around -inf 55.8%
mul-1-neg55.8%
associate-/l*55.9%
distribute-neg-frac55.9%
Simplified55.9%
add-sqr-sqrt0.0%
sqrt-unprod44.5%
sqr-neg44.5%
sqrt-unprod53.4%
add-sqr-sqrt53.5%
associate-/r/53.5%
Applied egg-rr53.5%
Final simplification65.2%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= (/ t l) 0.0005)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (* (/ l t) (sqrt 0.5))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.0005) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l / t) * sqrt(0.5)));
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-100.0d0)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.0005d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l / t) * sqrt(0.5d0)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l / t) * Math.sqrt(0.5)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 0.0005: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l / t) * math.sqrt(0.5))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 0.0005) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l / t) * sqrt(0.5))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 0.0005) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l / t) * sqrt(0.5))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0005], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l / t), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 70.1%
Taylor expanded in Om around 0 52.0%
sqrt-div52.0%
metadata-eval52.0%
add-sqr-sqrt52.0%
hypot-1-def52.0%
sqrt-prod51.8%
sqrt-div63.5%
unpow263.5%
sqrt-prod44.0%
add-sqr-sqrt75.6%
unpow275.6%
sqrt-prod44.3%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
Taylor expanded in t around -inf 98.7%
mul-1-neg98.7%
associate-/r*98.8%
Simplified98.8%
if -100 < (/.f64 t l) < 5.0000000000000001e-4Initial program 99.2%
Taylor expanded in Om around 0 89.7%
Taylor expanded in t around 0 89.6%
mul-1-neg89.6%
unsub-neg89.6%
unpow289.6%
unpow289.6%
times-frac98.1%
unpow298.1%
Simplified98.1%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 70.0%
Taylor expanded in Om around 0 51.5%
Taylor expanded in t around -inf 29.4%
mul-1-neg29.4%
associate-/l*29.4%
distribute-neg-frac29.4%
Simplified29.4%
add-sqr-sqrt17.0%
sqrt-unprod50.9%
sqr-neg50.9%
sqrt-unprod43.4%
add-sqr-sqrt96.9%
associate-/r/96.9%
Applied egg-rr96.9%
Final simplification98.0%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= (/ t l) 0.0005)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (/ l (pow 0.5 -0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.0005) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l / pow(0.5, -0.5)) / t));
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-100.0d0)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.0005d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l / (0.5d0 ** (-0.5d0))) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l / Math.pow(0.5, -0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 0.0005: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l / math.pow(0.5, -0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 0.0005) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l / (0.5 ^ -0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 0.0005) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l / (0.5 ^ -0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0005], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l / N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{\ell}{{0.5}^{-0.5}}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 70.1%
Taylor expanded in Om around 0 52.0%
sqrt-div52.0%
metadata-eval52.0%
add-sqr-sqrt52.0%
hypot-1-def52.0%
sqrt-prod51.8%
sqrt-div63.5%
unpow263.5%
sqrt-prod44.0%
add-sqr-sqrt75.6%
unpow275.6%
sqrt-prod44.3%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
Taylor expanded in t around -inf 98.7%
mul-1-neg98.7%
associate-/r*98.8%
Simplified98.8%
if -100 < (/.f64 t l) < 5.0000000000000001e-4Initial program 99.2%
Taylor expanded in Om around 0 89.7%
Taylor expanded in t around 0 89.6%
mul-1-neg89.6%
unsub-neg89.6%
unpow289.6%
unpow289.6%
times-frac98.1%
unpow298.1%
Simplified98.1%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 70.0%
Taylor expanded in Om around 0 51.5%
Taylor expanded in t around -inf 29.4%
mul-1-neg29.4%
associate-/l*29.4%
distribute-neg-frac29.4%
Simplified29.4%
*-un-lft-identity29.4%
div-inv29.4%
times-frac29.4%
add-sqr-sqrt17.0%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod43.4%
add-sqr-sqrt96.9%
pow1/296.9%
pow-flip96.7%
metadata-eval96.7%
Applied egg-rr96.7%
associate-*l/96.8%
*-lft-identity96.8%
Simplified96.8%
Final simplification97.9%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(- (asin (/ (* l (sqrt 0.5)) t)))
(if (<= (/ t l) 0.0005)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (/ l (pow 0.5 -0.5)) 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.0005) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l / pow(0.5, -0.5)) / t));
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-100.0d0)) then
tmp = -asin(((l * sqrt(0.5d0)) / t))
else if ((t / l) <= 0.0005d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l / (0.5d0 ** (-0.5d0))) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = -Math.asin(((l * Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l / Math.pow(0.5, -0.5)) / t));
}
return tmp;
}
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.0005: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l / math.pow(0.5, -0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = Float64(-asin(Float64(Float64(l * sqrt(0.5)) / t))); elseif (Float64(t / l) <= 0.0005) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l / (0.5 ^ -0.5)) / t)); end return tmp end
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.0005) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l / (0.5 ^ -0.5)) / t)); end tmp_2 = tmp; end
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.0005], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l / N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;-\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{\ell}{{0.5}^{-0.5}}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 70.1%
Taylor expanded in Om around 0 52.0%
Taylor expanded in t around -inf 98.7%
mul-1-neg98.7%
associate-/l*98.6%
distribute-neg-frac98.6%
Simplified98.6%
distribute-frac-neg98.6%
asin-neg98.6%
Applied egg-rr98.6%
associate-/l*98.7%
Simplified98.7%
if -100 < (/.f64 t l) < 5.0000000000000001e-4Initial program 99.2%
Taylor expanded in Om around 0 89.7%
Taylor expanded in t around 0 89.6%
mul-1-neg89.6%
unsub-neg89.6%
unpow289.6%
unpow289.6%
times-frac98.1%
unpow298.1%
Simplified98.1%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 70.0%
Taylor expanded in Om around 0 51.5%
Taylor expanded in t around -inf 29.4%
mul-1-neg29.4%
associate-/l*29.4%
distribute-neg-frac29.4%
Simplified29.4%
*-un-lft-identity29.4%
div-inv29.4%
times-frac29.4%
add-sqr-sqrt17.0%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod43.4%
add-sqr-sqrt96.9%
pow1/296.9%
pow-flip96.7%
metadata-eval96.7%
Applied egg-rr96.7%
associate-*l/96.8%
*-lft-identity96.8%
Simplified96.8%
Final simplification97.9%
(FPCore (t l Om Omc) :precision binary64 (if (<= l -4.4e-132) (asin 1.0) (if (<= l 1.18e-15) (asin (* (/ l t) (sqrt 0.5))) (asin 1.0))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -4.4e-132) {
tmp = asin(1.0);
} else if (l <= 1.18e-15) {
tmp = asin(((l / t) * sqrt(0.5)));
} else {
tmp = asin(1.0);
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (l <= (-4.4d-132)) then
tmp = asin(1.0d0)
else if (l <= 1.18d-15) then
tmp = asin(((l / t) * sqrt(0.5d0)))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -4.4e-132) {
tmp = Math.asin(1.0);
} else if (l <= 1.18e-15) {
tmp = Math.asin(((l / t) * Math.sqrt(0.5)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if l <= -4.4e-132: tmp = math.asin(1.0) elif l <= 1.18e-15: tmp = math.asin(((l / t) * math.sqrt(0.5))) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (l <= -4.4e-132) tmp = asin(1.0); elseif (l <= 1.18e-15) tmp = asin(Float64(Float64(l / t) * sqrt(0.5))); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (l <= -4.4e-132) tmp = asin(1.0); elseif (l <= 1.18e-15) tmp = asin(((l / t) * sqrt(0.5))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[l, -4.4e-132], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, 1.18e-15], N[ArcSin[N[(N[(l / t), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4.4 \cdot 10^{-132}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq 1.18 \cdot 10^{-15}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -4.39999999999999981e-132 or 1.18000000000000004e-15 < l Initial program 92.2%
Taylor expanded in Om around 0 80.4%
Taylor expanded in t around 0 71.2%
if -4.39999999999999981e-132 < l < 1.18000000000000004e-15Initial program 72.0%
Taylor expanded in Om around 0 54.5%
Taylor expanded in t around -inf 58.2%
mul-1-neg58.2%
associate-/l*58.2%
distribute-neg-frac58.2%
Simplified58.2%
add-sqr-sqrt22.6%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod34.1%
add-sqr-sqrt56.2%
associate-/r/56.2%
Applied egg-rr56.2%
Final simplification65.7%
(FPCore (t l Om Omc) :precision binary64 (asin 1.0))
double code(double t, double l, double Om, double Omc) {
return asin(1.0);
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(1.0d0)
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(1.0);
}
def code(t, l, Om, Omc): return math.asin(1.0)
function code(t, l, Om, Omc) return asin(1.0) end
function tmp = code(t, l, Om, Omc) tmp = asin(1.0); end
code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} 1
\end{array}
Initial program 84.7%
Taylor expanded in Om around 0 70.9%
Taylor expanded in t around 0 51.6%
Final simplification51.6%
herbie shell --seed 2024026
(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)))))))