[Liboil] bug in oil_sum_f64() ?
John Cupitt
jcupitt at gmail.com
Sat Jan 20 09:27:31 PST 2007
Hi all,
I'm playing with using liboil to speed up our image processing
library: http://www.vips.ecs.soton.ac.uk . I'm getting strange results
from oil_sum_f64(). This program:
----------
#include <stdio.h>
#include <liboil/liboil.h>
int
main ()
{
double test[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
double sum;
oil_init ();
oil_sum_f64 (&sum, test, 1, 10);
printf ("sum = %g\n", sum);
return (0);
}
-------------
prints
sum = -3.10504e+231
on my machine:
john at banana:~/try$ uname -a
Linux banana 2.6.17-10-386 #2 Tue Dec 5 22:26:18 UTC 2006 i686 GNU/Linux
john at banana:~/try$ pkg-config --modversion liboil-0.3
0.3.10
john at banana:~/try$ gcc --version
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Have I misread the docs? Or is there a bug somewhere?
John
More information about the Liboil
mailing list