mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
Math library: Adds support for the expm1 functions: http://pubs.opengroup.org/onlinepubs/009695399/functions/expm1.html. From Brennan Ashton
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* include/nuttx/math.h
|
* 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>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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
|
#endif
|
||||||
|
|
||||||
float expf (float x);
|
float expf (float x);
|
||||||
|
#define expm1f(x) (expf(x) - 1.0)
|
||||||
#if CONFIG_HAVE_DOUBLE
|
#if CONFIG_HAVE_DOUBLE
|
||||||
double exp (double x);
|
double exp (double x);
|
||||||
|
#define expm1(x) (exp(x) - 1.0)
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||||
long double expl (long double x);
|
long double expl (long double x);
|
||||||
|
#define expm1l(x) (expl(x) - 1.0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float logf (float x);
|
float logf (float x);
|
||||||
|
|||||||
Reference in New Issue
Block a user