r4925 - why not use exact float for NTSC?
#11
(10-12-2011, 09:58 PM)avih Wrote: But it is truncated. The float type has 24 bits precision, or about 7 decimal digits. Anything longer is truncated.

Ah, i see what you mean now. 59.94005994005994005994005994006 isn't truncated. But if we try to input it into "float" (the command) it will get truncated because a float is a 24bit floating decimal number which can only store so many significant digits.

What about using a double then? it should be good for 52 significand and the number above is only 31.
I do not have a superman complex; for I am God, not superman!

Rig: Q9400, 4GB DDR2, eVGA GTX260 SC, gigabyte EP35-DS3R. X25-M 80GB G2.
Reply

Sponsored links

#12
I haven't looked at the code, but my guess is that increasing accuracy by 3 orders of magnitude (from 59.94) seemed like a good balance between small enough change for big enough gain. Double might have been better, and actual nominator/denominator would have been best, and yet, that's how gigahertz decided to change it Wink

And it is good enough. Recall it was 60 before these changes, then eventually changed from 2 digits precision to 7 digits, making it 100K times more accurate than it originally was. The implications of the original inaccuracy was 1 second A/V drift every 15 minutes. 59.94 would have been 1s every 1500 minutes, and now it's 1 second every 1.5 million minutes of recording. That's good enough in my book, even if ultimately not 100(.000000000000000000000000)% accurate Wink

Yes, Computer Science should be an accurate science, but in practice that's not always the case Wink
Reply
#13
(10-12-2011, 10:18 PM)avih Wrote: And it is good enough. Recall it was 60 before these changes, then eventually changed from 2 digits precision to 7 digits, making it 100K times more accurate than it originally was. The implications of the original inaccuracy was 1 second A/V drift every 15 minutes. 59.94 would have been 1s every 1500 minutes, and now it's 1 second every 1.5 million minutes of recording.

My understanding was that the current value is 59.94
What is the current value that has an inaccuracy of 1 second every 1.5 million minutes of recording?
I do not have a superman complex; for I am God, not superman!

Rig: Q9400, 4GB DDR2, eVGA GTX260 SC, gigabyte EP35-DS3R. X25-M 80GB G2.
Reply
#14
(10-12-2011, 11:53 PM)taltamir Wrote: My understanding was that the current value is 59.94
What is the current value that has an inaccuracy of 1 second every 1.5 million minutes of recording?

Current value is (more of less) the best approximation at which a float can represent the result of (30/1.001)*2, which happens to be 59.940056
Reply
#15
(10-13-2011, 12:39 AM)avih Wrote: Current value is (more of less) the best approximation at which a float can represent the result of (30/1.001)*2, which happens to be 59.940056

I see, thank you for clarifying.
I do not have a superman complex; for I am God, not superman!

Rig: Q9400, 4GB DDR2, eVGA GTX260 SC, gigabyte EP35-DS3R. X25-M 80GB G2.
Reply




Users browsing this thread: 1 Guest(s)