![]() | ||
| Home | SwiftX Archive | SwiftForth Archive | |

At 02:42 PM 9/3/02 -0400, Bill Hall wrote:
>hi
>First I must ask what is the expected domain of the resultant y ?
>I ran 12,000,000 thru the equation you gave, and y goes way past 32 bits,
>in the negative direction.
>
>One suggestion is to rearrange the equation as follows:
>
>y = (((a)x + b)x + c)x +d .
>
>Then evaluate it as follows
>[etc....]
>But a is so small that you will need to scale the result UP to
>obtain any
>integer effect from the a term. Which leads me back to the first
>question
>because it is the a term that causes the result to go beyond 32 bits
>negative.
What is the actual resolution of the data you're starting with? That
is ultimately the limiting factor on the _real_ resolution of any result
you get. It's a common fallacy to take, say, 12-bit data and process
it with 32 bits of accuracy; you end up with mostly noise bits.
>You may be able to pick a scaling denominator for the data and use */ ,
>thinking of the data as a fraction of some "full scale" like 16777216.
Better still, use M*/ to multiply your 32-bit intermediate result by
a ratio of 16-bit numbers (w/ extended-precision intermediate
product).
Cheers,
Elizabeth
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com
"Forth-based products and Services for real-time
applications since 1973."
==================================================
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Tue Sep 03 2002 - 11:50:23 PDT
This archive was generated by hypermail 2.2.0 : Mon Dec 01 2008 - 03:04:47 PST