John Summerfield wrote:


People here have been doing arithmetic using $(()) which is fine, but
only does integers. Sometimes one wants a decimal|floating point, so
this can often be used:

06:55 [EMAIL PROTECTED] ~]$ echo 'scale=4;(14595.470+200.00)/4331.00' | bc
3.4161
06:55 [EMAIL PROTECTED] ~]$

Or, if you prefer RPN:

$ dc -e '4k 14595.470 200.00 + 4331.00 / p'
3.4161
--
Carnegie Institution - At the Frontiers of Science



Larry Ploetz
Systems Administrator
Carnegie Institution of Washington
Department of Plant Biology, TAIR
650 325 1521 x 296 [EMAIL PROTECTED]

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to