From: Spehro Pefhany
Subject: Re: Trig circuits
References: <email@example.com> <firstname.lastname@example.org>
X-Newsreader: Forte Agent 1.92/32.572
Date: Wed, 25 Dec 2002 06:35:57 GMT
NNTP-Posting-Date: Wed, 25 Dec 2002 01:35:57 EST
On Mon, 23 Dec 2002 16:41:34 -0000, the renowned "John Jardine"
>Sounds like those compiler things can make life nice and easy ;-) The ones
>I've come across (for the smaller micros anyway) always seem to have some
>resriction on the precision and range of the maths functions. Eg, floating
>point not available, just integer maths and even then only to say 32 bits.
>Trig and Log functions are sometimes added just as an afterthought, offering
>say 1% integer accuracy (I can do better myself).
While 32-bit floating point is fairly standard, and suits many designs
where you can't use integers, which are usually preferable, there are
not so many for 8-bit processors that have proper ANSI 99 "double"
support (64 bits IEC 60559:1989 double format with 53-odd bits of
mantissa- 15 or 16 decimal digits). As it happens, I could use one
just now for a one-off project ( a specialized test instrument for
So far, I've looked at:
PIC compilers (3)
AVR compilers (2)
8051 compilers (3 or 4)
Z8 Encore compiler (1)
MSP430 compilers (1)
And only one or two of these support 64 bit FP math (and not the
popular or free/inexpensive compilers- cost being important on a
one-off, and popularity being a factor in how much confidence one
should put in the reliability of the library code). Although the
actual real-world accuracy of the system won't be more than 16 bits or
so, the algorithms require considerably higher resolution in the
There are some libraries and routines (Dr. Dobbs published one) that
have arbitrary precision FP math, however I need exponentials, and
many of those packages only do basic arithmetic.
"it's the network..." "The Journey is the reward"
email@example.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com