You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
## https://stackoverflow.com/questions/8654051/how-can-i-compare-two-floating-point-numbers-in-bash
##
num1_gt_num2() {
local num1=$1
local num2=$2
local retval=$FALSE
if (( $(echo "$num1 > $num2" | bc -l) )); then
retval=$TRUE
fi
echo $retval
}
num1_lt_num2() {
local num1=$1
local num2=$2
local retval=$FALSE
[[ "$(num1_gt_num2 $num1 $num2)" = "0" ]] && retval=$TRUE
echo $retval
}```