what errors?
What is the function you are integrating? Is it sinc? Step functions are not typically used in calc, you CAN take the areas under them easily, but it is unusual. Maybe a sigmoid would be useful here, if you need to do additional calculations on it later.
That aside,
it looks close, but I am having a hard time relating sinc to the code to understand your intentions. It looks like it should be the area calculation, or the function calculation, I can't tell which or if its something else entirely?