10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have often found bash to be difficult when it comes to floating point numbers. I have data with rows of tab delimited floating point numbers. I need to find the smallest number in each row that is not 0.0. Numbers can be negative and they do not come in any particular order for a given... (9 Replies)
Discussion started by: LMHmedchem
9 Replies
2. Shell Programming and Scripting
Hi all,
I'm struggling :wall: to make a an if statement on two variables in scientific format.
e.g.
a=1.23e+01
b=3.21e+02
I know that it can be done with bc if the variable are not in scientific format.
But what to do in this case???
Thank you, (3 Replies)
Discussion started by: f_o_555
3 Replies
3. UNIX for Advanced & Expert Users
Hi ,
How can I use floating point argument for sleep command in unix.I cannot use usleep as it is not suppported.
Also how can I find out that a file is in use at that particular instant only.(wether it is being read or written) (7 Replies)
Discussion started by: kanus
7 Replies
4. Shell Programming and Scripting
I need to add leading zeros in a floating point numbers.
The length of the number should be 13 including decimal.
The input number is changing so number of leading zeros is not fix.
For example
input output
216.000 000000216.000
1345.000 000001345.000
22345.500 ... (4 Replies)
Discussion started by: reeta_shri
4 Replies
5. Programming
Anyone help me i cant found the error of floating point
if needed, i added the code complete
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
typedef struct
{
int hh;
int mm;
int ss;
char nom;
int punt;
}cancion;
typedef struct... (9 Replies)
Discussion started by: Slasho
9 Replies
6. Shell Programming and Scripting
Hi !
I'm looking for a way to transform certain floating point numbers in a one-line, variable length file to integers.
I can do this in a crude way with sed :
sed -e 's/0\.\(\):/\1:/g' -e 's/0\.0\(\):/\1:/g' -e 's/1\.000:/100:/g' myfile ... but this doesn't handle the rounding correctly.
... (3 Replies)
Discussion started by: jossojjos
3 Replies
7. Shell Programming and Scripting
How can we compare 2 floating point numbers in SHELL script? (11 Replies)
Discussion started by: dearanik
11 Replies
8. Linux
Hi,
I have linux fedora 4 ver., 2.6 kernal. And qmail & mysql & samba servers are already configured on this server.
When I try to install any package like squidguard ,dansguardian,webmin,rsnapshots with command rpm -ivh . It is giving error as “Floating point exception"
Snap View is... (3 Replies)
Discussion started by: ssk01
3 Replies
9. Shell Programming and Scripting
I have a two files
>cat file1
jjjjj 10.345 6.673
ppp 9.000 5.883
>cat file2
mmm 80 10
jjjjj 10.305 6.873
ppp 9.000 5.883
I am reading file 1 line by line , and look for the string jjjj and then read the line in file 2 with jjjj
I want to get the... (5 Replies)
Discussion started by: jojan
5 Replies
10. Shell Programming and Scripting
Does anyone have a simple way of doing floating point ("fp") division? For example, if I divide 3 by 5, I can get 0.6. The built-in calc (`bc`) will perform fp multiplication, but not division, at least not straight-up (i.e., starting bc and just typing in 3/5).
I am trying to do this using... (1 Reply)
Discussion started by: gsatch
1 Replies