
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
(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 83.6%
sqrt-div83.5%
div-inv83.5%
add-sqr-sqrt83.5%
hypot-1-def83.5%
*-commutative83.5%
sqrt-prod83.5%
unpow283.5%
sqrt-prod59.5%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
unpow298.3%
times-frac88.4%
unpow288.4%
unpow288.4%
associate-*r/88.4%
*-rgt-identity88.4%
unpow288.4%
unpow288.4%
times-frac98.3%
unpow298.3%
Simplified98.3%
Final simplification98.3%
(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 83.6%
Taylor expanded in Om around 0 66.2%
unpow266.2%
unpow266.2%
Simplified66.2%
expm1-log1p-u66.2%
expm1-udef58.3%
sqrt-div58.3%
metadata-eval58.3%
+-commutative58.3%
times-frac65.4%
unpow265.4%
fma-udef65.4%
Applied egg-rr65.4%
expm1-def82.9%
expm1-log1p82.9%
fma-udef82.9%
rem-square-sqrt82.8%
unpow282.8%
swap-sqr82.9%
*-commutative82.9%
*-commutative82.9%
+-commutative82.9%
hypot-1-def97.7%
*-commutative97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -5e+153)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= (/ t l) 2e+73)
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ l (* t (sqrt 2.0)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+153) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 2e+73) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin((l / (t * sqrt(2.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 / l) <= (-5d+153)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 2d+73) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin((l / (t * sqrt(2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+153) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 2e+73) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin((l / (t * Math.sqrt(2.0))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -5e+153: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 2e+73: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin((l / (t * math.sqrt(2.0)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -5e+153) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 2e+73) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(l / Float64(t * sqrt(2.0)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -5e+153) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 2e+73) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin((l / (t * sqrt(2.0)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+153], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+73], 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[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+73}:\\
\;\;\;\;\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}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.00000000000000018e153Initial program 51.2%
Taylor expanded in Om around 0 47.8%
unpow247.8%
unpow247.8%
Simplified47.8%
expm1-log1p-u47.8%
expm1-udef47.8%
sqrt-div47.8%
metadata-eval47.8%
+-commutative47.8%
times-frac47.8%
unpow247.8%
fma-udef47.8%
Applied egg-rr47.8%
expm1-def51.3%
expm1-log1p51.3%
fma-udef51.3%
rem-square-sqrt51.2%
unpow251.2%
swap-sqr51.2%
*-commutative51.2%
*-commutative51.2%
+-commutative51.2%
hypot-1-def97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in t around -inf 99.7%
mul-1-neg99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
Simplified99.7%
if -5.00000000000000018e153 < (/.f64 t l) < 1.99999999999999997e73Initial program 98.3%
Taylor expanded in Om around 0 77.4%
unpow277.4%
unpow277.4%
Simplified77.4%
times-frac97.4%
Applied egg-rr97.4%
if 1.99999999999999997e73 < (/.f64 t l) Initial program 54.5%
Taylor expanded in Om around 0 40.9%
unpow240.9%
unpow240.9%
Simplified40.9%
expm1-log1p-u40.9%
expm1-udef28.9%
sqrt-div28.9%
metadata-eval28.9%
+-commutative28.9%
times-frac28.9%
unpow228.9%
fma-udef28.9%
Applied egg-rr28.9%
expm1-def54.4%
expm1-log1p54.4%
fma-udef54.4%
rem-square-sqrt54.3%
unpow254.3%
swap-sqr54.4%
*-commutative54.4%
*-commutative54.4%
+-commutative54.4%
hypot-1-def98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in t around inf 99.6%
Final simplification98.2%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -10.0)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= (/ t l) 0.0001)
(asin (/ 1.0 (+ 1.0 (pow (/ t l) 2.0))))
(asin (/ l (* t (sqrt 2.0)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -10.0) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.0001) {
tmp = asin((1.0 / (1.0 + pow((t / l), 2.0))));
} else {
tmp = asin((l / (t * sqrt(2.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 / l) <= (-10.0d0)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.0001d0) then
tmp = asin((1.0d0 / (1.0d0 + ((t / l) ** 2.0d0))))
else
tmp = asin((l / (t * sqrt(2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -10.0) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.0001) {
tmp = Math.asin((1.0 / (1.0 + Math.pow((t / l), 2.0))));
} else {
tmp = Math.asin((l / (t * Math.sqrt(2.0))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -10.0: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 0.0001: tmp = math.asin((1.0 / (1.0 + math.pow((t / l), 2.0)))) else: tmp = math.asin((l / (t * math.sqrt(2.0)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -10.0) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 0.0001) tmp = asin(Float64(1.0 / Float64(1.0 + (Float64(t / l) ^ 2.0)))); else tmp = asin(Float64(l / Float64(t * sqrt(2.0)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -10.0) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 0.0001) tmp = asin((1.0 / (1.0 + ((t / l) ^ 2.0)))); else tmp = asin((l / (t * sqrt(2.0)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -10.0], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0001], N[ArcSin[N[(1.0 / N[(1.0 + N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -10:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0001:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{1 + {\left(\frac{t}{\ell}\right)}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -10Initial program 71.3%
Taylor expanded in Om around 0 51.4%
unpow251.4%
unpow251.4%
Simplified51.4%
expm1-log1p-u51.4%
expm1-udef35.3%
sqrt-div35.3%
metadata-eval35.3%
+-commutative35.3%
times-frac36.9%
unpow236.9%
fma-udef36.9%
Applied egg-rr36.9%
expm1-def71.3%
expm1-log1p71.3%
fma-udef71.3%
rem-square-sqrt71.1%
unpow271.1%
swap-sqr71.3%
*-commutative71.3%
*-commutative71.3%
+-commutative71.3%
hypot-1-def98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in t around -inf 95.4%
mul-1-neg95.4%
associate-/r*95.3%
distribute-neg-frac95.3%
Simplified95.3%
if -10 < (/.f64 t l) < 1.00000000000000005e-4Initial program 97.9%
Taylor expanded in Om around 0 84.8%
unpow284.8%
unpow284.8%
Simplified84.8%
expm1-log1p-u84.8%
expm1-udef84.8%
sqrt-div84.8%
metadata-eval84.8%
+-commutative84.8%
times-frac96.8%
unpow296.8%
fma-udef96.8%
Applied egg-rr96.8%
expm1-def96.8%
expm1-log1p96.8%
fma-udef96.8%
rem-square-sqrt96.8%
unpow296.8%
swap-sqr96.8%
*-commutative96.8%
*-commutative96.8%
+-commutative96.8%
hypot-1-def96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in t around 0 84.8%
associate-*r/84.8%
unpow284.8%
*-commutative84.8%
unpow284.8%
rem-square-sqrt84.8%
associate-*r*84.8%
metadata-eval84.8%
*-lft-identity84.8%
unpow284.8%
times-frac96.4%
unpow296.4%
Simplified96.4%
if 1.00000000000000005e-4 < (/.f64 t l) Initial program 64.6%
Taylor expanded in Om around 0 40.9%
unpow240.9%
unpow240.9%
Simplified40.9%
expm1-log1p-u40.9%
expm1-udef23.4%
sqrt-div23.4%
metadata-eval23.4%
+-commutative23.4%
times-frac25.0%
unpow225.0%
fma-udef25.0%
Applied egg-rr25.0%
expm1-def64.5%
expm1-log1p64.5%
fma-udef64.5%
rem-square-sqrt64.2%
unpow264.2%
swap-sqr64.4%
*-commutative64.4%
*-commutative64.4%
+-commutative64.4%
hypot-1-def99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in t around inf 98.7%
Final simplification96.8%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (* t (sqrt 2.0))))
(if (<= (/ t l) -10.0)
(asin (/ (- l) t_1))
(if (<= (/ t l) 0.0001)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ l t_1))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = t * sqrt(2.0);
double tmp;
if ((t / l) <= -10.0) {
tmp = asin((-l / t_1));
} else if ((t / l) <= 0.0001) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin((l / t_1));
}
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 * sqrt(2.0d0)
if ((t / l) <= (-10.0d0)) then
tmp = asin((-l / t_1))
else if ((t / l) <= 0.0001d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin((l / t_1))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = t * Math.sqrt(2.0);
double tmp;
if ((t / l) <= -10.0) {
tmp = Math.asin((-l / t_1));
} else if ((t / l) <= 0.0001) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin((l / t_1));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = t * math.sqrt(2.0) tmp = 0 if (t / l) <= -10.0: tmp = math.asin((-l / t_1)) elif (t / l) <= 0.0001: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin((l / t_1)) return tmp
function code(t, l, Om, Omc) t_1 = Float64(t * sqrt(2.0)) tmp = 0.0 if (Float64(t / l) <= -10.0) tmp = asin(Float64(Float64(-l) / t_1)); elseif (Float64(t / l) <= 0.0001) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(l / t_1)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = t * sqrt(2.0); tmp = 0.0; if ((t / l) <= -10.0) tmp = asin((-l / t_1)); elseif ((t / l) <= 0.0001) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin((l / t_1)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -10.0], N[ArcSin[N[((-l) / t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0001], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / t$95$1), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
\mathbf{if}\;\frac{t}{\ell} \leq -10:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t_1}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0001:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t_1}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -10Initial program 71.3%
Taylor expanded in Om around 0 51.4%
unpow251.4%
unpow251.4%
Simplified51.4%
expm1-log1p-u51.4%
expm1-udef35.3%
sqrt-div35.3%
metadata-eval35.3%
+-commutative35.3%
times-frac36.9%
unpow236.9%
fma-udef36.9%
Applied egg-rr36.9%
expm1-def71.3%
expm1-log1p71.3%
fma-udef71.3%
rem-square-sqrt71.1%
unpow271.1%
swap-sqr71.3%
*-commutative71.3%
*-commutative71.3%
+-commutative71.3%
hypot-1-def98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in t around -inf 95.4%
mul-1-neg95.4%
Simplified95.4%
if -10 < (/.f64 t l) < 1.00000000000000005e-4Initial program 97.9%
Taylor expanded in Om around 0 84.8%
unpow284.8%
unpow284.8%
Simplified84.8%
Taylor expanded in t around 0 84.8%
mul-1-neg84.8%
unpow284.8%
unpow284.8%
times-frac96.4%
unpow296.4%
unsub-neg96.4%
Simplified96.4%
if 1.00000000000000005e-4 < (/.f64 t l) Initial program 64.6%
Taylor expanded in Om around 0 40.9%
unpow240.9%
unpow240.9%
Simplified40.9%
expm1-log1p-u40.9%
expm1-udef23.4%
sqrt-div23.4%
metadata-eval23.4%
+-commutative23.4%
times-frac25.0%
unpow225.0%
fma-udef25.0%
Applied egg-rr25.0%
expm1-def64.5%
expm1-log1p64.5%
fma-udef64.5%
rem-square-sqrt64.2%
unpow264.2%
swap-sqr64.4%
*-commutative64.4%
*-commutative64.4%
+-commutative64.4%
hypot-1-def99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in t around inf 98.7%
Final simplification96.8%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -10.0)
(asin (/ (/ (- l) t) (sqrt 2.0)))
(if (<= (/ t l) 0.0001)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ l (* t (sqrt 2.0)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -10.0) {
tmp = asin(((-l / t) / sqrt(2.0)));
} else if ((t / l) <= 0.0001) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin((l / (t * sqrt(2.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 / l) <= (-10.0d0)) then
tmp = asin(((-l / t) / sqrt(2.0d0)))
else if ((t / l) <= 0.0001d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin((l / (t * sqrt(2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -10.0) {
tmp = Math.asin(((-l / t) / Math.sqrt(2.0)));
} else if ((t / l) <= 0.0001) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin((l / (t * Math.sqrt(2.0))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -10.0: tmp = math.asin(((-l / t) / math.sqrt(2.0))) elif (t / l) <= 0.0001: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin((l / (t * math.sqrt(2.0)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -10.0) tmp = asin(Float64(Float64(Float64(-l) / t) / sqrt(2.0))); elseif (Float64(t / l) <= 0.0001) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(l / Float64(t * sqrt(2.0)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -10.0) tmp = asin(((-l / t) / sqrt(2.0))); elseif ((t / l) <= 0.0001) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin((l / (t * sqrt(2.0)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -10.0], N[ArcSin[N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0001], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -10:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0001:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -10Initial program 71.3%
Taylor expanded in Om around 0 51.4%
unpow251.4%
unpow251.4%
Simplified51.4%
expm1-log1p-u51.4%
expm1-udef35.3%
sqrt-div35.3%
metadata-eval35.3%
+-commutative35.3%
times-frac36.9%
unpow236.9%
fma-udef36.9%
Applied egg-rr36.9%
expm1-def71.3%
expm1-log1p71.3%
fma-udef71.3%
rem-square-sqrt71.1%
unpow271.1%
swap-sqr71.3%
*-commutative71.3%
*-commutative71.3%
+-commutative71.3%
hypot-1-def98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in t around -inf 95.4%
mul-1-neg95.4%
associate-/r*95.3%
distribute-neg-frac95.3%
Simplified95.3%
if -10 < (/.f64 t l) < 1.00000000000000005e-4Initial program 97.9%
Taylor expanded in Om around 0 84.8%
unpow284.8%
unpow284.8%
Simplified84.8%
Taylor expanded in t around 0 84.8%
mul-1-neg84.8%
unpow284.8%
unpow284.8%
times-frac96.4%
unpow296.4%
unsub-neg96.4%
Simplified96.4%
if 1.00000000000000005e-4 < (/.f64 t l) Initial program 64.6%
Taylor expanded in Om around 0 40.9%
unpow240.9%
unpow240.9%
Simplified40.9%
expm1-log1p-u40.9%
expm1-udef23.4%
sqrt-div23.4%
metadata-eval23.4%
+-commutative23.4%
times-frac25.0%
unpow225.0%
fma-udef25.0%
Applied egg-rr25.0%
expm1-def64.5%
expm1-log1p64.5%
fma-udef64.5%
rem-square-sqrt64.2%
unpow264.2%
swap-sqr64.4%
*-commutative64.4%
*-commutative64.4%
+-commutative64.4%
hypot-1-def99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in t around inf 98.7%
Final simplification96.8%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (* t (sqrt 2.0))))
(if (<= l -1.02e-126)
(asin 1.0)
(if (<= l -1e-310)
(asin (/ (- l) t_1))
(if (<= l 1.75e-18) (asin (/ l t_1)) (asin 1.0))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = t * sqrt(2.0);
double tmp;
if (l <= -1.02e-126) {
tmp = asin(1.0);
} else if (l <= -1e-310) {
tmp = asin((-l / t_1));
} else if (l <= 1.75e-18) {
tmp = asin((l / t_1));
} 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) :: t_1
real(8) :: tmp
t_1 = t * sqrt(2.0d0)
if (l <= (-1.02d-126)) then
tmp = asin(1.0d0)
else if (l <= (-1d-310)) then
tmp = asin((-l / t_1))
else if (l <= 1.75d-18) then
tmp = asin((l / t_1))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = t * Math.sqrt(2.0);
double tmp;
if (l <= -1.02e-126) {
tmp = Math.asin(1.0);
} else if (l <= -1e-310) {
tmp = Math.asin((-l / t_1));
} else if (l <= 1.75e-18) {
tmp = Math.asin((l / t_1));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = t * math.sqrt(2.0) tmp = 0 if l <= -1.02e-126: tmp = math.asin(1.0) elif l <= -1e-310: tmp = math.asin((-l / t_1)) elif l <= 1.75e-18: tmp = math.asin((l / t_1)) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) t_1 = Float64(t * sqrt(2.0)) tmp = 0.0 if (l <= -1.02e-126) tmp = asin(1.0); elseif (l <= -1e-310) tmp = asin(Float64(Float64(-l) / t_1)); elseif (l <= 1.75e-18) tmp = asin(Float64(l / t_1)); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = t * sqrt(2.0); tmp = 0.0; if (l <= -1.02e-126) tmp = asin(1.0); elseif (l <= -1e-310) tmp = asin((-l / t_1)); elseif (l <= 1.75e-18) tmp = asin((l / t_1)); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.02e-126], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, -1e-310], N[ArcSin[N[((-l) / t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.75e-18], N[ArcSin[N[(l / t$95$1), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
\mathbf{if}\;\ell \leq -1.02 \cdot 10^{-126}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t_1}\right)\\
\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{-18}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -1.02000000000000004e-126 or 1.7499999999999999e-18 < l Initial program 90.9%
Taylor expanded in Om around 0 75.8%
unpow275.8%
unpow275.8%
Simplified75.8%
expm1-log1p-u75.8%
expm1-udef70.9%
sqrt-div70.9%
metadata-eval70.9%
+-commutative70.9%
times-frac77.5%
unpow277.5%
fma-udef77.5%
Applied egg-rr77.5%
expm1-def90.3%
expm1-log1p90.3%
fma-udef90.3%
rem-square-sqrt90.2%
unpow290.2%
swap-sqr90.3%
*-commutative90.3%
*-commutative90.3%
+-commutative90.3%
hypot-1-def97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in t around 0 74.1%
if -1.02000000000000004e-126 < l < -9.999999999999969e-311Initial program 75.1%
Taylor expanded in Om around 0 46.7%
unpow246.7%
unpow246.7%
Simplified46.7%
expm1-log1p-u46.7%
expm1-udef38.7%
sqrt-div38.7%
metadata-eval38.7%
+-commutative38.7%
times-frac53.4%
unpow253.4%
fma-udef53.4%
Applied egg-rr53.4%
expm1-def75.1%
expm1-log1p75.0%
fma-udef75.0%
rem-square-sqrt74.8%
unpow274.8%
swap-sqr74.9%
*-commutative74.9%
*-commutative74.9%
+-commutative74.9%
hypot-1-def98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in t around -inf 52.5%
mul-1-neg52.5%
Simplified52.5%
if -9.999999999999969e-311 < l < 1.7499999999999999e-18Initial program 68.8%
Taylor expanded in Om around 0 52.5%
unpow252.5%
unpow252.5%
Simplified52.5%
expm1-log1p-u52.4%
expm1-udef36.0%
sqrt-div36.0%
metadata-eval36.0%
+-commutative36.0%
times-frac39.6%
unpow239.6%
fma-udef39.6%
Applied egg-rr39.6%
expm1-def67.7%
expm1-log1p67.7%
fma-udef67.7%
rem-square-sqrt67.6%
unpow267.6%
swap-sqr67.7%
*-commutative67.7%
*-commutative67.7%
+-commutative67.7%
hypot-1-def96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in t around inf 56.1%
Final simplification66.8%
(FPCore (t l Om Omc) :precision binary64 (if (<= l -3.25e-202) (asin 1.0) (if (<= l 3.5e-19) (asin (* l (/ (sqrt 0.5) t))) (asin 1.0))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -3.25e-202) {
tmp = asin(1.0);
} else if (l <= 3.5e-19) {
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 (l <= (-3.25d-202)) then
tmp = asin(1.0d0)
else if (l <= 3.5d-19) 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 (l <= -3.25e-202) {
tmp = Math.asin(1.0);
} else if (l <= 3.5e-19) {
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 l <= -3.25e-202: tmp = math.asin(1.0) elif l <= 3.5e-19: 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 (l <= -3.25e-202) tmp = asin(1.0); elseif (l <= 3.5e-19) 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 (l <= -3.25e-202) tmp = asin(1.0); elseif (l <= 3.5e-19) tmp = asin((l * (sqrt(0.5) / t))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[l, -3.25e-202], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, 3.5e-19], 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}\;\ell \leq -3.25 \cdot 10^{-202}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq 3.5 \cdot 10^{-19}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -3.24999999999999978e-202 or 3.50000000000000015e-19 < l Initial program 89.5%
Taylor expanded in Om around 0 72.2%
unpow272.2%
unpow272.2%
Simplified72.2%
expm1-log1p-u72.2%
expm1-udef66.0%
sqrt-div66.0%
metadata-eval66.0%
+-commutative66.0%
times-frac74.2%
unpow274.2%
fma-udef74.2%
Applied egg-rr74.2%
expm1-def89.0%
expm1-log1p89.0%
fma-udef89.0%
rem-square-sqrt88.8%
unpow288.8%
swap-sqr89.0%
*-commutative89.0%
*-commutative89.0%
+-commutative89.0%
hypot-1-def97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 70.0%
if -3.24999999999999978e-202 < l < 3.50000000000000015e-19Initial program 70.5%
Taylor expanded in Om around 0 52.9%
unpow252.9%
unpow252.9%
Simplified52.9%
Taylor expanded in t around inf 61.2%
*-commutative61.2%
associate-*l/61.1%
*-commutative61.1%
Simplified61.1%
Final simplification67.2%
(FPCore (t l Om Omc) :precision binary64 (if (<= l -1.02e-199) (asin 1.0) (if (<= l 9.6e-20) (asin (/ l (* t (sqrt 2.0)))) (asin 1.0))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (l <= -1.02e-199) {
tmp = asin(1.0);
} else if (l <= 9.6e-20) {
tmp = asin((l / (t * sqrt(2.0))));
} 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.02d-199)) then
tmp = asin(1.0d0)
else if (l <= 9.6d-20) then
tmp = asin((l / (t * sqrt(2.0d0))))
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.02e-199) {
tmp = Math.asin(1.0);
} else if (l <= 9.6e-20) {
tmp = Math.asin((l / (t * Math.sqrt(2.0))));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if l <= -1.02e-199: tmp = math.asin(1.0) elif l <= 9.6e-20: tmp = math.asin((l / (t * math.sqrt(2.0)))) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (l <= -1.02e-199) tmp = asin(1.0); elseif (l <= 9.6e-20) tmp = asin(Float64(l / Float64(t * sqrt(2.0)))); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (l <= -1.02e-199) tmp = asin(1.0); elseif (l <= 9.6e-20) tmp = asin((l / (t * sqrt(2.0)))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[l, -1.02e-199], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, 9.6e-20], N[ArcSin[N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.02 \cdot 10^{-199}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq 9.6 \cdot 10^{-20}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t \cdot \sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -1.02e-199 or 9.59999999999999971e-20 < l Initial program 89.5%
Taylor expanded in Om around 0 72.2%
unpow272.2%
unpow272.2%
Simplified72.2%
expm1-log1p-u72.2%
expm1-udef66.0%
sqrt-div66.0%
metadata-eval66.0%
+-commutative66.0%
times-frac74.2%
unpow274.2%
fma-udef74.2%
Applied egg-rr74.2%
expm1-def89.0%
expm1-log1p89.0%
fma-udef89.0%
rem-square-sqrt88.8%
unpow288.8%
swap-sqr89.0%
*-commutative89.0%
*-commutative89.0%
+-commutative89.0%
hypot-1-def97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 70.0%
if -1.02e-199 < l < 9.59999999999999971e-20Initial program 70.5%
Taylor expanded in Om around 0 52.9%
unpow252.9%
unpow252.9%
Simplified52.9%
expm1-log1p-u52.9%
expm1-udef41.2%
sqrt-div41.2%
metadata-eval41.2%
+-commutative41.2%
times-frac46.1%
unpow246.1%
fma-udef46.1%
Applied egg-rr46.1%
expm1-def69.7%
expm1-log1p69.6%
fma-udef69.6%
rem-square-sqrt69.5%
unpow269.5%
swap-sqr69.6%
*-commutative69.6%
*-commutative69.6%
+-commutative69.6%
hypot-1-def97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in t around inf 61.3%
Final simplification67.3%
(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.6%
Taylor expanded in Om around 0 66.2%
unpow266.2%
unpow266.2%
Simplified66.2%
expm1-log1p-u66.2%
expm1-udef58.3%
sqrt-div58.3%
metadata-eval58.3%
+-commutative58.3%
times-frac65.4%
unpow265.4%
fma-udef65.4%
Applied egg-rr65.4%
expm1-def82.9%
expm1-log1p82.9%
fma-udef82.9%
rem-square-sqrt82.8%
unpow282.8%
swap-sqr82.9%
*-commutative82.9%
*-commutative82.9%
+-commutative82.9%
hypot-1-def97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in t around 0 53.1%
Final simplification53.1%
herbie shell --seed 2023279
(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)))))))