Re: why are floats flakey?
Re: why are floats flakey?
- Subject: Re: why are floats flakey?
- From: Gordon Apple <email@hidden>
- Date: Tue, 25 May 2004 09:48:25 -0700
on 5/25/04 7:13 AM, email@hidden at
email@hidden wrote:
>
Not really, for TimeValue and TimeScale are limited too. Since the
>
computer is a finite thing, whilst numbers (even integers) happen to be
>
inifinite, you just cannot express "any number" from anything (but a
>
finite subset, like an interval of integers). There's an infinite
>
number of rationals in any interval (of a non-trivial length).
>
>
That's also the final reason why *any* computer number type is
>
"flakey": any type, whatever way it is defined, can express only a
>
finite number of values. All the others--*much* more of them!, an aleph
>
zero of rationals or integers, an aleph one of reals--, therefore, have
>
to be either refused (normally done for those exceeding some range) or
>
rounded (normally done for those inside the range, which cannot be
>
expressed).
It is not true that "*any* computer number type is "flakey"". Although I
didn't see the original post, I recognize that number as (near) the NTSC
frame rate, the actual value of which is defined as a number easily and
exactly represented as a rational pair of (short) integers.
Over the years, I have astounded many by designing and simplifying
digital filters (one of which is used in voice coding on the Space Shuttle)
by using integer arithmetic, taking advantage of its exact finite
computational characteristics as opposed to dealing with the accumulated
errors prevalent in both analog and floating-point systems. I have also
used such techniques with frequency synthesizers on Milstar and on
spread-spectrum correlation receivers.
When dealing with NTSC frame rates, simple computation with exact
rational numbers can provide precise tracking and optimal timing of frame
buffer adjustments when conversions are required between NTSC frame rate and
common integral frame rates such as 30, 25, and 24.
--
Gordon Apple
Ed4U
Redondo Beach, CA and Little Rock, AR
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.