I'm using the ScriptEngine to perform calculations specified in a String. I tried a simple program as below:
This gives the output of 1340992126976 but the correct answer is 1340992172921
This seems to work for reasonably large integers but fails for long values. I want them as long values because they are timestamps and I want to use them as such. Any ideas on what could make this work?
preguntado el 29 de junio de 12 a las 19:06
Try changing the data type from
Double. I think it's a precision problem.