[Sussex] Challenge

Steve Dobson SDobson at manh.com
Wed Apr 30 13:56:02 UTC 2003


Geoff

I've just noticed a mistake in my proof (that's the 
problem with mixing base 2 & 10 together like this):

  0001.0 = 1.0 * 1010^-0001
  1010.0 = 1.0 * 1010^+0001
  0001.0 = 1.0 * 1010^ 0000

Therefore:

  0000.1 * 1010.0 = (1.0 * 1010^-0001) * (1.0 * 10^+0001)
                  = 1.0 * 1010^(-0001 + 0001)
                  = 1.0 * 1010^ 0000

But you saw my approach without seeing the error :-)

Now to the reply.

On 30 April 2003 at 12:31 Geoff Teale wrote:
> > How' that!  Of course the mantissa is always 1.0 and the exponent 
> > is an integer itself so this only works for a limited number of
> > values (but no fiddle factor).
> 
> Good thinking, but that doesn't escape the problem of expressing
> 0.1 in binary, it just sidesteps it.  So, whilst it works logically, 
> it isn't in the spirit of the question - still it shows an interesting 
> way around the problem (for a limited number of cases) so it carries
> some merit.

I'm going to argue that it does represent 0.1(base 10) in binary!  If I
remember my IEEE floating point spec the mantissa is represented as
<mantissa-base-2> * 2^<int-exponent-base02> with the mantissa defined as
always being factional.  Namely that the first bit of a positive number
is always "0" and that the next bit is always "1".  Negative number have
"1" as the first bit of the mantissa.  Zero (which neither a positive
or negative number) is the only number where the first two bits are
zero; thus making zero tests efficient.  In fact the representation was
worked out to make life a bit easier for floating point number functions.

My trick is make it so that the exponent was always equal to one and
changed the mantissa to be an integer power of 1010(base 2) not
10(base 2) to avoid the 1100110011001100... pattern that results.
I assume that the 110011001100 pattern is the challenge.

[Back to base 10 for all number from now on so I don't make any more
silly mistakes] 

Your challenge was to "in base 2 prove that the following base 10
equation is correct: 10 * 0.1 = 1".  In base ten 0.1 can be represent
as: ..., 10.0*10^-2, 1.0*10^-1, 0.1*10^0, 0.01*10*2, ... Neither
is more or less valid than the others and no accuracy is lost in them
either.  I therefore set my floating point number representation to be
1.0 * 10 ^ <int-mantissa>.

I do _not_ offer this number representation to solve the general case
of x * y = z, or for that mater to represent any number as it is clear
limited by my restriction that the mantissa must be equal to 1.0 for
all numbers and the exponent has to be an integer.  The only number
that can be represented in my representation class without loss of
accuracy are powers of 10.  As this includes 10, 1 & 0.1 which were
all I needed for your proof.

As I said: Mine is a point of Horsham Best! [Unless anyone else can offer
a ?better? solution. :-)

Steve




More information about the Sussex mailing list