From: Marc Vila-Oliva Date: Thu, 11 Jul 2013 13:01:22 +0000 (+0200) Subject: set bc scale by default to 30 decimals in mergeDosePerEnergy X-Git-Tag: v1.4.0~169^2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b9fe7c71fdc55235d879e019025ae3528440d9aa;p=clitk.git set bc scale by default to 30 decimals in mergeDosePerEnergy --- diff --git a/cluster_tools/mergeDosePerEnergyFile.sh b/cluster_tools/mergeDosePerEnergyFile.sh index f849016..b63c5ae 100755 --- a/cluster_tools/mergeDosePerEnergyFile.sh +++ b/cluster_tools/mergeDosePerEnergyFile.sh @@ -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