10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a number, which I want to convert into the nearest floating number upto two places after the decimal point.
1.2346 will become 1.23
1.2356 will become 1.24 .
0.009 will be 0.01
0.001 will be 0.00 or 0.0 (not 0, wnat to keep the decimal... (1 Reply)
Discussion started by: hbar
Anyone help me i cant found the error of floating point
if needed, i added the code complete
typedef struct... (9 Replies)
Discussion started by: Slasho
3. Shell Programming and Scripting
is it not possible to simply di aritmetic without using bc or awk
i have tried folllowing operatrions but they support only integer types plz suggest me code for floating using values stored in the variables.the ans i get is integer and if i input floating values i get error numeric constant... (6 Replies)
Discussion started by: sumit the cool
4. Shell Programming and Scripting
Could any one tell me how to compare to floating point no. using test command. As -eq option works on only intergers.
echo "not equal"
here output will be equal even though no. are unequal.
ravi (1 Reply)
Discussion started by: useless79
I am compiling "HelloWorld" C progam on 32-bit CentOS and i want to execute it on 64-bit CentOS architecture.
For that i copied the a.out file from 32-bit to 64-bit machine, but while executing a.out file on 64bit machine I am getting "Floating point exception error".
But we can run... (3 Replies)
Discussion started by: Mandar123
6. Shell Programming and Scripting
i have some variables say:
I wish to round off these values to :
x = 2 (after rounding off)
y = 4 (after rounding off)
I am stuck.
Please help. (7 Replies)
Discussion started by: damansingh
7. Shell Programming and Scripting
I am trying to write a script to extract multiple sets of data from a chemistry output file. The problem section is in the following format...
Geometry "geometry" -> "geometry"
1 Pd 46.0000 -0.19290971 0.00535260 0.02297606
2 P ... (7 Replies)
Discussion started by: smadonald1
8. Shell Programming and Scripting
I have a file like this
What i want to do is ia have to add all those numbers and put the result in some other file.
Any help pls.
RRK (8 Replies)
Discussion started by: ravi raj kumar
9. Shell Programming and Scripting
hi all, i have the following problem using awk in a script
i want to read the values from a column with real numbers and calculate the mean.the problem is that when i use a statement such as this
num = $4
i cant find a way to convert the variable from string to floating point to perform... (7 Replies)
Discussion started by: kanagias
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