>>>>>Check "Visual FoxPro System Capacities" in Help. I guess the computations up to 15 digits can give the correct numbers.
>>>>
>>>>Sure, the numbers Fabio showed are beyond the system capabilities. But the point is, some of them give error messages, and some give only seemingly random results, without indicating, with any error, that something went wrong. Nothing you can trap with TRY for example.
>>>
>>>Right, I understood it - that's why I proposed to use numeric 20 instead and use a transform function.
>>
>>numeric() is a fake.
>>It uses float64, with the 15 digits limit.
>>
>>
>>? CAST("22919090710007290" as N(20))=CAST("22919090710007299" as N(20))
>>
>
>Too bad :(((
and with little numbers:
CLEAR
CREATE CURSOR ab (xx N(10,1))
FOR k=1 TO 100000
INSERT INTO ab VALUES (0.1)
NEXT
SUM xx TO xxsum
? (xxsum-0.1*100000)*10000000
This is the design of VFP,
but if you use decimal MSSQL,
computations in VFP can return different results
compared to the result of MSSQL.