#2705·WeasyPrint

Handle infinities, NaN, and signed zero values

Author: liZeCreated Mar 17, 2026Updated Sep 8, 2026
Labelsbug

Math functions can produce these numbers, and we have to:

  • keep them during calculation steps,
  • check ranges for computed and used values.

The first step is probably limited to math functions, and should be quite easy to fix as Python floats are IEEE-754.

The second stem is both more important and complex to fix, as the computed-to-used-values conversion is often implicit and split all over layout and drawing steps, easily leading to crashes and invalid PDF generation.