Subject: | |
From: | |
Reply To: | |
Date: | Sat, 29 Sep 2001 04:00:14 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Dennis Handly <[log in to unmask]> wrote:
>John Clogg ([log in to unmask]) wrote:
>>Another way to look at this is to try to develop an algorithm to convert
>>a string of numerals into a numeric value. The most straightforward way
>>would be to start with the low-order digit and work your way up to the
>>high-order
>
>This is the inefficient way to do this. You start at the high order and
>multiply by the base and go to the right.
That's true if you are working with integers. But if you are working with
floating point values, one should perform a summation of many values (in
this case the total of the value of the digits) beginning with the smallest
values and adding in the largest value last in order to minimize the
accumulation of rounding error in the final result. While it may not be as
critical in a case where each value has an average of order of magnitude
greater value as it would be in a long list of values with a closer average
distribution of magnitude, I expect it would still be the most
straightforward way to keep the rounding error as small as possible.
Neither mechanism has anything to do with what digit is "last". The
concept of "last digit" depends entirely on semantics. The original
question was a good example of schools teaching worthless and confusing
gibberish instead of real understanding. Often I think this happens
because the teacher isn't proficient in their own understanding and are
just trying not to look dumb in front of kids. Too often though I believe
it's because schools teach children to conform more than to think.
Independent thought endangers the power of those who have a vested interest
in the status quo.
-- Jeff Woods
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|