mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2026-09-23 04:14:32 +00:00
Fix asin losing precision near x = 1
This commit is contained in:
@@ -936,7 +936,8 @@
|
||||
Ctor.precision = pr + 6;
|
||||
Ctor.rounding = 1;
|
||||
|
||||
x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();
|
||||
// See https://github.com/MikeMcl/decimal.js/issues/249
|
||||
x = x.div(new Ctor(1).minus(x).times(new Ctor(1).plus(x)).sqrt().plus(1)).atan();
|
||||
|
||||
Ctor.precision = pr;
|
||||
Ctor.rounding = rm;
|
||||
|
||||
Reference in New Issue
Block a user