
(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 (/ (/ Om Omc) (/ Omc Om)))) (hypot 1.0 (/ (sqrt 2.0) (/ l t))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, (sqrt(2.0) / (l / t)))));
}
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, (Math.sqrt(2.0) / (l / t)))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / math.hypot(1.0, (math.sqrt(2.0) / (l / t)))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) / hypot(1.0, Float64(sqrt(2.0) / Float64(l / t))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, (sqrt(2.0) / (l / t))))); 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[(N[Sqrt[2.0], $MachinePrecision] / N[(l / t), $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{\sqrt{2}}{\frac{\ell}{t}}\right)}\right)
\end{array}
Initial program 82.5%
sqrt-div82.5%
add-sqr-sqrt82.5%
hypot-1-def82.5%
*-commutative82.5%
sqrt-prod82.5%
unpow282.5%
sqrt-prod58.1%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 98.3%
*-commutative98.3%
associate-*l/98.3%
associate-/r/98.3%
Simplified98.3%
unpow298.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
Final simplification98.3%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (hypot 1.0 (* (sqrt 2.0) (/ t l))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / 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 - ((Om / Omc) / (Omc / Om)))) / Math.hypot(1.0, (Math.sqrt(2.0) * (t / l)))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / math.hypot(1.0, (math.sqrt(2.0) * (t / l)))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) / 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) / (Omc / Om)))) / hypot(1.0, (sqrt(2.0) * (t / l))))); 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[(N[Sqrt[2.0], $MachinePrecision] * N[(t / l), $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, \sqrt{2} \cdot \frac{t}{\ell}\right)}\right)
\end{array}
Initial program 82.5%
sqrt-div82.5%
add-sqr-sqrt82.5%
hypot-1-def82.5%
*-commutative82.5%
sqrt-prod82.5%
unpow282.5%
sqrt-prod58.1%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
unpow298.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
Final simplification98.3%
(FPCore (t l Om Omc) :precision binary64 (let* ((t_1 (pow (/ t l) 2.0))) (if (<= t_1 0.2) (asin (- 1.0 t_1)) (asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double t_1 = pow((t / l), 2.0);
double tmp;
if (t_1 <= 0.2) {
tmp = asin((1.0 - t_1));
} 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) :: t_1
real(8) :: tmp
t_1 = (t / l) ** 2.0d0
if (t_1 <= 0.2d0) then
tmp = asin((1.0d0 - t_1))
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 t_1 = Math.pow((t / l), 2.0);
double tmp;
if (t_1 <= 0.2) {
tmp = Math.asin((1.0 - t_1));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = math.pow((t / l), 2.0) tmp = 0 if t_1 <= 0.2: tmp = math.asin((1.0 - t_1)) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) t_1 = Float64(t / l) ^ 2.0 tmp = 0.0 if (t_1 <= 0.2) tmp = asin(Float64(1.0 - t_1)); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = (t / l) ^ 2.0; tmp = 0.0; if (t_1 <= 0.2) tmp = asin((1.0 - t_1)); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$1, 0.2], N[ArcSin[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{t}{\ell}\right)}^{2}\\
\mathbf{if}\;t_1 \leq 0.2:\\
\;\;\;\;\sin^{-1} \left(1 - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (pow.f64 (/.f64 t l) 2) < 0.20000000000000001Initial program 97.1%
sqrt-div97.1%
add-sqr-sqrt97.1%
hypot-1-def97.1%
*-commutative97.1%
sqrt-prod97.1%
unpow297.1%
sqrt-prod66.5%
add-sqr-sqrt97.1%
Applied egg-rr97.1%
Taylor expanded in t around 0 97.1%
*-commutative97.1%
associate-*l/97.1%
associate-/r/97.1%
Simplified97.1%
Taylor expanded in Om around 0 80.9%
associate-/l*80.9%
unpow280.9%
rem-square-sqrt80.9%
associate-/r/80.9%
Simplified80.9%
Taylor expanded in t around 0 80.9%
mul-1-neg80.9%
unsub-neg80.9%
unpow280.9%
unpow280.9%
times-frac94.1%
unpow294.1%
Simplified94.1%
if 0.20000000000000001 < (pow.f64 (/.f64 t l) 2) Initial program 68.6%
sqrt-div68.6%
add-sqr-sqrt68.6%
hypot-1-def68.6%
*-commutative68.6%
sqrt-prod68.5%
unpow268.5%
sqrt-prod50.0%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
Taylor expanded in t around 0 99.5%
*-commutative99.5%
associate-*l/99.4%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in Om around 0 50.3%
associate-/l*50.3%
unpow250.3%
rem-square-sqrt50.3%
associate-/r/50.3%
Simplified50.3%
Taylor expanded in t around inf 68.3%
Final simplification80.9%
(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 82.5%
sqrt-div82.5%
add-sqr-sqrt82.5%
hypot-1-def82.5%
*-commutative82.5%
sqrt-prod82.5%
unpow282.5%
sqrt-prod58.1%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 98.3%
*-commutative98.3%
associate-*l/98.3%
associate-/r/98.3%
Simplified98.3%
Taylor expanded in Om around 0 65.2%
associate-/l*65.2%
unpow265.2%
rem-square-sqrt65.3%
associate-/r/65.3%
Simplified65.3%
sqrt-div65.3%
metadata-eval65.3%
add-sqr-sqrt65.3%
hypot-1-def65.3%
*-commutative65.3%
sqrt-prod65.3%
sqrt-div68.3%
unpow268.3%
sqrt-prod46.9%
add-sqr-sqrt80.5%
unpow280.5%
sqrt-prod47.7%
add-sqr-sqrt97.4%
Applied egg-rr97.4%
associate-*r/97.4%
associate-*l/97.4%
*-commutative97.4%
Simplified97.4%
Final simplification97.4%
(FPCore (t l Om Omc) :precision binary64 (asin (/ 1.0 (hypot 1.0 (* (sqrt 2.0) (/ t l))))))
double code(double t, double l, double Om, double Omc) {
return asin((1.0 / hypot(1.0, (sqrt(2.0) * (t / l)))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((1.0 / Math.hypot(1.0, (Math.sqrt(2.0) * (t / l)))));
}
def code(t, l, Om, Omc): return math.asin((1.0 / math.hypot(1.0, (math.sqrt(2.0) * (t / l)))))
function code(t, l, Om, Omc) return asin(Float64(1.0 / hypot(1.0, Float64(sqrt(2.0) * Float64(t / l))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((1.0 / hypot(1.0, (sqrt(2.0) * (t / l))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(1.0 / 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{1}{\mathsf{hypot}\left(1, \sqrt{2} \cdot \frac{t}{\ell}\right)}\right)
\end{array}
Initial program 82.5%
sqrt-div82.5%
add-sqr-sqrt82.5%
hypot-1-def82.5%
*-commutative82.5%
sqrt-prod82.5%
unpow282.5%
sqrt-prod58.1%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 98.3%
*-commutative98.3%
associate-*l/98.3%
associate-/r/98.3%
Simplified98.3%
Taylor expanded in Om around 0 65.2%
associate-/l*65.2%
unpow265.2%
rem-square-sqrt65.3%
associate-/r/65.3%
Simplified65.3%
sqrt-div65.3%
metadata-eval65.3%
add-sqr-sqrt65.3%
hypot-1-def65.3%
*-commutative65.3%
sqrt-prod65.3%
sqrt-div68.3%
unpow268.3%
sqrt-prod46.9%
add-sqr-sqrt80.5%
unpow280.5%
sqrt-prod47.7%
add-sqr-sqrt97.4%
Applied egg-rr97.4%
Final simplification97.4%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -4e+18)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 0.0005)
(asin (sqrt (+ 1.0 (+ 1.0 (- -1.0 (/ (/ Om Omc) (/ Omc Om)))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -4e+18) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 0.0005) {
tmp = asin(sqrt((1.0 + (1.0 + (-1.0 - ((Om / Omc) / (Omc / Om)))))));
} 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 / l) <= (-4d+18)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 0.0005d0) then
tmp = asin(sqrt((1.0d0 + (1.0d0 + ((-1.0d0) - ((om / omc) / (omc / om)))))))
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 / l) <= -4e+18) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin(Math.sqrt((1.0 + (1.0 + (-1.0 - ((Om / Omc) / (Omc / Om)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -4e+18: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 0.0005: tmp = math.asin(math.sqrt((1.0 + (1.0 + (-1.0 - ((Om / Omc) / (Omc / Om))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -4e+18) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 0.0005) tmp = asin(sqrt(Float64(1.0 + Float64(1.0 + Float64(-1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -4e+18) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 0.0005) tmp = asin(sqrt((1.0 + (1.0 + (-1.0 - ((Om / Omc) / (Omc / Om))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -4e+18], 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[(1.0 + N[(-1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -4 \cdot 10^{+18}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 + \left(1 + \left(-1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e18Initial program 64.6%
sqrt-div64.6%
add-sqr-sqrt64.6%
hypot-1-def64.6%
*-commutative64.6%
sqrt-prod64.6%
unpow264.6%
sqrt-prod0.0%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
Taylor expanded in t around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in Om around 0 51.3%
associate-/l*51.2%
unpow251.2%
rem-square-sqrt51.3%
associate-/r/51.3%
Simplified51.3%
Taylor expanded in t around -inf 99.5%
associate-*r/99.5%
mul-1-neg99.5%
Simplified99.5%
if -4e18 < (/.f64 t l) < 5.0000000000000001e-4Initial program 97.1%
Taylor expanded in t around 0 82.5%
unpow282.5%
unpow282.5%
times-frac94.2%
unpow294.2%
Simplified94.2%
expm1-log1p-u94.2%
expm1-udef94.2%
log1p-udef94.2%
add-exp-log94.2%
Applied egg-rr94.2%
unpow297.2%
clear-num97.2%
un-div-inv97.2%
Applied egg-rr94.2%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 71.9%
sqrt-div71.9%
add-sqr-sqrt71.9%
hypot-1-def71.9%
*-commutative71.9%
sqrt-prod71.7%
unpow271.7%
sqrt-prod99.2%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
Taylor expanded in t around 0 99.5%
*-commutative99.5%
associate-*l/99.4%
associate-/r/99.4%
Simplified99.4%
Taylor expanded in Om around 0 48.6%
associate-/l*48.6%
unpow248.6%
rem-square-sqrt48.6%
associate-/r/48.6%
Simplified48.6%
Taylor expanded in t around inf 98.0%
Final simplification96.5%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+125)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 1e+82)
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+125) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 1e+82) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} 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 / l) <= (-1d+125)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 1d+82) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+125) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 1e+82) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+125: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 1e+82: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+125) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 1e+82) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+125) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 1e+82) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+125], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+82], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+125}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+82}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -9.9999999999999992e124Initial program 52.7%
sqrt-div52.7%
add-sqr-sqrt52.7%
hypot-1-def52.7%
*-commutative52.7%
sqrt-prod52.7%
unpow252.7%
sqrt-prod0.0%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
Taylor expanded in t around 0 99.6%
*-commutative99.6%
associate-*l/99.4%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in Om around 0 52.7%
associate-/l*52.7%
unpow252.7%
rem-square-sqrt52.7%
associate-/r/52.7%
Simplified52.7%
Taylor expanded in t around -inf 99.7%
associate-*r/99.7%
mul-1-neg99.7%
Simplified99.7%
if -9.9999999999999992e124 < (/.f64 t l) < 9.9999999999999996e81Initial program 97.5%
sqrt-div97.6%
add-sqr-sqrt97.6%
hypot-1-def97.6%
*-commutative97.6%
sqrt-prod97.5%
unpow297.5%
sqrt-prod61.0%
add-sqr-sqrt97.5%
Applied egg-rr97.5%
Taylor expanded in t around 0 97.5%
*-commutative97.5%
associate-*l/97.5%
associate-/r/97.5%
Simplified97.5%
Taylor expanded in Om around 0 74.5%
associate-/l*74.5%
unpow274.5%
rem-square-sqrt74.5%
associate-/r/74.5%
Simplified74.5%
add-sqr-sqrt74.5%
sqrt-div74.5%
unpow274.5%
sqrt-prod41.6%
add-sqr-sqrt71.7%
unpow271.7%
sqrt-prod35.7%
add-sqr-sqrt69.1%
sqrt-div69.1%
unpow269.1%
sqrt-prod41.0%
add-sqr-sqrt77.7%
unpow277.7%
sqrt-prod47.7%
add-sqr-sqrt96.1%
Applied egg-rr96.1%
if 9.9999999999999996e81 < (/.f64 t l) Initial program 65.9%
sqrt-div65.9%
add-sqr-sqrt65.9%
hypot-1-def65.9%
*-commutative65.9%
sqrt-prod65.8%
unpow265.8%
sqrt-prod99.4%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 99.6%
*-commutative99.6%
associate-*l/99.6%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in Om around 0 50.0%
associate-/l*50.0%
unpow250.0%
rem-square-sqrt50.1%
associate-/r/50.1%
Simplified50.1%
Taylor expanded in t around inf 99.5%
Final simplification97.5%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -4e+18)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 0.0005)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -4e+18) {
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 * 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 / l) <= (-4d+18)) 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 * 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 / l) <= -4e+18) {
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.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -4e+18: 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.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -4e+18) tmp = asin(Float64(Float64(l * Float64(-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 * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -4e+18) 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 * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -4e+18], 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[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -4 \cdot 10^{+18}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{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{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e18Initial program 64.6%
sqrt-div64.6%
add-sqr-sqrt64.6%
hypot-1-def64.6%
*-commutative64.6%
sqrt-prod64.6%
unpow264.6%
sqrt-prod0.0%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
Taylor expanded in t around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in Om around 0 51.3%
associate-/l*51.2%
unpow251.2%
rem-square-sqrt51.3%
associate-/r/51.3%
Simplified51.3%
Taylor expanded in t around -inf 99.5%
associate-*r/99.5%
mul-1-neg99.5%
Simplified99.5%
if -4e18 < (/.f64 t l) < 5.0000000000000001e-4Initial program 97.1%
Taylor expanded in t around 0 82.5%
unpow282.5%
unpow282.5%
times-frac94.2%
unpow294.2%
Simplified94.2%
unpow297.2%
clear-num97.2%
un-div-inv97.2%
Applied egg-rr94.2%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 71.9%
sqrt-div71.9%
add-sqr-sqrt71.9%
hypot-1-def71.9%
*-commutative71.9%
sqrt-prod71.7%
unpow271.7%
sqrt-prod99.2%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
Taylor expanded in t around 0 99.5%
*-commutative99.5%
associate-*l/99.4%
associate-/r/99.4%
Simplified99.4%
Taylor expanded in Om around 0 48.6%
associate-/l*48.6%
unpow248.6%
rem-square-sqrt48.6%
associate-/r/48.6%
Simplified48.6%
Taylor expanded in t around inf 98.0%
Final simplification96.5%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -4e+18)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 0.0005)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -4e+18) {
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 * 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 / l) <= (-4d+18)) 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 * 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 / l) <= -4e+18) {
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.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -4e+18: 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.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -4e+18) tmp = asin(Float64(Float64(l * Float64(-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 * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -4e+18) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 0.0005) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -4e+18], 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[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -4 \cdot 10^{+18}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{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{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4e18Initial program 64.6%
sqrt-div64.6%
add-sqr-sqrt64.6%
hypot-1-def64.6%
*-commutative64.6%
sqrt-prod64.6%
unpow264.6%
sqrt-prod0.0%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
Taylor expanded in t around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in Om around 0 51.3%
associate-/l*51.2%
unpow251.2%
rem-square-sqrt51.3%
associate-/r/51.3%
Simplified51.3%
Taylor expanded in t around -inf 99.5%
associate-*r/99.5%
mul-1-neg99.5%
Simplified99.5%
if -4e18 < (/.f64 t l) < 5.0000000000000001e-4Initial program 97.1%
sqrt-div97.2%
add-sqr-sqrt97.1%
hypot-1-def97.1%
*-commutative97.1%
sqrt-prod97.2%
unpow297.2%
sqrt-prod65.2%
add-sqr-sqrt97.2%
Applied egg-rr97.2%
Taylor expanded in t around 0 97.2%
*-commutative97.2%
associate-*l/97.2%
associate-/r/97.2%
Simplified97.2%
Taylor expanded in Om around 0 81.1%
associate-/l*81.1%
unpow281.1%
rem-square-sqrt81.1%
associate-/r/81.1%
Simplified81.1%
Taylor expanded in t around 0 80.3%
mul-1-neg80.3%
unsub-neg80.3%
unpow280.3%
unpow280.3%
times-frac93.0%
unpow293.0%
Simplified93.0%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 71.9%
sqrt-div71.9%
add-sqr-sqrt71.9%
hypot-1-def71.9%
*-commutative71.9%
sqrt-prod71.7%
unpow271.7%
sqrt-prod99.2%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
Taylor expanded in t around 0 99.5%
*-commutative99.5%
associate-*l/99.4%
associate-/r/99.4%
Simplified99.4%
Taylor expanded in Om around 0 48.6%
associate-/l*48.6%
unpow248.6%
rem-square-sqrt48.6%
associate-/r/48.6%
Simplified48.6%
Taylor expanded in t around inf 98.0%
Final simplification95.9%
(FPCore (t l Om Omc) :precision binary64 (if (<= t 3.9e+124) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 3.9e+124) {
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 <= 3.9d+124) 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 <= 3.9e+124) {
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 <= 3.9e+124: 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 <= 3.9e+124) tmp = asin(1.0); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= 3.9e+124) tmp = asin(1.0); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[t, 3.9e+124], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.9 \cdot 10^{+124}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if t < 3.9e124Initial program 83.8%
Taylor expanded in t around 0 52.3%
unpow252.3%
unpow252.3%
times-frac59.5%
unpow259.5%
Simplified59.5%
expm1-log1p-u59.5%
expm1-udef59.5%
log1p-udef59.5%
add-exp-log59.5%
Applied egg-rr59.5%
Taylor expanded in Om around 0 58.4%
if 3.9e124 < t Initial program 77.9%
sqrt-div77.9%
add-sqr-sqrt77.9%
hypot-1-def77.9%
*-commutative77.9%
sqrt-prod77.8%
unpow277.8%
sqrt-prod44.4%
add-sqr-sqrt99.3%
Applied egg-rr99.3%
Taylor expanded in t around 0 99.2%
*-commutative99.2%
associate-*l/99.2%
associate-/r/99.2%
Simplified99.2%
Taylor expanded in Om around 0 60.8%
associate-/l*60.8%
unpow260.8%
rem-square-sqrt60.7%
associate-/r/60.7%
Simplified60.7%
Taylor expanded in t around inf 77.4%
Final simplification62.6%
(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 82.5%
Taylor expanded in t around 0 42.8%
unpow242.8%
unpow242.8%
times-frac48.7%
unpow248.7%
Simplified48.7%
expm1-log1p-u48.7%
expm1-udef48.7%
log1p-udef48.7%
add-exp-log48.7%
Applied egg-rr48.7%
Taylor expanded in Om around 0 47.8%
Final simplification47.8%
herbie shell --seed 2023339
(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)))))))