
(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 7 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 (/ (* (sqrt 2.0) t) l)))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((sqrt(2.0) * t) / l))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((Math.sqrt(2.0) * t) / l))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((math.sqrt(2.0) * t) / l))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(sqrt(2.0) * t) / l)))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((sqrt(2.0) * t) / l)))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{\sqrt{2} \cdot t}{\ell}\right)}\right)
\end{array}
Initial program 83.3%
sqrt-div83.3%
div-inv83.3%
add-sqr-sqrt83.3%
hypot-1-def83.3%
*-commutative83.3%
sqrt-prod83.3%
sqrt-pow198.8%
metadata-eval98.8%
pow198.8%
Applied egg-rr98.8%
associate-*r/98.8%
*-rgt-identity98.8%
*-commutative98.8%
associate-*r/98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (sqrt 2.0) (/ t l))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, (sqrt(2.0) * (t / l)))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, (Math.sqrt(2.0) * (t / l)))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, (math.sqrt(2.0) * (t / l)))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(sqrt(2.0) * Float64(t / l))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, (sqrt(2.0) * (t / l))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{2} \cdot \frac{t}{\ell}\right)}\right)
\end{array}
Initial program 83.3%
sqrt-div83.3%
add-sqr-sqrt83.3%
hypot-1-def83.3%
*-commutative83.3%
sqrt-prod83.3%
sqrt-pow198.8%
metadata-eval98.8%
pow198.8%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (t l Om Omc) :precision binary64 (asin (/ 1.0 (hypot 1.0 (* t (/ (sqrt 2.0) l))))))
double code(double t, double l, double Om, double Omc) {
return asin((1.0 / hypot(1.0, (t * (sqrt(2.0) / l)))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((1.0 / Math.hypot(1.0, (t * (Math.sqrt(2.0) / l)))));
}
def code(t, l, Om, Omc): return math.asin((1.0 / math.hypot(1.0, (t * (math.sqrt(2.0) / l)))))
function code(t, l, Om, Omc) return asin(Float64(1.0 / hypot(1.0, Float64(t * Float64(sqrt(2.0) / l))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((1.0 / hypot(1.0, (t * (sqrt(2.0) / l))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, t \cdot \frac{\sqrt{2}}{\ell}\right)}\right)
\end{array}
Initial program 83.3%
sqrt-div83.3%
div-inv83.3%
add-sqr-sqrt83.3%
hypot-1-def83.3%
*-commutative83.3%
sqrt-prod83.3%
sqrt-pow198.8%
metadata-eval98.8%
pow198.8%
Applied egg-rr98.8%
associate-*r/98.8%
*-rgt-identity98.8%
*-commutative98.8%
associate-*r/98.8%
Simplified98.8%
Taylor expanded in Om around 0 97.8%
*-commutative97.8%
associate-/l*97.9%
Applied egg-rr97.9%
Final simplification97.9%
(FPCore (t l Om Omc) :precision binary64 (if (or (<= t 8.5e-16) (and (not (<= t 3600.0)) (<= t 3.2e+39))) (asin 1.0) (asin (/ l (* (sqrt 2.0) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 8.5e-16) || (!(t <= 3600.0) && (t <= 3.2e+39))) {
tmp = asin(1.0);
} else {
tmp = asin((l / (sqrt(2.0) * 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 <= 8.5d-16) .or. (.not. (t <= 3600.0d0)) .and. (t <= 3.2d+39)) then
tmp = asin(1.0d0)
else
tmp = asin((l / (sqrt(2.0d0) * t)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 8.5e-16) || (!(t <= 3600.0) && (t <= 3.2e+39))) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l / (Math.sqrt(2.0) * t)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t <= 8.5e-16) or (not (t <= 3600.0) and (t <= 3.2e+39)): tmp = math.asin(1.0) else: tmp = math.asin((l / (math.sqrt(2.0) * t))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((t <= 8.5e-16) || (!(t <= 3600.0) && (t <= 3.2e+39))) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(sqrt(2.0) * t))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t <= 8.5e-16) || (~((t <= 3600.0)) && (t <= 3.2e+39))) tmp = asin(1.0); else tmp = asin((l / (sqrt(2.0) * t))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, 8.5e-16], And[N[Not[LessEqual[t, 3600.0]], $MachinePrecision], LessEqual[t, 3.2e+39]]], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.5 \cdot 10^{-16} \lor \neg \left(t \leq 3600\right) \land t \leq 3.2 \cdot 10^{+39}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\sqrt{2} \cdot t}\right)\\
\end{array}
\end{array}
if t < 8.5000000000000001e-16 or 3600 < t < 3.19999999999999993e39Initial program 86.9%
Taylor expanded in t around 0 54.0%
unpow254.0%
unpow254.0%
times-frac61.2%
unpow261.2%
Simplified61.2%
Taylor expanded in Om around 0 60.4%
if 8.5000000000000001e-16 < t < 3600 or 3.19999999999999993e39 < t Initial program 71.3%
sqrt-div71.3%
div-inv71.3%
add-sqr-sqrt71.3%
hypot-1-def71.3%
*-commutative71.3%
sqrt-prod71.2%
sqrt-pow197.8%
metadata-eval97.8%
pow197.8%
Applied egg-rr97.8%
associate-*r/97.8%
*-rgt-identity97.8%
*-commutative97.8%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in Om around 0 97.8%
Taylor expanded in t around inf 52.5%
Final simplification58.6%
(FPCore (t l Om Omc) :precision binary64 (if (or (<= t 8e-16) (and (not (<= t 230.0)) (<= t 2.7e+39))) (asin 1.0) (asin (* l (/ (sqrt 0.5) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 8e-16) || (!(t <= 230.0) && (t <= 2.7e+39))) {
tmp = asin(1.0);
} else {
tmp = asin((l * (sqrt(0.5) / t)));
}
return tmp;
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t <= 8d-16) .or. (.not. (t <= 230.0d0)) .and. (t <= 2.7d+39)) then
tmp = asin(1.0d0)
else
tmp = asin((l * (sqrt(0.5d0) / t)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 8e-16) || (!(t <= 230.0) && (t <= 2.7e+39))) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l * (Math.sqrt(0.5) / t)));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t <= 8e-16) or (not (t <= 230.0) and (t <= 2.7e+39)): tmp = math.asin(1.0) else: tmp = math.asin((l * (math.sqrt(0.5) / t))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((t <= 8e-16) || (!(t <= 230.0) && (t <= 2.7e+39))) tmp = asin(1.0); else tmp = asin(Float64(l * Float64(sqrt(0.5) / t))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t <= 8e-16) || (~((t <= 230.0)) && (t <= 2.7e+39))) tmp = asin(1.0); else tmp = asin((l * (sqrt(0.5) / t))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, 8e-16], And[N[Not[LessEqual[t, 230.0]], $MachinePrecision], LessEqual[t, 2.7e+39]]], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8 \cdot 10^{-16} \lor \neg \left(t \leq 230\right) \land t \leq 2.7 \cdot 10^{+39}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if t < 7.9999999999999998e-16 or 230 < t < 2.70000000000000003e39Initial program 86.9%
Taylor expanded in t around 0 54.0%
unpow254.0%
unpow254.0%
times-frac61.2%
unpow261.2%
Simplified61.2%
Taylor expanded in Om around 0 60.4%
if 7.9999999999999998e-16 < t < 230 or 2.70000000000000003e39 < t Initial program 71.3%
Taylor expanded in t around inf 42.1%
*-commutative42.1%
unpow242.1%
unpow242.1%
times-frac52.6%
unpow252.6%
associate-/l*52.5%
Simplified52.5%
Taylor expanded in Om around 0 52.5%
Final simplification58.6%
(FPCore (t l Om Omc)
:precision binary64
(if (<= t 9.5e-16)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (or (<= t 4200.0) (not (<= t 2.8e+39)))
(asin (* l (/ (sqrt 0.5) t)))
(asin 1.0))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 9.5e-16) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if ((t <= 4200.0) || !(t <= 2.8e+39)) {
tmp = asin((l * (sqrt(0.5) / t)));
} 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 (t <= 9.5d-16) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else if ((t <= 4200.0d0) .or. (.not. (t <= 2.8d+39))) then
tmp = asin((l * (sqrt(0.5d0) / t)))
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 (t <= 9.5e-16) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if ((t <= 4200.0) || !(t <= 2.8e+39)) {
tmp = Math.asin((l * (Math.sqrt(0.5) / t)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if t <= 9.5e-16: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) elif (t <= 4200.0) or not (t <= 2.8e+39): tmp = math.asin((l * (math.sqrt(0.5) / t))) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (t <= 9.5e-16) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); elseif ((t <= 4200.0) || !(t <= 2.8e+39)) tmp = asin(Float64(l * Float64(sqrt(0.5) / t))); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= 9.5e-16) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); elseif ((t <= 4200.0) || ~((t <= 2.8e+39))) tmp = asin((l * (sqrt(0.5) / t))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[t, 9.5e-16], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[t, 4200.0], N[Not[LessEqual[t, 2.8e+39]], $MachinePrecision]], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \cdot 10^{-16}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{elif}\;t \leq 4200 \lor \neg \left(t \leq 2.8 \cdot 10^{+39}\right):\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if t < 9.5000000000000005e-16Initial program 86.5%
Taylor expanded in t around 0 53.5%
unpow253.5%
unpow253.5%
times-frac60.9%
unpow260.9%
Simplified60.9%
unpow260.9%
clear-num60.9%
un-div-inv60.9%
Applied egg-rr60.9%
if 9.5000000000000005e-16 < t < 4200 or 2.80000000000000001e39 < t Initial program 71.3%
Taylor expanded in t around inf 42.1%
*-commutative42.1%
unpow242.1%
unpow242.1%
times-frac52.6%
unpow252.6%
associate-/l*52.5%
Simplified52.5%
Taylor expanded in Om around 0 52.5%
if 4200 < t < 2.80000000000000001e39Initial program 100.0%
Taylor expanded in t around 0 68.1%
unpow268.1%
unpow268.1%
times-frac69.2%
unpow269.2%
Simplified69.2%
Taylor expanded in Om around 0 69.2%
Final simplification59.2%
(FPCore (t l Om Omc) :precision binary64 (asin 1.0))
double code(double t, double l, double Om, double Omc) {
return asin(1.0);
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(1.0d0)
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(1.0);
}
def code(t, l, Om, Omc): return math.asin(1.0)
function code(t, l, Om, Omc) return asin(1.0) end
function tmp = code(t, l, Om, Omc) tmp = asin(1.0); end
code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} 1
\end{array}
Initial program 83.3%
Taylor expanded in t around 0 43.8%
unpow243.8%
unpow243.8%
times-frac49.9%
unpow249.9%
Simplified49.9%
Taylor expanded in Om around 0 49.3%
Final simplification49.3%
herbie shell --seed 2024059
(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)))))))