Compare distribution of three random integer algorithm from random bytes.
c
sadrand
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

runplot3d.sh 440B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. usage() {
  3. echo "Usage $0 [max_resolution [min_resolution]]" >&2
  4. }
  5. if [ "$#" -gt 4 ]
  6. then
  7. usage
  8. exit 1
  9. fi
  10. if [ "$1" = "-h" -o "$1" = "--help" ]
  11. then
  12. usage
  13. exit 0
  14. fi
  15. maxres=${1:-100}
  16. minres=${2:-2}
  17. iter=${3:-10000}
  18. if [ "$maxres" -le "$minres" ]
  19. then
  20. usage
  21. exit 2
  22. fi
  23. for resolution in $(seq $minres $maxres)
  24. do
  25. ./sadrand -R -r $resolution -i $iter
  26. echo ''
  27. done | tee /tmp/rnd3d.dat
  28. ./plot3d.gp