comparison tests/test-utils.sh @ 160:94502600a049 powertable

First test of power sequence search. (and add capability to write negative numbers from floatstring)
author mas01cr
date Thu, 01 Nov 2007 15:58:36 +0000
parents e6cdee24d6c3
children e21cc48ddf4d
comparison
equal deleted inserted replaced
159:c47839762aa8 160:94502600a049
28 floatstring() { 28 floatstring() {
29 for arg in "$@"; do 29 for arg in "$@"; do
30 case ${arg} in 30 case ${arg} in
31 0) 31 0)
32 printf "\x00\x00\x00\x00\x00\x00\x00\x00";; 32 printf "\x00\x00\x00\x00\x00\x00\x00\x00";;
33 -0.5)
34 printf "\x00\x00\x00\x00\x00\x00\xe0\xbf";;
33 0.5) 35 0.5)
34 printf "\x00\x00\x00\x00\x00\x00\xe0\x3f";; 36 printf "\x00\x00\x00\x00\x00\x00\xe0\x3f";;
37 -1)
38 printf "\x00\x00\x00\x00\x00\x00\xf0\xbf";;
35 1) 39 1)
36 printf "\x00\x00\x00\x00\x00\x00\xf0\x3f";; 40 printf "\x00\x00\x00\x00\x00\x00\xf0\x3f";;
37 *) 41 *)
38 echo "bad arg to floatstring(): ${arg}" 42 echo "bad arg to floatstring(): ${arg}"
39 exit 1;; 43 exit 1;;