Strange math behaviour... could someone explain this ?

Richard Gaskin ambassador at fourthworld.com
Sat Oct 8 22:47:16 EDT 2005


Alex Tweedly wrote:
> Richard Gaskin wrote:
>
>> Computers are the servants of humans, not the other way around.
> 
> You wish !!

I know you well enough to know you're just having fun there, but because 
this anomaly has been accepted as "normal" in microprocessor design I 
hope the readers here will indulge this brief philosophical rant on its 
implications for the survival of mankind:

James Gosling and others believe that the biggest long-term threat to 
the survival of our species isn't meteors, or terrorists, or SARS, or 
even Halliburton, but something much smaller:  nanobots.

I wonder what happens if we start accepting such blatant logical errors 
for simple arithmetic, and then build ever more complex systems on top 
of that, and then build complex AI systems on top of those, and then put 
that known-to-be-faulty AI into nanobots.

I believe the difference between accepting "179" from a computer when we 
all know the answer is "180" and accidentally enabling a robot to 
violate Asimov's Three Laws is one of degrees, not absolutes.

The time for microprocessor manufactures to get serious about the little 
things is today, if not yesterday.

The alternative is as world of deeply layered complex systems built on 
known inconsistencies, where the smallest things may become our biggest 
problem.


> You might get Rev to introduce a workaround (e.g. by changing the 
> effective meaning of trunc() to be "round at some ;eve; of precision 
> that will do what I *want*, and then truncate", as Mark suggested) - but 
> I fear that only leads to someone, some day in the future open a BZ to 
> say that Rev gets a different answer to the same calculation than 95% of 
> the installed base of  languages).

Maybe not.  We know, for example, that Excel already accounts for this 
in its own code, correcting for the critical failure of the 
microprocessor designers.  Anyone have time to check if RB, VB, and 
others do too?

I just checked HyperCard and it allows the wrong answer (one more reason 
we can be glad it died with dignity while it could).

Way back when there was a question about date calculations, and we found 
a similar problem with the Win OS, and a similar message from RunRev 
about how it's an OS limitation.  But on further investigation we 
discovered that RB, VB, VBA, and many others had long been correcting 
for that OS limitation on their own languages.

If we find that other high-level systems follow Excel's lead on this 
one, perhaps there's an even stronger argument to asking Rev to account 
for this processor failure (that is, in addition to the answer being wrong).

> Bring BCD , that's what I say .... :-)

"BCD"?

--
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list