From dc759d31d9953d95185baa1202386a5f52675df0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 23 Jan 2015 17:15:42 -0600 Subject: [PATCH] Math library: Adds support for the expm1 functions: http://pubs.opengroup.org/onlinepubs/009695399/functions/expm1.html. From Brennan Ashton --- include/nuttx/math.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/nuttx/math.h b/include/nuttx/math.h index c97c525fda4..977d8cac9ae 100644 --- a/include/nuttx/math.h +++ b/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 * * 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);