Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-28519

Inconsistent outputs from hypot (math) functions in Red Hat Enterprise Linux 7

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Normal Normal
    • None
    • rhel-7.9
    • glibc
    • None
    • None
    • Moderate
    • rhel-sst-pt-libraries
    • ssg_platform_tools
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

       

      • On Red Hat Enterprise Linux 7, the hypot output returns "inf", while the same execution returns "nan" on the latest RHEL release as on Red Hat Enterprise Linux 8.9 and Red Hat Enterprise Linux 9.3.

      Please provide the package NVR for which bug is seen:

      libm,GCC from RHEL 7

      How reproducible: Always

       

      Steps to reproduce:

      Save the attached code in a c file as "test.c".

      Compile this code and create out file with below command:

      # gcc -lm test.c
      {{}}
      Now execute the out file and check the results:
      {{}}
      on RHEL8: The result is same on first gcc package shipped with RHEL8 till latest:

      1. ./a.out
        a = nan
        hypot = nan <<---------

      on RHEL7: The result is same on first gcc package shipped with RHEL7 till latest:

      1. ./a.out
        a = nan
        hypot = inf <<---------

        Expected results: the hypot output returns "nan"

        Actual results: the hypot output returns "inf"

              glibc-bugzilla Platform Tools - Libraries Bot
              rhn-support-vrajput Virendrasingh Rajput
              Platform Tools - Libraries Bot Platform Tools - Libraries Bot
              qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: