home .. forth .. misc mail list archive ..

Integer Maths




Hi none of my cursor keys work at the moment so forgive the mistakes.

I was just thinking last night why we need floating piontg maths.

I realised that our big problem is that we tend to base the computers work
pattern (instruction set) on the human form rather than what is fastest,
like Forth.

Chuck I've read in the past has stated that he did not included floating
piont maths because it wasn't needed, I know what he means.

The amount of chip realestated wasted on floating point operations is
staggering, apart from caching most of the rest goes to this function from
what I've seen.  So what do we do with the floating piont equations in
science, simple work them in interger form and at the end when the result
comes toi the screen translate them to floating piont (Well what I think).

For instance what if we present numbers as fractions (rations) one dleving
into other black arts when the need to be presented?  I was think lasty
night about doing 3 dimensional grapics integerally.  I though up scheemes
for drawing lines etc with integers and then I thought but how do I sczale
them to different screen sizes.  Well the intersting thing is that if I had
a 256 pixel wide screen and wanted to scale to a 16 pixel screen all I would
have to do was drop the lower 4 bits and move the upper ones down.  Now if I
wanted to do anti-aliasing if could use the lower 4 bits to determine the
way the pixel blending in with the surrounding pixels and so forth :).  But
of course this only works easily because they are whole bin ary numbers.

Has anybody out there dwelved into 3-D graphics with integer structures,
that can help me.

I am thinking that ordinary integer maths might be all that is required?


Wayne.
--