summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-23 17:15:42 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-23 17:15:42 -0600
commit464482d7b23646a7eabc053cf140c87ca5264a5b (patch)
tree2b1e52838bb9d0635817d7337b74de3efa818006
parent0640867842ca790e7ce9a609a5834690c2abd531 (diff)
downloadnuttx-464482d7b23646a7eabc053cf140c87ca5264a5b.tar.gz
nuttx-464482d7b23646a7eabc053cf140c87ca5264a5b.tar.bz2
nuttx-464482d7b23646a7eabc053cf140c87ca5264a5b.zip
Math library: Adds support for the expm1 functions: http://pubs.opengroup.org/onlinepubs/009695399/functions/expm1.html. From Brennan Ashton
-rw-r--r--nuttx/include/nuttx/math.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/nuttx/include/nuttx/math.h b/nuttx/include/nuttx/math.h
index c97c525fd..977d8cac9 100644
--- a/nuttx/include/nuttx/math.h
+++ b/nuttx/include/nuttx/math.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/math.h
*
- * Copyright (C) 2009, 2012, 2014 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2012, 2014-2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -193,11 +193,14 @@ long double powl (long double b, long double e);
#endif
float expf (float x);
+#define expm1f(x) (expf(x) - 1.0)
#if CONFIG_HAVE_DOUBLE
double exp (double x);
+#define expm1(x) (exp(x) - 1.0)
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
long double expl (long double x);
+#define expm1l(x) (expl(x) - 1.0)
#endif
float logf (float x);