[style] Use float instead of double to reduce memory consumption