기본 콘텐츠로 건너뛰기

Bash compare floating point numbers

Bash에서 실수 비교: bc -l

if (( $( echo "1.0 > 1.1" | bc -l ) )) ; then
# ...
fi

참조: https://stackoverflow.com/questions/8654051/how-can-i-compare-two-floating-point-numbers-in-bash


댓글