I found the issue in dotLiquid library.
The fix can be found in this PR: https://github.com/dotliquid/dotliquid/pull/353.
Basically, in the assign statement, dotliquid is parsing the value as float[1], hence the lost precision.
// Floats.
match = FloatRegex.Match(key);
if (match.Success)
{
// For cultures with "," as the decimal separator, allow
// both "," and "." to be used as the separator.
// First try to parse using current culture.
if (float.TryParse(match.Groups[1].Value, NumberStyles.Number, FormatProvider, out float result))
return result;
// If that fails, try to parse using invariant culture.
return float.Parse(match.Groups[1].Value, CultureInfo.InvariantCulture);
}
- https://github.com/dotliquid/dotliquid/blob/b415f6aaa5b66fdbfa9c5d676427c7663c1e98e3/src/DotLiquid/Context.cs#L347
0.733675715. - Adam Hollett