Since you describe this as part of a ray tracing project, your accuracy is most likely determined by the "world coordinates" of the scene or, possibly, even the coordinates of the screen into which they are translated. Any of them will give an acceptable goal for an absolute error in your calculation.
One could step back from this to the accuracy needed for the intermediate calculations that you do, for example, to form an internal product that is theoretically considered "zero." For example, you can find the shortest path (reflected light) between two smooth bodies, and the disappearance of the internal product (perpendicularity) gives the location of the point.
In this case, the scalar product may be quadratic in the unknowns (point location) that you are looking for. It is possible that unknowns form a βdouble rootβ (zero of multiplicity 2), which makes the location of this root additional, sensitive to the calculation of the internal product, equal to zero.
For such cases, you would like to get about twice as many βzeroβ digits in the internal product as the location accuracy is needed. In fact, the internal product changes very slowly with the location in the vicinity of the double root.
But your application may not be as sensitive; An analysis of the necessary algorithm is necessary to give you a good answer. As a rule, I make an internal product with double precision in order to get answers that can be reliable with respect to single precision, but it can be too expensive if ray tracing should be performed in real time.
source share