xref: /netbsd/lib/libm/man/pow.3 (revision 2449f0da)
1*2449f0daSwiz.\" $NetBSD: pow.3,v 1.2 2015/11/13 09:56:27 wiz Exp $
23262bf79Sjruoho.\"
33262bf79Sjruoho.\" Copyright (c) 2011 Jukka Ruohonen <jruohonen@iki.fi>
43262bf79Sjruoho.\" All rights reserved.
53262bf79Sjruoho.\"
63262bf79Sjruoho.\" Redistribution and use in source and binary forms, with or without
73262bf79Sjruoho.\" modification, are permitted provided that the following conditions
83262bf79Sjruoho.\" are met:
93262bf79Sjruoho.\" 1. Redistributions of source code must retain the above copyright
103262bf79Sjruoho.\"    notice, this list of conditions and the following disclaimer.
113262bf79Sjruoho.\" 2. Redistributions in binary form must reproduce the above copyright
123262bf79Sjruoho.\"    notice, this list of conditions and the following disclaimer in the
133262bf79Sjruoho.\"    documentation and/or other materials provided with the distribution.
143262bf79Sjruoho.\"
153262bf79Sjruoho.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
163262bf79Sjruoho.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
173262bf79Sjruoho.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
183262bf79Sjruoho.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
193262bf79Sjruoho.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
203262bf79Sjruoho.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
213262bf79Sjruoho.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
223262bf79Sjruoho.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
233262bf79Sjruoho.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
243262bf79Sjruoho.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
253262bf79Sjruoho.\" POSSIBILITY OF SUCH DAMAGE.
263262bf79Sjruoho.\"
273262bf79Sjruoho.Dd September 13, 2011
283262bf79Sjruoho.Dt POW 3
293262bf79Sjruoho.Os
303262bf79Sjruoho.Sh NAME
313262bf79Sjruoho.Nm pow ,
323262bf79Sjruoho.Nm powf
333262bf79Sjruoho.Nd power functions
343262bf79Sjruoho.Sh LIBRARY
353262bf79Sjruoho.Lb libm
363262bf79Sjruoho.Sh SYNOPSIS
373262bf79Sjruoho.In math.h
383262bf79Sjruoho.Ft double
393262bf79Sjruoho.Fn pow "double x" "double y"
403262bf79Sjruoho.Ft float
413262bf79Sjruoho.Fn powf "float x" "float y"
423262bf79Sjruoho.Sh DESCRIPTION
433262bf79SjruohoThe
443262bf79Sjruoho.Fn pow
45*2449f0daSwizfamily of functions returns
463262bf79Sjruoho.Fa x
473262bf79Sjruohoraised to the power of
483262bf79Sjruoho.Fa y .
493262bf79Sjruoho.Pp
503262bf79SjruohoIf
513262bf79Sjruoho.Fa x
523262bf79Sjruohois negative and
533262bf79Sjruoho.Fa y
543262bf79Sjruohois not an integer, the global variable
553262bf79Sjruoho.Va errno
563262bf79Sjruohois set to
573262bf79Sjruoho.Er EDOM ,
583262bf79Sjruohoand on
593262bf79Sjruoho.Tn VAX
603262bf79Sjruohoa reserved operand fault is generated.
613262bf79SjruohoA portable application should nevertheless ensure that
623262bf79Sjruoho.Fa y
633262bf79Sjruohois an integer value whenever
643262bf79Sjruoho.Fa x
653262bf79Sjruohois negative.
663262bf79Sjruoho.Sh RETURN VALUES
673262bf79Sjruoho.\"
683262bf79Sjruoho.\" XXX: List also the special return values?
693262bf79Sjruoho.\"
703262bf79SjruohoUpon successful completion, the described functions return
713262bf79Sjruoho.Fa x^y .
723262bf79Sjruoho.Sh SEE ALSO
733262bf79Sjruoho.Xr exp 3 ,
743262bf79Sjruoho.Xr log 3
753262bf79Sjruoho.Sh STANDARDS
763262bf79SjruohoThe described functions conform to
773262bf79Sjruoho.St -isoC-99 .
783262bf79Sjruoho.Sh HISTORY
793262bf79SjruohoThe history of the power functions dates back to
803262bf79Sjruoho.At v6 .
81