Published
Edited
Jul 3, 2022
2 stars
Insert cell
Insert cell
function arcsine(y) {
let s = sign(y), x = sqrt(1 - y*y) + 1, r, y2, n;
y *= s;
if (y > 1) return NaN;
for (n = 1; ; n *= 2) {
r = sqrt(x*x + y*y);
y2 = y/r, x = x/r + 1;
if (n*(2*y2 - y) < eps) break;
y = y2;
}
return 2*s*n*y2;
}
Insert cell
Insert cell
Math.asin(y)
Insert cell
arcsine(y)
Insert cell
Math.asin(y) - arcsine(y)
Insert cell
eps = 2**-52
Insert cell
sqrt = Math.sqrt
Insert cell
abs = Math.abs
Insert cell
sign = Math.sign
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more