Thanks for all the insights!
Indeed I'm using the v1.5 release.
Now let's see.... that big number in bytes (by google):
276 015 600 =
0b10000011100111010100111110000
That is 'only' 29 bits so easily should fit in all scenario's!
Looking back in the old code, I suspected this part "(tm_year - 70) * 31536000" which gave as result (separated printed out):
2.52288E+08
The scientific notation did raise my eyebrows so I started changing the prog in the first place.
Checking that out, 1978 * 31536000 = 62.378.208.000, which is
0b111010000110000001111110101100000000
Now we're talking of 36 bits. Bigger than 32 bits but it still fits in 64 bit FP or 80 bit SSE!
Looking at the storage for a Single var, which is 4 bytes which is 32 bits. Sure that doesn't fit.
Here's the part where I probably went wrong. I assumed that the calculation registers are big enough for 'everything' and the var to be stored in limits you to good or overflowed storage. The _Integer64 would be fine.
@SMcNeill 's explanation of 80bit FP for x86 and 64bit for x64 calculations confirms this idea. But the dark magic under the hood thinks different ;-)
So is the compiiler breaking up calculatings, and does it execute calcultations with Single var's in a smaller register? Hence the rounding as
@luke illustrates? Just trying to understand, to be able to prevent these nasty coding errors.
Some tests:
tm_year = 1978
a = (tm_year - 70) * 31536000
PRINT a
' prints scientific number PRINT (tm_year
- 70) * 31536000 ' correct (only if DIM is present) a&& = (tm_year - 70) * 31536000
b&& = a
PRINT b&&
' prints rounded a
Output:
6.017069E+10
60170688000
60170688000
60170686464
Note: Hopefully the new version gets a switch to force use of the SSE instructions, because "We have a need, a need for speed!" :-)