ended3월 17일· 1 sources

Por que a SEFAZ rejeita sua NF-e (e a culpa é do IEEE 754)

SEFAZ가 당신의 전자세금계산서(NF-e)를 거부하는 이유 — IEEE 754가 원인이다

Why it matters

Brazil's SEFAZ tax authority rejects electronic invoices (NF-e) when product totals diverge even by R$0.01, caused by IEEE 754 floating-point representation errors in languages like JavaScript, Python, and C. The article explains how decimal values like 1.064 are stored inexactly in binary, leading to drift that accumulates through multiplication and division—common in industries where unit prices are derived from package divisions. The solution involves using string-based or decimal arithmetic instead of native floating-point to achieve exact decimal calculations required by fiscal systems.

1
Sources
+0
24h
Growth
188d
Active
IEEE 754NF-eSEFAZfloating-pointaritmética decimal

Sources

Related Issues