Can someone tell me how do I comapre two numbers with the decimals in UNIX shell scripting
I understand "-gt" can be used only for integers
Regards, Giri (4 Replies)
Hi All,
How we can handle decimals in (Float) in UNIX.
a=73
b=5
c=`expr a / b`
i am getting 14 but i need full 14.6 .
Can any one help me pls? (1 Reply)
I need to get 15% of the variable exer1 to be added to other exercises
so far, i've got
exer1=$1
aver=`expr $exer \* .15`
but i keep getting an error that an integer value was expected. Is there anyway around this? (1 Reply)
Hi,
I am trying to find if there is a way to convert regular decimal values to Paced decimal values. I tried to find a c program but I could get a Packed converted to regular decimal not the other way round.
If not unix please let me know if any other progrimming language I can use to do... (2 Replies)
What is the difference between test expr VS .
For example :
if test 5 -eq 6
echo "Wrong"
and
if
echo "Wrong"
bot will give the same output as Wrong.
Now, what is the difference between these two? though they are producing the same result why we need two?
Any answer will be... (2 Replies)
Hello,
I want to run a loop with non-integer values (which I know I can't) so I've created a loop of integers and divided it by 10. However, these values are always rounded down to 1 significant figure. How do I get the script to keep and use the decimal value?
My script is as follows
#... (1 Reply)
Hello...
I am new to unix and I am wondering if in a C-shell script , Are we supposed to use only whole numbers........ for example..if a program needs to calculate the average of some numbers........
@ avg = (($1 +$2 + $3)/3)) is returning a whole number.........How can a decimal be achieved... (1 Reply)
Hi All,
I would like to do the following in the shell script
561.76 to 562
I tried using this echo 'scale=0; 749 * 75 /100 ' | bc
but just returned only 561
Please help me . I appreciate your help
Thanks
rajeevm (13 Replies)
I am trying to get date to display decimal
Desired output 1350386096256.12
I know this can be done with printf, but are not able to make it work.
I have tested this and many otherprintf "%.2f" $(($(date +%s%N)/1000000)) (8 Replies)
Hi Gurus,
I have below sample file, I need find the line which 2rd field has more than 2 decimals.
in sample file, I need to find xyz, 123456.789
abc, 1234.45, def
xyz, 123456.789, xxx
bce, 1234.34, xxx
thanks in advance (13 Replies)
Discussion started by: ken6503
13 Replies
LEARN ABOUT DEBIAN
sla_lin_berr
sla_lin_berr.f(3) LAPACK sla_lin_berr.f(3)NAME
sla_lin_berr.f -
SYNOPSIS
Functions/Subroutines
subroutine sla_lin_berr (N, NZ, NRHS, RES, AYB, BERR)
SLA_LIN_BERR
Function/Subroutine Documentation
subroutine sla_lin_berr (integerN, integerNZ, integerNRHS, real, dimension( n, nrhs )RES, real, dimension( n, nrhs )AYB, real, dimension( nrhs
)BERR)
SLA_LIN_BERR
Purpose:
SLA_LIN_BERR computes componentwise relative backward error from
the formula
max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
where abs(Z) is the componentwise absolute value of the matrix
or vector Z.
Parameters:
N
N is INTEGER
The number of linear equations, i.e., the order of the
matrix A. N >= 0.
NZ
NZ is INTEGER
We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
guard against spuriously zero residuals. Default value is N.
NRHS
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns
of the matrices AYB, RES, and BERR. NRHS >= 0.
RES
RES is REAL array, dimension (N,NRHS)
The residual matrix, i.e., the matrix R in the relative backward
error formula above.
AYB
AYB is REAL array, dimension (N, NRHS)
The denominator in the relative backward error formula above, i.e.,
the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
are from iterative refinement (see sla_gerfsx_extended.f).
BERR
BERR is REAL array, dimension (NRHS)
The componentwise relative backward error from the formula above.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Definition at line 102 of file sla_lin_berr.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.1 Sun May 26 2013 sla_lin_berr.f(3)