Tim Roberts wrote:
Terje Mathisen<"terje.mathisen at tmsw.no"@giganews.com> wrote:
Inline C isn't too hard to write:
Have you tried this code?
inline double delta(double th1, th2)
{
static double pi = 3.14159265357989;
static double zero_or_twopi[2] = {0, 3.14159265357989*2};
static double absmask = (double) 0x7fffffffffffffff;
That doesn't do what you think it does. That cast converts the constant to
floating point -- it doesn't just copy the bits. There are only 56 bits of
mantissa available in a double, so some of your bits get lost.
I do know that,I was in a hurry and tried to get away with psudocode,
but I should have stated that clearly.
Thanks for correcting my omissions!
Terje--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
https://lists.gnu.org/mailman/listinfo/help-gplusplus