next up previous
Next: The C routine dvolume Up: The C code Previous: The C routine time

  
The C routine distmod

The C routine distmod first checks the boundary conditions. Then, depending on the value of $\Omega_K$, the proper motion distance (eq.  4) is calculated. But this is a problem. The IDL environment which is used by IDL to run the C routine has far worse numerical properties than a usual environment where you run a compiled C program from the command line. To be precise, the IDL environment does not even match the minimum set of numerical properties which is demanded for any C distribution. The actual problem is that the IDL environment only evaluates $1+x \neq 1$ as true, if $x \geq 10^{-8}$. This is insufficient for the comparisons on $\Omega_K$ needed to decide if $\Omega_K > 0$, $\Omega_K < 0$ or $\Omega_K = 0$. For this reason the comparisons had to be changed to some kind of fuzzy definition for 0 and the actual comparisons are deciding if $\Omega_K > 10^{-8}$ , $\Omega_K < -10^{-8}$ or $-10^{-8} < \Omega_K < 10^{-8}$, respectively. The rest of the calculation in distmod is straightforward.



Peter E. Nugent Jr.
1998-08-21