| 1 |
|
|---|
| 2 |
|
|---|
| 3 | /* @(#)w_pow.c 5.2 93/10/01 */
|
|---|
| 4 | /*
|
|---|
| 5 | * ====================================================
|
|---|
| 6 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|---|
| 7 | *
|
|---|
| 8 | * Developed at SunPro, a Sun Microsystems, Inc. business.
|
|---|
| 9 | * Permission to use, copy, modify, and distribute this
|
|---|
| 10 | * software is freely granted, provided that this notice
|
|---|
| 11 | * is preserved.
|
|---|
| 12 | * ====================================================
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | /*
|
|---|
| 16 | FUNCTION
|
|---|
| 17 | <<pow>>, <<powf>>---x to the power y
|
|---|
| 18 | INDEX
|
|---|
| 19 | pow
|
|---|
| 20 | INDEX
|
|---|
| 21 | powf
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 | ANSI_SYNOPSIS
|
|---|
| 25 | #include <math.h>
|
|---|
| 26 | double pow(double <[x]>, double <[y]>);
|
|---|
| 27 | float pow(float <[x]>, float <[y]>);
|
|---|
| 28 |
|
|---|
| 29 | TRAD_SYNOPSIS
|
|---|
| 30 | #include <math.h>
|
|---|
| 31 | double pow(<[x]>, <[y]>);
|
|---|
| 32 | double <[x]>, <[y]>;
|
|---|
| 33 |
|
|---|
| 34 | float pow(<[x]>, <[y]>);
|
|---|
| 35 | float <[x]>, <[y]>;
|
|---|
| 36 |
|
|---|
| 37 | DESCRIPTION
|
|---|
| 38 | <<pow>> and <<powf>> calculate <[x]> raised to the exp1.0nt <[y]>.
|
|---|
| 39 | @tex
|
|---|
| 40 | (That is, $x^y$.)
|
|---|
| 41 | @end tex
|
|---|
| 42 |
|
|---|
| 43 | RETURNS
|
|---|
| 44 | On success, <<pow>> and <<powf>> return the value calculated.
|
|---|
| 45 |
|
|---|
| 46 | When the argument values would produce overflow, <<pow>>
|
|---|
| 47 | returns <<HUGE_VAL>> and set <<errno>> to <<ERANGE>>. If the
|
|---|
|
|---|