Hi,
I am new to unix and I need help in solving below mentioned issue, really appreciate ur help.
I have a file
sam, john, 2324, 07142007
tom, thomson, 2343, 07142007
john, scott, 2478, 07142007
its a comma delimited file, I need to extract the last column from each line and this... (4 Replies)
Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output files as follows
In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output files as follows
In my above example, each row in file1 has 6 fields and each row in file2 has 3... (1 Reply)
I would like to compare the values of 2nd column of consecutive lines of same file in such a way so that if the difference between first value and second value is more than 100 it should print complete line else ignore line.
Input File
==========
PDB 2500
RTDB 123
RTDB-EAGLE 122
VSCCP 2565... (4 Replies)
Hi,
I have a table in unix from which i want to read the contents line by line, then filter out the values from 6th column one by one and compare it a fixed value.
How to do this? (7 Replies)
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Hi all !
If there is only one single value in a column (e.g. column 1 below), then return this value in the same output column.
If there are several values in the same column (e.g. column 2 below), then return the different values separated by "," in the output.
pipe-separated input:
... (11 Replies)
Dear Unix experts,
I have got a file where I would like to compare the values of second column if first column is same in such a way that the difference between the values is >50. If not, I would like to discard both values.
For example, my input file looks like -
comp275_c0_seq2 73... (7 Replies)
I would like to compare values in column 8, and grep the ones where the different is > 1, columns 1 and 2 are the key for array.
Every 4 rows the records values in columns 1 and 2 changed. Then, the comparison in the column 8 need to be done for the 4 rows everytime columns 1 and 2 changed
... (4 Replies)
Discussion started by: jiam912
4 Replies
LEARN ABOUT BSD
exp
EXP(3M)EXP(3M)NAME
exp, expm1, log, log10, log1p, pow - exponential, logarithm, power
SYNOPSIS
#include <math.h>
double exp(x)
double x;
double expm1(x)
double x;
double log(x)
double x;
double log10(x)
double x;
double log1p(x)
double x;
double pow(x,y)
double x,y;
DESCRIPTION
Exp returns the exponential function of x.
Expm1 returns exp(x)-1 accurately even for tiny x.
Log returns the natural logarithm of x.
Log10 returns the logarithm of x to base 10.
Log1p returns log(1+x) accurately even for tiny x.
Pow(x,y) returns x**y.
ERROR (due to Roundoff etc.)
exp(x), log(x), expm1(x) and log1p(x) are accurate to within an ulp, and log10(x) to within about 2 ulps; an ulp is one Unit in the Last
Place. The error in pow(x,y) is below about 2 ulps when its magnitude is moderate, but increases as pow(x,y) approaches the over/underflow
thresholds until almost as many bits could be lost as are occupied by the floating-point format's exponent field; that is 8 bits for VAX D
and 11 bits for IEEE 754 Double. No such drastic loss has been exposed by testing; the worst errors observed have been below 20 ulps for
VAX D, 300 ulps for IEEE 754 Double. Moderate values of pow are accurate enough that pow(integer,integer) is exact until it is bigger than
2**56 on a VAX, 2**53 for IEEE 754.
DIAGNOSTICS
Exp, expm1 and pow return the reserved operand on a VAX when the correct value would overflow, and they set errno to ERANGE. Pow(x,y)
returns the reserved operand on a VAX and sets errno to EDOM when x < 0 and y is not an integer.
On a VAX, errno is set to EDOM and the reserved operand is returned by log unless x > 0, by log1p unless x > -1.
NOTES
The functions exp(x)-1 and log(1+x) are called expm1 and logp1 in BASIC on the Hewlett-Packard HP-71B and APPLE Macintosh, EXP1 and LN1 in
Pascal, exp1 and log1 in C on APPLE Macintoshes, where they have been provided to make sure financial calculations of ((1+x)**n-1)/x,
namely expm1(n*log1p(x))/x, will be accurate when x is tiny. They also provide accurate inverse hyperbolic functions.
Pow(x,0) returns x**0 = 1 for all x including x = 0, Infinity (not found on a VAX), and NaN (the reserved operand on a VAX). Previous
implementations of pow may have defined x**0 to be undefined in some or all of these cases. Here are reasons for returning x**0 = 1
always:(1) Any program that already tests whether x is zero (or infinite or NaN) before computing x**0 cannot care whether 0**0 = 1 or not. Any
program that depends upon 0**0 to be invalid is dubious anyway since that expression's meaning and, if invalid, its consequences vary
from one computer system to another.(2) Some Algebra texts (e.g. Sigler's) define x**0 = 1 for all x, including x = 0. This is compatible with the convention that accepts
a[0] as the value of polynomial
p(x) = a[0]*x**0 + a[1]*x**1 + a[2]*x**2 +...+ a[n]*x**n
at x = 0 rather than reject a[0]*0**0 as invalid.(3) Analysts will accept 0**0 = 1 despite that x**y can approach anything or nothing as x and y approach 0 independently. The reason for
setting 0**0 = 1 anyway is this:
If x(z) and y(z) are any functions analytic (expandable in power series) in z around z = 0, and if there x(0) = y(0) = 0, then
x(z)**y(z) -> 1 as z -> 0.(4) If 0**0 = 1, then infinity**0 = 1/0**0 = 1 too; and then NaN**0 = 1 too because x**0 = 1 for all finite and infinite x, i.e., indepen-
dently of x.
SEE ALSO math(3M), infnan(3M)AUTHOR
Kwok-Choi Ng, W. Kahan
4th Berkeley Distribution May 27, 1986 EXP(3M)