fpmath

Perform floating point math.

 

% fpmath.sh --help  

Usage: fpmath.sh 12.44 m 3.14 
arg1 - floating point value 1
arg2 - operation (-,+,d,m) 
arg3 - floating point value 2
d=divide  m=multiply  l=less_than   g=greater_than

% fpmath.sh 2.0 m 7.0 
      14.000000
% fpmath.sh 10.0 d 5.0
      2.000000
% fpmath.sh 2.0 + 4.0 
      6.000000
% fpmath.sh 10.0 - 3.0 
      7.000000
% fpmath.sh 2 g 3 
N
% fpmath.sh 2 l 3 
Y





Back to SCO CODES page