I need to calculate some integrals in my program. Before using Julia i did it in C by using Complex Newton-Cotes formulas(Boole rule, Simpson rule and others):

Here is the simplified example(only with Boole Rule):

```
#include <stdio.h>
#include <stdlib.h>
#include<math.h>
double f(double x)
{
return pow(x*x+1.0,-1.5);
}
int main()
{
int i;
double a,b,h,step;
puts("Input number of steps and lower and upper band of integral: ");
scanf("%lf %lf %lf",&step,&a,&b);
h=(b-a)/step;
result=0.0;
puts("");
*/
for(i=0;i<krok;i++)
{
result=result+7*f(a+i*h)+32*f(a+i*h+h/4.0)+12*f(a+i*h+h/2.0)+32*f(a+i*h+h*0.75)+7*f(a+(i+1)*h);
}
printf("Result(Boole Rule): %lf",result*h/90.0);
return 0;
}
```

And I can rewrite this in more elegant version for Julia.

However I want to use GPU to speed up my programs.

Should I use my algorithm or use this for example: https://github.com/ajt60gaibb/FastGaussQuadrature.jl

Which I found in this topic:

Numerical integration over given integral. How to do it in Julia?

The majority of my calculations are connected with Biot-Savart Law.