The reason you're getting output like
103 / 103 ! = 1 (==1)
is that the default format used for printing is not showing enough precision; 1 +/- epsilon is getting rounded to 1.
You can either reset $# to something like "%15.12f" or use a printf with an explicit format.
emc
" When in doubt, use brute force." — Ken ThompsonIn reply to Re: Insights sought into floating point division strangeness
by swampyankee
in thread Insights sought into floating point division strangeness
by EvdB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |