.\" Copyright (c) 1985, 1991 Regents of the University of California. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" $FreeBSD: src/lib/msun/man/exp.3,v 1.24 2008/01/18 21:43:00 das Exp $ .\" $NetBSD: exp.3,v 1.31.14.1 2019/09/05 08:19:40 martin Exp $ .\" .Dd September 2, 2019 .Dt EXP 3 .Os .Sh NAME .Nm exp , .Nm expf , .\" The sorting error is intentional. exp and expf should be adjacent. .Nm exp2 , .Nm exp2f , .\" .Nm exp2l , .Nm expm1 , .Nm expm1f .Nd exponential functions .Sh LIBRARY .Lb libm .Sh SYNOPSIS .In math.h .Ft double .Fn exp "double x" .Ft float .Fn expf "float x" .Ft double .Fn exp2 "double x" .Ft float .Fn exp2f "float x" .\" .Ft long double .\" .Fn exp2l "long double x" .Ft double .Fn expm1 "double x" .Ft float .Fn expm1f "float x" .Sh DESCRIPTION The .Fn exp and .Fn expf functions compute the base .Ms e exponential value of the given argument .Fa x . .Pp The .Fn exp2 and .Fn exp2f .\" .Fn exp2f , .\" and .\" .Fn exp2l functions compute the base 2 exponential of the given argument .Fa x . .Pp The .Fn expm1 and .Fn expm1f functions compute the value exp(x)\-1 accurately even for tiny argument .Fa x . .Sh RETURN VALUES These functions will return the appropriate computation unless an error occurs or an argument is out of range. The functions .Fn exp and .Fn expm1 detect if the computed value will overflow, set the global variable .Va errno to .Er ERANGE and cause a reserved operand fault on a .Tn VAX . .Sh SEE ALSO .Xr math 3 .Sh STANDARDS The .Fn exp function conforms to .St -ansiC . The .Fn exp2 , .Fn exp2f , .Fn expf , .Fn expm1 , and .Fn expm1f functions conform to .St -isoC-99 . .Sh HISTORY The .Fn exp functions appeared in .At v1 . The .Fn expm1 function appeared in .Bx 4.3 .