Bugs: Difference between revisions

Jump to navigation Jump to search
93 bytes added ,  12 February 2007
Line 640: Line 640:
==== Roundoff problems with textranslate step and scroll. ====
==== Roundoff problems with textranslate step and scroll. ====


The textranslate function is delightful for 3D animation
The textranslate animation is delightful for 3D animation
of mechanical drum-type displays as on old-fashioned
of mechanical drum-type displays as on old-fashioned
odometers and Hobbs meters.
odometers and Hobbs meters.
Line 646: Line 646:
It is not, however, a convenient way to implement digital
It is not, however, a convenient way to implement digital
readouts.  It works OK for integers, but the code in  
readouts.  It works OK for integers, but the code in  
apply_mod() suffers from deep-seated numerical instability
apply_mod() suffers from roundoff errors when dealing with decimal fractions, such as the ".1" in 122.1 MHz, particularly when the scroll-value is zero.
when dealing with decimal fractions, such as the ".1" in  
* One workaround is to stick to integers, e.g. integer kHz
122.1 MHz, particularly when the scroll-value is zero.
rather than fractional MHz.
* One workaround is to stick to integers, e.g. integer
* Another workaround is to employ a small positive scroll value, step*1e-6 should suffice.
kHz rather than fractional MHz.
* A final option (with CVS) is to use the bias tag to let the code know how to
* Another workaround is to always employ a small positive
handle round-off.  Use a bias value of 1/2 your smallest step value, and
scroll value. A patch to make a positive scroll value
use the same bias value on all digits.
the ''default'' has been offered but not yet incorporated.


What we really need is a whole new support routine for dealing
What we really need is a whole new support routine for dealing
189

edits

Navigation menu