Subj : Re: Homemade float adder? To : comp.programming From : mensanator@aol.com Date : Tue Sep 13 2005 07:28 pm Ben Pfaff wrote: > "dave" writes: > > > This is my problem, I have 2 strings that represent floats. > > I want to add them together. > > Should I look at using Cint to convert each character in the string and add? > > Or is there I better way? > > I can't convert them to floats because the precision must be kept to 300 > > digits after the decimal. > > Any clues would be most helpful? > > I would use an arbitrary-precision math library, such as GNU gmp. > There is little or no benefit to writing your own routines, > except for educational purposes. I agree. I actually did what you propose only I used strings to represent arbitrary precision binary numbers. I needed the every bit of a 250,000 bit number. It worked fine but was s...l...o...w. I dropped it like a live grenade once I got my hands on GMP. > -- > Aim to please, shoot to kill. .