On Aug 30, 2006, at 12:50 , Bruce Momjian wrote:

Here is a test program.  What does it show for you?

The output for me is:


Here's what I get. Just to make sure I'm doing this right, I'm including how I compiled it.

$ cat div_test.c
#include <stdio.h>

main(int argc, char *argv[])
    double x;

    x = 41;
    x = x / 10.0;
    printf("%f\n", x);
    x = x - (int)x;
    x = x * 30;
    printf("%15.15f\n", x);
    x = 0.1 * 30;
    printf("%15.15f\n", x);
    return 0;
$ gcc div_test.c -o div_test
$ ./div_test

Yea, just an optimization, but I was worried that the computations might throw problems for certain numbers, so I figured I would only trigger it
when necessary.

Thanks for the explanation. Helps me know I might actually be learning this.

Patch attached.  It also fixes a regression test output too.

Thanks for the patch. I'll look at it more closely tonight.

Michael Glaesemann
grzm seespotcode net

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to