https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125169

            Bug ID: 125169
           Summary: gcc misparses arguments to expf function
           Product: gcc
           Version: 13.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jkanapes at yahoo dot com
  Target Milestone: ---

The following c code returns res = -inf when it should return -0.0150738908:

#define PI2            6.28318530717958647692528676654f

cPwr = 0.0266058277;
pwr[1] = 0.00304872775;
s = sqrtf(1/(cPwr * cPwr * PI2));
s2 = 1/(cPwr * cPwr * PI2);
res = pwr[1]  - expf(-(1 * 1)/(2*s2)) / (s*sqrtf(PI2));

Reply via email to