[Coco] printing out floating point numbers...(only peripherally related to coco)
jdaggett at gate.net
jdaggett at gate.net
Thu Jul 13 08:54:56 EDT 2006
Aarron
Sorry if you are offended. My first impression of someone asking for
mathematical manipulation of two or more 70+ decimal digit precission is
either, one doesn't know what they are asking for or second the orginal
message was a joke. Thus my reply was to honestly figure out which. I
have also gathered that you appear serious. I still do not understand your
need for such precision but then you must have your reasons. I have
worked in engineering for 23 y rs and have done numerous computer
modeling and have yet to find a need to do floating point numbers with that
kind of precission. 245 bits of precision on the mantissa should yield a
decimal fraction to around 70 decimal places. I have yet to see a reall need
to to express a fractional part of 70 decimal places with an exponential
part. Even in measuring distances between quarks do not need this kind of
precission.
But then to each his own. Once you have justified the exponents, the math
is then rather simple. Addition and subtraction, preferably by twos
compliment addition, can be done over a series of additions with carry.
Multiplication can be done by partial products and accumalate the partial
sums to gain the final answer. Division is s bit more touchy. You have to
change the sign of the exponent and substract one. Also the inverse of the
mantissa needs to be calculated and then use multiplication.
Remember that to add and substract FP # you need to have both at the
same exponent. Multiplication and division is not needed.
james
On 12 Jul 2006 at 19:38, Aaron Banerjee wrote:
>
> Quite simple. I'm working with numbers which are in a relatively small
> range, but need a fine degree of precision. As others have mentioned,
> this is sort of an odd size for a float. I wasn't looking for a generic
> super-float. Depending on what you're using it for, 8 bit mantissa and
> 245 bits of precision isn't "absurd" at all.
>
> To everyone except for James, thanks. You've given me a good place to
> start.
> - Aaron
>
> On Wed, 12 Jul 2006 jdaggett at gate.net wrote:
>
> > First off why do you need 245 bits in the mantissa when you limit yourself to only 8
> > bits in the exponent? Do you really need 70+ decimal digit precission when you
> > exponet is limited to 38 places decimal?
> >
> > There is precission and then there is taking precision to nth degree of absurdity. I
> > think 245 bits in the mantissa is fast approaching absurdity with only 8 bits in the
> > exponent.
> >
> > just my opinion
> >
> > james
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.9.10/386 - Release Date: 7/12/2006
>
More information about the Coco
mailing list