Re: [LAD] A small article about tools for electronic musicians

From: Tim E. Real <termtech@email-addr-hidden>
Date: Sun May 02 2010 - 00:21:41 EEST

On May 1, 2010 04:19:22 pm you wrote:
> On Sat, May 1, 2010 at 11:57 AM, Tim E. Real <termtech@email-addr-hidden> wrote:
> > Can I get some comments on an issue nagging me for years:
> > Maybe I never learned some golden rule about floating point,
> > please correct me if I'm ignorant of some crucial technique or fact
> > which would help: ...
>
> Arbitrary precision arithmetic will take care of all these problems. At a
> great cost to performance:
> http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic .
>
> It's part of the Java Language:
> http://java.sun.com/j2se/1.4.2/docs/api/java/math/package-summary.html
>
> Provides classes for performing arbitrary-precision integer arithmetic
>
> > (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
> > BigInteger is analogous to Java's primitive integer types except that it
> > provides arbitrary precision, hence operations on BigIntegers do not
> > overflow or lose precision. In addition to standard arithmetic
> > operations, BigInteger provides modular arithmetic, GCD calculation,
> > primality testing, prime generation, bit manipulation, and a few other
> > miscellaneous operations. BigDecimal provides arbitrary-precision signed
> > decimal numbers suitable for currency calculations and the like.
> > BigDecimal gives the user complete control over rounding behavior,
> > allowing the user to choose from a comprehensive set of eight rounding
> > modes.
>
> Arbitrary precision math has been part of the Lisp/Scheme world for a long
> time; it's also in the mainstream via mathematica:
> http://groups.google.com/group/comp.soft-sys.math.mathematica/topics?pli=1
>
> -- Niels
> http://nielsmayer.com
Thanks for the comments. That's really smart of Java! Beautiful.
I guess they don't fool around in an app like Mathematica, either.
I'm familiar with Scheme via the Geda suite, but less so with Lisp.

The last time I dealt with BCD was in the great Borland C++ Builder.
At the time version 4 had minimal support for it, but in the end
 I had to write my own classes for it, when I had to switch my entire
 DB app from 'NUMBER' to 'BCD' fields. Ugh... Yeah, slow and a PITA.

I've always wondered why they don't make a fixed-point co-processor...

Thanks. Tim.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun May 2 04:15:01 2010

This archive was generated by hypermail 2.1.8 : Sun May 02 2010 - 04:15:01 EEST