There are limitations in the precision of float
and double
values due to the way they're stored in memory:
https://learn.microsoft.com/en-us/dotnet/api/system.double?view=net-7.0#Precision
If you require a higher precision, or if you're working with numbers that can't be accurately stored in a binary fraction then you could consider casting the number as a decimal ((decimal) tef.Valor
) instead.