bpo-31373: fix undefined floating-point demotions (#3396)

5 files changed