[Kstars-devel] Precision in KStars

Daniel Baboiu daniel.baboiu at shaw.ca
Tue Jun 25 04:56:43 UTC 2013


The level of precision for single precision, if we are talking only
computations related to rendering, and if there are only a handful of
steps, would be sufficient. The precision is 1e-8, for a full circle,
leads to an error of about 0.01-0.02 arcsec.


Talking about non-CPU, ephemeris calculations definitely need double
precision (although series expansion can benefit from GPU computing;
even a modest GPU capable of double precision would speed up
computations significantly, depending on transfer speed.

AMD's Southern Islands actually are in three groups:
1) Up to 7670, they are incapable of double precision.
2) 7730 to 7870, DP speed is 1/16 of SP speed
3) 7870XT and up, DP precision is 1/4 of the SP speed.

With NVidia, the situation is actually worse, the latest GPUs (600 and
700 series), DP speed is 1/24 of SP speed; it was better (1/12) in the
500 series (but in those, the overall speed was lower, so the DP speed
is about the same).

On the other hand, if the original data only provides say 7 digit
precision, the use of SP is perfectly justified.



On Mon, 2013-06-24 at 15:18 -0400, Henry de Valence wrote:
> Hello all,
> 
> What level of precision is needed in KStars?
> 
> Currently, almost all of the code uses double-precision floats. As I'm 
> rewriting the computation code, should we stick to using double-precision 
> floats or move to single-precision?
> 
> The upside to single-precision is mainly that when we want to do processing on 
> a non-CPU device, we run much, much more quickly. For instance, AMD's Southern 
> Islands GPUs run 16x slower with double precision. I think that this is a 
> worst case, though, and nVidia hardware is somewhat better, maybe a factor of 
> 8, but I don't recall exactly.

> If we just use double everywhere, then we don't need to worry about precision 
> issues, but it has costs, and if the input data to KStars isn't that precise 
> to start, it may not even have any meaning. So I'd like to get some input on 
> what the astronomical considerations regarding precision are. At what point 
> does added precision give no benefit to due inaccurate measurements of the 
> source data?




More information about the Kstars-devel mailing list