From 11da511c784eca003deb90c23570f0873954e0de Mon Sep 17 00:00:00 2001 From: Duncan Wilkie Date: Sat, 18 Nov 2023 06:11:09 -0600 Subject: Initial commit. --- ic-reals-6.3/math-lib/asin_R.c~ | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 ic-reals-6.3/math-lib/asin_R.c~ (limited to 'ic-reals-6.3/math-lib/asin_R.c~') diff --git a/ic-reals-6.3/math-lib/asin_R.c~ b/ic-reals-6.3/math-lib/asin_R.c~ new file mode 100644 index 0000000..009bcf2 --- /dev/null +++ b/ic-reals-6.3/math-lib/asin_R.c~ @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2000, Imperial College + * + * This file is part of the Imperial College Exact Real Arithmetic Library. + * See the copyright notice included in the distribution for conditions + * of use. + */ + +#include +#include "real.h" + +/* + * asin(x) = atan(x/sqrt(1-x^2)) + */ +Real +asin_R(Real x) +{ + Real r, s; + + r = mul_R_R(x, x); + r = sub_Int_R(1, r); + r = sqrt_R(r); + r = div_R_R(x, r); + r = atan_R(r); + return r; +} -- cgit v1.2.3