Will ADI ever make DSCs?

if you going to the general case why are you limiting BCD to finite numbers?

So what? Most numbers are irrational and many others are

with fixed vs floating point math.

in general, yes, but we are not talking in general, the topic is practical usage of different representation, and how it's specific rounding errors are pertinent (or not) to the application at hand

Reply to
steve
Loading thread data ...

Because those are the only ones that fit on a printout or be represented in core. Infinitely long numbers are unrepresentable in any base.

It takes only a few extra bits to make the rounding epsilon as small as needed. 24 bits represent 999,999 in BCD, but fewer that 20 in binary. The extra 4 bits go a long way toward mitigating any inaccuracy due to rounding.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

I think you have it the wrong way round. Floating point is an artifact of resource limited architectures. Fixed point with enough bits have all the precision and resolution that floating point have, without all of the disadvantages of floating point. In yesteryears systems, it was very important to save RAM, today with multigigabyte memories on home PCs, using 256 bits or more for fixed point representation is not a problem.

Regards Anton Erasmus

Reply to
Anton Erasmus

Anton Erasmus wrote in news: snipped-for-privacy@4ax.com:

There are plenty advantages to floating point. Floating point is a good choice when dealing with large dynamic range. It makes scaling easy. Its much easier to create an rms detector or perform FFTs. Flaoting point building blocks are easy to connect together since you don't have to worry about overflow/underflow in most cases.

Fixed point typically offers better precision. I prefer it for IIR filtering.

In my view (we do build SHARC based products), the best choice is often a processor that does both well. Yopu then pick the format that makes the most sense for the situation. This reduces developement time which for our customers is often the most important factor.

--
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com
Reply to
Al Clark

(snip)

Well, that is true.

In scientific and engineering problems many quantities have a relative uncertainty. The mass of the earth, about 5.9742e24 kg, is known to about 1 part in 10000. The mass of an electron, 9.10938215e-31 kg, is known to about 5 parts in 10**8. There is a factor of about

1e55 between the two, and the smaller one is known more accurately relative to its size. Most mass measurements will have a relative uncertainty somewhere between the 1 in 1e4 and 5 in 1e8 shown above, over a wide range (55 orders of magnitude) shown above. It is quantities like mass, where the uncertainty is, more or less, relative to the size that floating point is designed for.

It would take about 200 bits of fixed point to cover the range between the electron mass and earth mass.

Next consider that one might need to multiply two such quantities, maybe a mass and length both of which could vary over many orders of magnitude and have similar relative uncertainty. The product of two 200 bit values will require 400 bits, where the relative uncertainty of the product will be a little more than the relative uncertainty of the quantities being multiplied.

Floating point has a big advantage for quantities that can vary over many orders of magnitude and have a relative uncertainty that doesn't very so much, and is much smaller than the range of values, and when such are multiplied or divided.

Quantities where the uncertainty stays approximately the same, and tend to vary over a smaller range of magnitude, as financial and typesetting calculations do, are better done in fixed point. I expect my bank balance to be computed to the cent when I have $1 or $1,000,000 in my account.

-- glen

Reply to
glen herrmannsfeldt

(snip)

For FFT, which involves multiplying by fixed constants and addition, the results tend to have absolute uncertainty. A better choice might be to scale the input values based on the magnitude of the largest value, and then do fixed point arithmetic on the result. This is probably more true on processors with multiply-accumulate instructions. Still, it seems to be rarely done, partly because doing scaled fixed point isn't easy with many processors and high-level languages.

-- glen

Reply to
glen herrmannsfeldt

That could still be handled with the 128.128 bit fixed point representation I proposed in an other post.

While it is quite rare to have real word signals that would require more than about 20 bits (maybe 24 bits with audio+attenuator settings) there are still situations, in which the floating point representation will bite you.

If you take samples every microsecond and do summations since system startup (which might be a few years ago), the ordinary 32 bit floating point representation is clearly inadequate, unless you do some intermediate summations e.g. every millisecond, second, hour and month.

Paul

Reply to
Paul Keinanen

There are numerous things to worry about when using floating point. The misconception that one do not have to worry about things is it's biggest disadvantage. In floating point: If one has a big number y, and a very small number x, both of which can be represented in floating point, then there is a whole range of numbers where x+y=y. In fixed point, if one has the range to represent y, and the precision to represent x, then x+y=x+y.

The biggest problem with fixed point is that almost none of the available languages todat supports it.

C should have had a "real" number type, where one could choose whether one wants this "real" number type to be represented in floatin point, or fixed point. i.e. typedef real float, or typedef real double, or typedef real fixed64.64

Fixed point offers consistent precision over it's range. All posible bit patterns are also legal numbers. In floating point a very high percentage of bit patterns are not legal floating point numbers. The fact that the precision also varies over it's range can cause a lot of numeric instability and plain wrong answers when doing calculations.

The effort that has been put into modern floating point hardware has made it very fast. If a 10th of the effort had been put into fixed point hardware, it would beat floating point by quite a margin IMO.

The only real technical reason I can see for having floating point, is to save memory. If memory is not a problem, one can use as many bits as needed for the range, and as many bits as needed for the precision.

Regards Anton Erasmus

Reply to
Anton Erasmus

...

Not just memory, but word width (memory bandwidth). Multiple precision eats time.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

(snip)

There have been way too many machines that did float multiply faster than similar sized fixed multiply.

There are problems, especially where multiply and divide are involved, where floating point is a better choice. Otherwise, yes, it is used in many cases where it isn't the best choice.

-- glen

Reply to
glen herrmannsfeldt

Yes but using 256 bits in a floating point representation is not a problem either on modern machines (both would have to be done with software emulation, since neither is supported by today's hardware).

You seem to be comparing the advantages and disadvantages of the number of bits used in the representation, not fixed vs float representation.

If your preference is to cut 50 sheets of plywood with a handsaw instead of a table saw, that's up to you. Both have their quirks, but most people choose the table saw if it's available.

Reply to
steve

Anton Erasmus wrote in news: snipped-for-privacy@4ax.com:

This is certainly true. This doesn't make floating point processing undesirable. It just points out that there are limitations.

Anton seems to think that to address the more limited dynamic range of typical fixed point numbers that the solution should be 16 byte fixed point. There are many examples where 32 bit floating point is accurate enough and very convenient.

In general it takes longer to code with fixed point. He can complain about high level language support for fixed types, but compilers also have issues when it comes to efficiency.

I agree that floating point is too often viewed the best solution for all problems. As someone who has worked extensively with 16 bit fixed point, I really appreciate having 32 bit fixed point and floating point as single instruction options. It makes most of my programming a lot easier and faster.

In today's world, time-to-market & reduced risk is often the most significant issue with a new design. Modern floating + fixed point DSPs may be the best choice for many applications.

--
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com
Reply to
Al Clark

steve wrote: (snip)

Software emulation is a strange description. Double length fixed point is easily done in directly generated code, as many compilers for 32 bit processors generate such code for 64 bit integers.

They are not independent. For some applications, special purpose processors built with FPGAs can be used to speed up some computations. The pre/post-normalization needed for floating point is very expensive in an FPGA. The result is that floating point add is usually bigger (more expensive) than floating point multiply. On the other hand, large adders are relatively cheap.

-- glen

Reply to
glen herrmannsfeldt

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

...

...

This discussion is rather like the questions "Is a DSP better than a Pentium", Is a Fourier transform better than a DCT", and "Is a motorcycle better than a moving van." I tend to lose patience with those who push their preferred solutions on others without regard to circumstances. The appropriate answer to all those questions is "It depends."

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

Jerry Avins wrote in news:3ZadnVCHxP-nFuvbnZ2dnUVZ snipped-for-privacy@rcn.net:

I have no argument with Jerry's point of view.

I like to think of new devices and technologies as new ingredients. With these new ingredients, I can make a new "soup". Of course, New soup is not always better and soup from old ingredients are still an appropriate choice.

Good engineers look at what they're trying to do, the available resources, economics, and a host of other factors and then execute.

As Jerry states, the best choices are --- It depends!

--
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com
Reply to
Al Clark

Sure Pentium is better.

Is a Fourier transform better than a DCT",

DCT, Fourier and Hartley are just the different marketing names for exactly the same thing.

and "Is a

Sure van is better.

I tend to lose patience with those

The point of the discussion is to prove that you are the tough hacker (because you can code in the fixed point) and the others (who prefer floats) suck. Isn't it?

VLV

Reply to
Vladimir Vassilevsky

That reminds of when Bob Dole was running for president and the "Boxers or Briefs" question popular at the time was posed. Dole's response was, "Depends".

That guy definitely has a sharp sense of humor. Eric Jacobsen Minister of Algorithms Abineau Communications

formatting link

Reply to
Eric Jacobsen

(snipped)

Ha ha ha. Ya' know Eric, you've been pretty darned entertaining lately. What have you been drinkin'?

[-Rick-]
Reply to
Rick Lyons

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.