Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

log2(3) [netbsd man page]

LOG(3)							   BSD Library Functions Manual 						    LOG(3)

NAME
log, logf, log10, log10f, log1p, log1pf log2, log2f, -- logarithm functions LIBRARY
Math Library (libm, -lm) SYNOPSIS
#include <math.h> double log(double x); float logf(float x); double log10(double x); float log10f(float x); double log1p(double x); float log1pf(float x); double log2(double x); float log2f(float x); DESCRIPTION
The following functions compute logarithms: o The log() and logf() functions return the natural logarithm. o The log10() and log10f() functions return the base 10 logarithm. o The log1p() and log1pf() functions return the natural logarithm of (1.0 + x) accurately even for very small values of x. o The log2() and log2f() functions return the base 2 logarithm. RETURN VALUES
Upon successful completion, the functions return the logarithm of x as descibed above. Otherwise the following may occur: 1. If x is NaN, all functions return NaN. 2. If x is positive infinity, all functions return x. If x is negative infinity, all functions return NaN. 3. If x is +0.0 or -0.0, the log(), log10(), and log2() families return either -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, whereas the log1p() family returns x. 4. If x is +1.0, the log(), log10(), and log2() families return +0.0. If x is -1.0, the log1p() family returns -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL. In addition, on a VAX, errno is set to EDOM and the reserved operand is returned by log() unless x > 0, by log1p() unless x > -1. SEE ALSO
exp(3), ilogb(3), math(3) STANDARDS
The described functions conform to ISO/IEC 9899:1999 (``ISO C99''). HISTORY
The history of the logarithm functions dates back to Version 6 AT&T UNIX. BSD
September 13, 2011 BSD

Check Out this Related Man Page

LOG(3)							   BSD Library Functions Manual 						    LOG(3)

NAME
log, logf, log10, log10f, log1p, log1pf log2, log2f, -- logarithm functions LIBRARY
Math Library (libm, -lm) SYNOPSIS
#include <math.h> double log(double x); float logf(float x); double log10(double x); float log10f(float x); double log1p(double x); float log1pf(float x); double log2(double x); float log2f(float x); DESCRIPTION
The following functions compute logarithms: o The log() and logf() functions return the natural logarithm. o The log10() and log10f() functions return the base 10 logarithm. o The log1p() and log1pf() functions return the natural logarithm of (1.0 + x) accurately even for very small values of x. o The log2() and log2f() functions return the base 2 logarithm. RETURN VALUES
Upon successful completion, the functions return the logarithm of x as descibed above. Otherwise the following may occur: 1. If x is NaN, all functions return NaN. 2. If x is positive infinity, all functions return x. If x is negative infinity, all functions return NaN. 3. If x is +0.0 or -0.0, the log(), log10(), and log2() families return either -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, whereas the log1p() family returns x. 4. If x is +1.0, the log(), log10(), and log2() families return +0.0. If x is -1.0, the log1p() family returns -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL. In addition, on a VAX, errno is set to EDOM and the reserved operand is returned by log() unless x > 0, by log1p() unless x > -1. SEE ALSO
exp(3), ilogb(3), math(3) STANDARDS
The described functions conform to ISO/IEC 9899:1999 (``ISO C99''). HISTORY
The history of the logarithm functions dates back to Version 6 AT&T UNIX. BSD
September 13, 2011 BSD
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sort issue

Hi Guys , Please help me I am having a requirement as below: $ ls -i log* | head 66486532 log1 66486662 log10 66486663 log11 66486664 log12 66486665 log13 66486533 log2 66486534 log3 66486535 log4 66486584 log5 66486590 log6 This id listing the first 10 files starting with log. ... (4 Replies)
Discussion started by: mraghunandanan
4 Replies

2. Shell Programming and Scripting

taking the Log2 values

Hi, I am able to take the log value for the third column of a file using the script below. But I want to take the log2 (not the log). How would I write that? thanks awk 'BEGIN {OFS="\t"} {print $1, $2, log ($3)}' (2 Replies)
Discussion started by: kylle345
2 Replies

3. Shell Programming and Scripting

Alert log not update every time.

My Script . This check log file size every 1 minute. #! /bin/bash logFiles="log1.log log2.log" logLocation="/usr/home/test/log/" sleepTime=60 failMessage=":: Log not running :: Pls Check Service" successMessage="OK" arr=($logFiles) arrlen=${#arr} arrcount=() date for... (0 Replies)
Discussion started by: ooilinlove
0 Replies

4. Shell Programming and Scripting

Tar automation

Hi, i'm new in shell programming, i would like to archive automatically all my log files at the end of each month. My files have this format : 2011.07.log1 2011.07.log2 ... 2011.08.log1 2011.08.log2 ... etc I would like to have an idea about how to do this. Thanks. (2 Replies)
Discussion started by: thedriver
2 Replies