Arduino won't go to sleep!

Narcoleptic is not accurate, due to the overhead of calling it and millis(), but at least it's consistent. I came up with the 42 in the code by measuring the error after an hour. Now the error is less than 1ms for each second. 1000ppm. 1 in 1000. It doesn't matter if you change the code in the first 4 lines in loop. It doesn't matter if you uncomment the last 2 delays of 5000. It's still within 1ms, because I calibrated it that way with the 42. I think this will be the same for everyone since the crystal is more accurate than 100ppm. Is this good enough for you? It is much more accurate in ppm with a longer sleep of 15 sec. I'm using an external clock to calibrate it. I don't know why the 42 is so big, I would have expected much less, but it works! Is the clock while it's sleeping much different than the main program timer used by millis? They both use the same crystal.

#include <Narcoleptic.h>
float volatile f;
int i,j,k=0;
long ms;

void setup(){
Serial.begin(9600);
}
void loop(){
ms=millis();
Serial.println(k++);
for(i=0;i<1000;i++) j+=sin(f);
delay(150);
Narcoleptic.delay(1000-(millis()-ms)-42);
//Narcoleptic.delay(5000);
//Narcoleptic.delay(5000);
}