]> Creatis software - clitk.git/commitdiff
set bc scale by default to 30 decimals in mergeDosePerEnergy
authorMarc Vila-Oliva <vilaoliva@linux15.dg.creatis.insa-lyon.fr>
Thu, 11 Jul 2013 13:01:22 +0000 (15:01 +0200)
committerMarc Vila-Oliva <vilaoliva@linux15.dg.creatis.insa-lyon.fr>
Thu, 11 Jul 2013 13:01:22 +0000 (15:01 +0200)
cluster_tools/mergeDosePerEnergyFile.sh

index f849016039f754d1e0fdbfbab224559a2edd3701..b63c5aecfe3e9b69de2a9f48a651ec9f6b1065be 100755 (executable)
@@ -26,7 +26,7 @@ do
        V2=`awk -v P=${PARAM} '$3 == P {print $4}' ${IN2} `
         V1=`echo ${V1} | sed -e 's/[eE]+*/\*10\^/'`
         V2=`echo ${V2} | sed -e 's/[eE]+*/\*10\^/'`
-       R=`echo "${V1} + ${V2}" | bc -l`
+       R=`echo "scale=30; ${V1} + ${V2}" | bc -l`
         test -z "${R}" && continue
         echo "# energydose ${PARAM} ${R}" >> ${TMP}
 done