Precision and CD's

Richard M. Timoney richardt at maths.tcd.ie
Thu Jul 15 11:21:04 CEST 1999


On Wed, Jul 14, 1999 at 05:02:53PM -0400, Bruce R Miller wrote:

>   bigfloat(1234567890,10,30) => 1234567890 \times 10^{30}
> (ugh) but with a little trivial string processing:
>   bigfloat(1234567890,10,30) => 1.234567890 \times 10^{39}
> is fine.  However:
>   bigfloat(1234567890,16,30) => 1234567890 \times 16^{30}
> (blecch!) and there's not much more you can do (or?)

I think the CD could comment that radix 10 and 16 are preferred
(possibly we could argue for 2 and perhaps 8 as well).

However, James (Davenport) was probably right to allow fairly arbitrary
radix. Radix 0, 1 or negative seem to me not to be desirable or needed.

I think
bigfloat(x1234567890,16,30) => (1 x 16^10 + ..... + x 16^2 + 9 x 16 + 0) x 16^30
makes more sense.

We only allow integers (<OMI>) to be base 10 or 16.

So bigfloat(x1234567890,16,30) could be

<OMOBJ>
  <OMA>
    <OMS cd="bigfloat" name="bigfloat"/>
    <OMI>
	x1234567890
    </OMI>
    <OMI>
	x1e
    </OMI>
    <OMI>
	16
    </OMI>
  <OMA/>
</OMOBJ>

Yours,

Richard


-- 
Richard M. Timoney
		  (richardt at maths.tcd.ie)       Tel. +353-1-608 1196
        School of Mathematics, Trinity College, Dublin 2, Ireland
WWW http://www.maths.tcd.ie/~richardt		FAX  +353-1-608 2282



More information about the Om mailing list