diff --git a/libc/math/lib_asin.c b/libc/math/lib_asin.c index 08a2dc9573..2f45a24a1d 100644 --- a/libc/math/lib_asin.c +++ b/libc/math/lib_asin.c @@ -3,7 +3,7 @@ * * This file is a part of NuttX: * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Ported by: Darcy Gong * * It derives from the Rhombs OS math library by Nick Johnson which has @@ -55,7 +55,7 @@ double asin(double x) /* Verify that the input value is in the domain of the function */ - if (x < -1.0 || x > 1.0) + if (x < -1.0 || x > 1.0 || isnan(x)) { return NAN; }