12fe8fb19SBen Gras.\" Copyright (c) 1985, 1991 Regents of the University of California. 22fe8fb19SBen Gras.\" All rights reserved. 32fe8fb19SBen Gras.\" 42fe8fb19SBen Gras.\" Redistribution and use in source and binary forms, with or without 52fe8fb19SBen Gras.\" modification, are permitted provided that the following conditions 62fe8fb19SBen Gras.\" are met: 72fe8fb19SBen Gras.\" 1. Redistributions of source code must retain the above copyright 82fe8fb19SBen Gras.\" notice, this list of conditions and the following disclaimer. 92fe8fb19SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 102fe8fb19SBen Gras.\" notice, this list of conditions and the following disclaimer in the 112fe8fb19SBen Gras.\" documentation and/or other materials provided with the distribution. 122fe8fb19SBen Gras.\" 3. Neither the name of the University nor the names of its contributors 132fe8fb19SBen Gras.\" may be used to endorse or promote products derived from this software 142fe8fb19SBen Gras.\" without specific prior written permission. 152fe8fb19SBen Gras.\" 162fe8fb19SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 172fe8fb19SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 182fe8fb19SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 192fe8fb19SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 202fe8fb19SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 212fe8fb19SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 222fe8fb19SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 232fe8fb19SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 242fe8fb19SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 252fe8fb19SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 262fe8fb19SBen Gras.\" SUCH DAMAGE. 272fe8fb19SBen Gras.\" 282fe8fb19SBen Gras.\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 292fe8fb19SBen Gras.\" $FreeBSD: src/lib/msun/man/exp.3,v 1.24 2008/01/18 21:43:00 das Exp $ 30*84d9c625SLionel Sambuc.\" $NetBSD: exp.3,v 1.29 2012/11/06 21:43:37 dholland Exp $ 312fe8fb19SBen Gras.\" 32*84d9c625SLionel Sambuc.Dd September 13, 2011 332fe8fb19SBen Gras.Dt EXP 3 342fe8fb19SBen Gras.Os 352fe8fb19SBen Gras.Sh NAME 362fe8fb19SBen Gras.Nm exp , 372fe8fb19SBen Gras.Nm expf , 382fe8fb19SBen Gras.\" The sorting error is intentional. exp and expf should be adjacent. 392fe8fb19SBen Gras.Nm exp2 , 402fe8fb19SBen Gras.Nm exp2f , 412fe8fb19SBen Gras.\" .Nm exp2l , 422fe8fb19SBen Gras.Nm expm1 , 432fe8fb19SBen Gras.Nm expm1f , 44*84d9c625SLionel Sambuc.Nd exponential functions 452fe8fb19SBen Gras.Sh LIBRARY 462fe8fb19SBen Gras.Lb libm 472fe8fb19SBen Gras.Sh SYNOPSIS 482fe8fb19SBen Gras.In math.h 492fe8fb19SBen Gras.Ft double 502fe8fb19SBen Gras.Fn exp "double x" 512fe8fb19SBen Gras.Ft float 522fe8fb19SBen Gras.Fn expf "float x" 532fe8fb19SBen Gras.Ft double 542fe8fb19SBen Gras.Fn exp2 "double x" 552fe8fb19SBen Gras.Ft float 562fe8fb19SBen Gras.Fn exp2f "float x" 572fe8fb19SBen Gras.\" .Ft long double 582fe8fb19SBen Gras.\" .Fn exp2l "long double x" 592fe8fb19SBen Gras.Ft double 602fe8fb19SBen Gras.Fn expm1 "double x" 612fe8fb19SBen Gras.Ft float 622fe8fb19SBen Gras.Fn expm1f "float x" 632fe8fb19SBen Gras.Sh DESCRIPTION 642fe8fb19SBen GrasThe 652fe8fb19SBen Gras.Fn exp 66*84d9c625SLionel Sambucand 672fe8fb19SBen Gras.Fn expf 682fe8fb19SBen Grasfunctions compute the base 692fe8fb19SBen Gras.Ms e 702fe8fb19SBen Grasexponential value of the given argument 712fe8fb19SBen Gras.Fa x . 722fe8fb19SBen Gras.Pp 732fe8fb19SBen GrasThe 74*84d9c625SLionel Sambuc.Fn exp2 752fe8fb19SBen Grasand 762fe8fb19SBen Gras.Fn exp2f 772fe8fb19SBen Gras.\" .Fn exp2f , 782fe8fb19SBen Gras.\" and 792fe8fb19SBen Gras.\" .Fn exp2l 802fe8fb19SBen Grasfunctions compute the base 2 exponential of the given argument 812fe8fb19SBen Gras.Fa x . 822fe8fb19SBen Gras.Pp 832fe8fb19SBen GrasThe 842fe8fb19SBen Gras.Fn expm1 852fe8fb19SBen Grasand 86*84d9c625SLionel Sambuc.Fn expm1f 87*84d9c625SLionel Sambucfunctions compute the value exp(x)\-1 accurately even for tiny argument 88*84d9c625SLionel Sambuc.Fa x . 892fe8fb19SBen Gras.Sh RETURN VALUES 902fe8fb19SBen GrasThese functions will return the appropriate computation unless an error 912fe8fb19SBen Grasoccurs or an argument is out of range. 922fe8fb19SBen GrasThe functions 93*84d9c625SLionel Sambuc.Fn exp 942fe8fb19SBen Grasand 95*84d9c625SLionel Sambuc.Fn expm1 962fe8fb19SBen Grasdetect if the computed value will overflow, 972fe8fb19SBen Grasset the global variable 982fe8fb19SBen Gras.Va errno 992fe8fb19SBen Grasto 1002fe8fb19SBen Gras.Er ERANGE 1012fe8fb19SBen Grasand cause a reserved operand fault on a 1022fe8fb19SBen Gras.Tn VAX . 1032fe8fb19SBen Gras.Sh SEE ALSO 1042fe8fb19SBen Gras.Xr math 3 1052fe8fb19SBen Gras.Sh STANDARDS 1062fe8fb19SBen GrasThe 107*84d9c625SLionel Sambuc.Fn exp 1082fe8fb19SBen Grasfunctions conform to 1092fe8fb19SBen Gras.St -ansiC . 1102fe8fb19SBen GrasThe 1112fe8fb19SBen Gras.Fn exp2 , 1122fe8fb19SBen Gras.Fn exp2f , 1132fe8fb19SBen Gras.Fn expf , 1142fe8fb19SBen Gras.Fn expm1 , 1152fe8fb19SBen Grasand 116*84d9c625SLionel Sambuc.Fn expm1f 1172fe8fb19SBen Grasfunctions conform to 1182fe8fb19SBen Gras.St -isoC-99 . 1192fe8fb19SBen Gras.Sh HISTORY 1202fe8fb19SBen GrasThe 121*84d9c625SLionel Sambuc.Fn exp 1222fe8fb19SBen Grasfunctions appeared in 123*84d9c625SLionel Sambuc.At v6 . 124*84d9c625SLionel SambucThe 125*84d9c625SLionel Sambuc.Fn expm1 126*84d9c625SLionel Sambucfunction appeared in 1272fe8fb19SBen Gras.Bx 4.3 . 128