Last change
on this file since 466 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
1.0 KB
|
Rev | Line | |
---|
[444] | 1 | |
---|
| 2 | /* @(#)z_log10.c 1.0 98/08/13 */ |
---|
| 3 | /****************************************************************** |
---|
| 4 | * Logarithm |
---|
| 5 | * |
---|
| 6 | * Input: |
---|
| 7 | * x - floating point value |
---|
| 8 | * |
---|
| 9 | * Output: |
---|
| 10 | * logarithm of x |
---|
| 11 | * |
---|
| 12 | * Description: |
---|
| 13 | * This routine returns the logarithm of x (base 10). |
---|
| 14 | * |
---|
| 15 | *****************************************************************/ |
---|
| 16 | |
---|
| 17 | /* |
---|
| 18 | FUNCTION |
---|
| 19 | <<log10>>, <<log10f>>---base 10 logarithms |
---|
| 20 | |
---|
| 21 | INDEX |
---|
| 22 | log10 |
---|
| 23 | INDEX |
---|
| 24 | log10f |
---|
| 25 | |
---|
| 26 | SYNOPSIS |
---|
| 27 | #include <math.h> |
---|
| 28 | double log10(double <[x]>); |
---|
| 29 | float log10f(float <[x]>); |
---|
| 30 | |
---|
| 31 | DESCRIPTION |
---|
| 32 | <<log10>> returns the base 10 logarithm of <[x]>. |
---|
| 33 | It is implemented as <<log(<[x]>) / log(10)>>. |
---|
| 34 | |
---|
| 35 | <<log10f>> is identical, save that it takes and returns <<float>> values. |
---|
| 36 | |
---|
| 37 | RETURNS |
---|
| 38 | <<log10>> and <<log10f>> return the calculated value. |
---|
| 39 | |
---|
| 40 | See the description of <<log>> for information on errors. |
---|
| 41 | |
---|
| 42 | PORTABILITY |
---|
| 43 | <<log10>> is ANSI C. <<log10f>> is an extension. |
---|
| 44 | |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | #include "fdlibm.h" |
---|
| 49 | #include "zmath.h" |
---|
| 50 | |
---|
| 51 | #ifndef _DOUBLE_IS_32BITS |
---|
| 52 | |
---|
| 53 | double |
---|
| 54 | log10 (double x) |
---|
| 55 | { |
---|
| 56 | return (logarithm (x, 1)); |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | #endif /* _DOUBLE_IS_32BITS */ |
---|
Note: See
TracBrowser
for help on using the repository browser.