[Coco] Re: GCC: DFLOAT / DIRECT_PAGE
jdaggett at gate.net
jdaggett at gate.net
Sun Nov 16 21:24:00 EST 2003
Maybe adoption was a wrong word and adaption a better word.
Color basic does some unique things to calculate trancendental functions and some
of the other math. All is predicated on the fact that the end goal is to reach 9 digit
precision which single precision IEEE format cannot do.
I find that the modified Taylor series coefficients intersesting approach. Considering
the constraints of small compact code and reasonable execution time, it is not to
bad an approach. I have seen some interesting approaches before when faced with
code size restrictions. Not all options are available and many assumptions inferred.
Still when the IEEE format is unpacked and denormalized it really does not matter if
you store it sign/exponent/mantissa or mantissa/sign/exponent or
exponent/sign/mantissa or any other combination that may exist.
what matters is the way you process the data.
In Color Basic only FP accumalator 0 and 1 are normalized and stored as
exponent/mantissa/sign.
FP accumalator 2 has only the mantissa. FP accumaltor 3,4, and 5 are stored
packed in five bytes. The fifth byte being the subbyte that is not IEEE standard.
james
On 16 Nov 2003 at 10:04, Theodore A. Evans wrote:
> On 11/16/03, jdaggett at gate.net wrote:
> > What is used in Color Basic is an adoption of IEEE Standard with an
> > added "sub" byte to get 9 decimal digit precision. What it ends up
> > with is 31 bits in the mantissa. 9 decimal digit precision is
> > standard calculator display! The RS Basic had to do this to use a
> > 6th term in the Taylor Series to calculate the trancendetal
> > functions with 9 digit precision. The sixth coefficient of the
> > Taylor Series for the Sine function is one over eleven factorial.
> > That is to small a number to be represented in standard IEEE single
> > precision floating point.
>
> I would hardly call it an adopition of th IEEE standard. It has one
> special vale 0, it does not have values for things like positive and
> negative infinity and not a number which IEEE does. The first bit of
> the Mantissa is overlayed on the sign bit and cannot handle
> denormalized numbers which IEEE floating point can. Finally (going by
> your code for unpacking IEEE doubles) IEEE is sign-exponent-mantissa
> while Color BASIC is sign-mantissa-exponent.
>
> --
> You're my kind of man - bribable.
> Theodore (Alex) Evans | alxevans at concentric.net
> 94-1071 Kepakepa St. Unit #C-1 | http://www.concentric.net/~alxevans
> Waipahu, HI 96797 | ICQ 78089262 x
> | (808) 676-0123 2B v ~2B = ?
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list