>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

  DS> We won't be using a char-based string math library--it'll all be
  DS> some internal binary format or other. (I can make a good argument
  DS> for it being done with a base 10 exponent rather than a base 2
  DS> one. I can see doing it all in decimal rather than binary, but I
  DS> can't think of a processor newer than the 6502 that does BCD
  DS> math. (Well, OK, I think the System/3x0 processors do--I suppose
  DS> that counts))

there is very neat and fast trick, called excess 3, for doing bcd sum
and difference math with a set of binary words. this means doing 8 bcd
digits at a time with common 32 bit words or 16 digits on alphas/sparc
and itaniums. keeping the number (at least the mantissa) in bcd would
also mean simpler and faster conversions to strings. in any case, when
the bigint/float design starts up, i will jump in with my excess 3
suggestions and help.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html

Reply via email to