Document: WG14 N1496

Minimal fix to complex divide


Submitter: Fred J. Tydeman (USA)
Submission Date: 2010-06-17
Subject: Minimal fix to complex divide

Consider the expression: (1.0+1.0*I)/(0.0+NAN*I). It produces (0.0+0.0*I) instead of the expected (NAN+NAN*I). This is because logbw is infinity for both INFINITY and zero.

Proposed fix to G.5.1 Multiplicative operators, paragraph 8, Example 2:

Change "isinf(logbw)" to "(INFINITY==logbw)".