11-07-2007
Or look in limits.h yourself for FLT_DIG and DBL_DIG
On POSIX-compliant UNIX boxes POSIX requires those to be at least
FLT_DIG 6
DBL_DIG 15
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to find out the precision on a solaris machine using the unix terminal.
How do I find this out?
Specifics needed:
How are single precision numbers represented (8 or 16 bit)
How are double precision numbers represented (16 or 32 bit)
How are they stored. ( some computers store numbers... (1 Reply)
Discussion started by: Townsfolk
1 Replies
2. UNIX for Dummies Questions & Answers
Hello all,
I don't know ksh that well but when I try to run a simple script using the bc command I get "unexpected '.' ", has any one encouter this or help me. I'm running under redaht 7.2. Here is a simple example:
#!/bin/ksh
#
kilo=`echo "2495 * .25"|bc`
if
then
echo "LESS THEN"... (2 Replies)
Discussion started by: larry
2 Replies
3. Programming
Good morning,
I'm testing the use of ceilf:
/*Filename: str.c*/
#include <stdio.h>
#include <math.h>
int main (void)
{
float ceilf(float x);
int dev=3, result=0;
float tmp = 3.444f;
printf("Result: %f\n",ceilf(tmp));
return 0;
} (1 Reply)
Discussion started by: jonas.gabriel
1 Replies
4. Shell Programming and Scripting
Hi,
I search a unix utility to diff two files, that takes as argument numerical precision as well. If two files are different only in numbers and the difference is less than precision then the result as they are the same.
The precision may be absolute (x1-x2) or relative (x2/x1). Also I need the... (1 Reply)
Discussion started by: stella
1 Replies
5. Shell Programming and Scripting
Hi guys,
I have a single column file with millions of records. I want to count the number of records with 6 decimal precision.
for ex:
1234.12
1234.132
12345.12345
1234.1
1234.13
1234.123456
243435.454555
i need to count the number of records with precision of 6 ( i.e here the... (4 Replies)
Discussion started by: marcus_kosaman
4 Replies
6. Shell Programming and Scripting
hi,
I am a new awk user, now i want to change my result from
1 ca 0.2057422D-01 -0.7179106D-02 -0.5600872D-02
2 o 0.2463722D-01 -0.1554542D-01 0.3110649D-01
3 h -0.1068047D-01 0.1016889D-01 -0.4088230D-02
to
1 ca 0.02057422 -0.007179106 -0.005600872
2 o 0.02463722 -0.01554542 ... (4 Replies)
Discussion started by: wanchem
4 Replies
7. Shell Programming and Scripting
I have a variable in a bash script,
DISTANCE=`awk 'BEGIN {FS="\t"} {if (NR==2) print $3;}' $OUTFILE`
this is a real number taken from a file. The value are like,
0.334561754018
I am using this value in a file name,
'$NAME'_'$DISTANCE'.txt
I would like to shorten the number some to... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
8. Shell Programming and Scripting
Hi All,
could any body let me know.
how to get timestamp with millisecond precision in unix bash shell.
example -->2005-12-06- 4-22-35-195
please help me.
Thanks,
Krupa:wall: (3 Replies)
Discussion started by: krupasindhu18
3 Replies
9. Shell Programming and Scripting
I have a shell script which prints a variable to a text file (sorry if this is the wrong terminology, I'm new to this):
awk `{sumdiffsqt+=$1;stdevt=sqrt(sumdiffsqt/('${n}'-1));errt=stdevt/sqrt('${n}')} END {print '$period',stdevt,errt}' diffsqt.txt >> ${xstation1}_${xstation2}_tt.err
I need... (4 Replies)
Discussion started by: claire.a
4 Replies
mkdep(1) General Commands Manual mkdep(1)
NAME
mkdep - generate dependency list from a C program
SYNOPSIS
mkdep [-a] [-f depend_file] [-p] [cc_options] file...
The mkdep command generates a dependency list file from a C source program.
OPTIONS
Causes mkdep to append its output to the end of the dependency file instead of creating a new dependency file. If the dependency file does
not exist, mkdep creates it. Specifies a name for the dependency file; overrides the default file name Inhibits mkdep from appending the
suffix to the names of object files listed in the output.
DESCRIPTION
The mkdep command uses cc(1) to compile a list of dependency files required to build the named C program file or files. The list is for-
matted so that it is suitable for inclusion into a makefile for make(1). Duplicate dependency listings for a given program are included
only once in the output.
You can specify C compiler options by including them in the command line; mkdep passes all unrecognized options through to the compiler.
By default, mkdep writes to a file named -f option to specify an alternative output file name.
EXAMPLES
The following example illustrates the use of mkdep with the -p option:
% cat hello.c #include <stdio.h>
main() {
printf("%s0","Hello World!"); } % mkdep -p -f hello.depend hello.c % cat hello.depend hello: hello.c /usr/include/stdio.h
/usr/include/standards.h hello: /usr/include/sys/types.h /usr/include/standards.h hello: /usr/include/mach/machine/vm_types.h
/usr/include/sys/limits.h hello: /usr/include/standards.h /usr/include/machine/machlimits.h hello: /usr/include/sys/syslimits.h
/usr/include/float.h hello: /usr/include/standards.h /usr/include/fp_class.h hello: /usr/include/machine/machtime.h
SEE ALSO
Commands: cc(1), make(1)
mkdep(1)