Patch Name: PHSS_30212 Patch Description: s700_800 11.22 Math Library Cumulative Patch Creation Date: 04/01/21 Post Date: 04/01/23 Hardware Platforms - OS Releases: s700: 11.22 s800: 11.22 Products: N/A Filesets: OS-Core.CORE2-64SLIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP OS-Core.CORE2-SHLIBS,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP ProgSupport.C2-INC,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP ProgSupport.LANG-64ALIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP ProgSupport.LANG-MIN,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair enhancement general_release Path Name: /hp-ux_patches/s700_800/11.X/PHSS_30212 Symptoms: PHSS_30212: SR: 8606337239 CR: JAGae98265 The FLT_ROUNDS macro in header float.h doesn't reflect the current dynamic rounding mode. SR: 8606339487 CR: JAGaf00416 Certain math functions don't meet accuracy goals. PHSS_29653: SR: 8606314745 CR: JAGae77496 The _sinhcosh function fails to store the cosh result via the cosh pointer for a range of small magnitude inputs. SR: 8606314775 CR: JAGae77526 Quad (long double) precision square root does not always round correctly. PHSS_28972: SR: 8606287960 CR: JAGae51893 When calling certain math functions that set errno in a multi-threaded environment, the value is not being set by child threads. PHSS_27289: Performance and/or accuracy for certain libm functions deficient compared to patch. Defect Description: PHSS_30212: SR: 8606337239 CR: JAGae98265 The FLT_ROUNDS macro define in header float.h should reflect the current dynamic floating-point rounding mode. Instead, it is statically defined to be 1, which corresponds to the default (to-nearest) rounding mode. SR: 8606339487 CR: JAGaf00416 The following math library functions do not meet the accuracy goals for their type: double precision default/strict accuracy mode: acosd, annuity, asind, cosd, sind, sin extended precision relaxed accuracy mode: acoshw quad precision: annuityl, asinhl, compoundl, expm1l, powl, powllnl, pownl PHSS_29653: SR: 8606314745 CR: JAGae77496 The double precision function _sinhcosh does not store the hyperbolic cosine result through its cosh pointer argument for numerical inputs between 2.0^(-11) and 2.0^(-5) in magnitude. SR: 8606314775 CR: JAGae77526 The quad (long double) function sqrtq (sqrtl) sometimes delivers incorrectly rounded results for default (IEEE to-nearest) rounding mode when the infinitely precise square root is very nearly a halfway rounding case. These errors are extremely rare but should be eliminated because the function must round correctly for all inputs. PHSS_28972: SR: 8606287960 CR: JAGae51893 Threads which call certain math functions that set errno in a multi-threaded environment (+Oliberrno -D_REENTRANT compilation) should update errno on a per-thread basis. This is not happening for child threads, which are not updating errno when circumstances warrant such updates. The fix is to compile the appropriate libm source files with the -D_REENTRANT option. PHSS_27289: N/A Enhancement: Yes PHSS_30212: This patch delivers new functions, cot and sinhcosh, in four precisions, as well as float (single precision) versions of six Bessel functions. In addition, it provides performance and accuracy upgrades for certain math functions. New functions cot[fwlq] and cotd[fwlq] in the HP-UX namespace in the math.h and tgmath.h headers compute the cotangent of radian and degree source arguments, respectively. New functions sinhcosh[fwlq] in the HP-UX namespace in the math.h header compute both the hyperbolic sine and hyperbolic cosine of a single real argument. New functions j0f, j1f, jnf, y0f, y1f, and ynf in the HP-UX namespace in the math.h header compute Bessel functions of integer order to single (float) precision. The accuracy of the following double precision functions has been improved: cos, tan, and tand. The following functions have performance upgrades: erf, erff, erfc, erfcf, fmodl, hypotl, remainderl, and remquol. PHSS_28972: This patch delivers new functions, sincos and cis, alters the return types of certain functions in header fenv.h, and provides performance and accuracy upgrades for certain math functions. New functions sincos[fwlq] in the HPUX namespace in the math.h and cmath headers compute both the sine and cosine of a single real argument. New functions cis[fwlq] in the HPUX namespace in the complex.h, tgmath.h, and complex headers compute the complex value cos(x) + i*sin(x), for real x. Functions in fenv.h previously of type void have been changed to return int (0 indicating success) to conform to the recently updated C99 TC1 standard. The affected functions are feclearexcept(), feraiseexcept(), fegetexceptflag(), fesetexceptflag(), fegetenv(), fesetenv(), and feupdateenv(). This change will not affect existing normal use, which will ignore the new return value, which will always be 0, indicating success, on HP-UX. The power functions, pow[fw], pown[fw], and powlln[fw], have had a major performance upgrade, which is particularly dramatic in inlined relaxed float accuracy mode, which is obtained via compiler options "+DO11.23 +Ofltacc=relaxed +O3"). In addition, the accuracy of the pow functions in stricter float accuracy modes has been improved. The arctangent functions, atan[fwlq], atand[fwlq], atan2[fwlq], and atan2d[fwlq], have improved accuracy. The behavior of complex division has been improved for certain edge-case arguments. The following functions have minor performance upgrades: annuity[fw], atan2[w], carg[w], cexpf, compound[fw], llrintl, nearbyintl, rintl, and rsqrt[fw]. PHSS_27289: This is an enhancement to improve the accuracy and/or performance of certain libm functions. The following functions benefit from improved accuracy: annuity, annuityw, acoshw, asinhw, atanhw, compound, compoundw, cosdl, cosh, cosl, gammal, lgammal, sindl, sinl, tandl, tanl, and tgammal. In addition, the rounding of results for quad (long double) elementary functions has been modified to produce underflow results in a manner consistent with other floating-point precisions. The runtime performance of the following functions has been improved: * Functions which round to integer format or value (e.g., floor, ceil, rint, lround), all 4 precisions. * Single, double and extended precision fmod, remainder, and remquo. * Single, double and extended precision inverse trig functions acos, asin, atan, acosd, asind, and atand. * Single, double and extended precision inverse hyperbolic functions acosh, asinh, and atanh. * Single, double and extended precision financial functions annuity and compound. * Miscellaneous single, double and extended precision functions such as frexp, ldexp, pow, scalb, scalblln, and scalbn. * Most single, double, and extended complex functions. SR: 8606337239 8606339487 8606314745 8606314775 8606287960 Patch Files: OS-Core.CORE2-64SLIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux64/libm.so.1 OS-Core.CORE2-SHLIBS,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux32/libm.so.1 ProgSupport.C2-INC,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/include/complex.h /usr/include/fenv.h /usr/include/float.h /usr/include/math.h /usr/include/tgmath.h ProgSupport.LANG-64ALIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux64/libm.a ProgSupport.LANG-MIN,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux32/libm.a what(1) Output: OS-Core.CORE2-64SLIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux64/libm.so.1: HP-UX LP64 Math Library (libm) for Itanium(R)-based systems B.11.22, B.11.23 Mon Dec 15 22:32:16 2003 PST OS-Core.CORE2-SHLIBS,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux32/libm.so.1: HP-UX ILP32 Math Library (libm) for Itanium(R)-based systems B.11.22, B.11.23 Mon Dec 15 22:13:5 3 2003 PST ProgSupport.C2-INC,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/include/complex.h: None /usr/include/fenv.h: None /usr/include/float.h: $Revision: 76.1 $ */ /usr/include/math.h: None /usr/include/tgmath.h: None ProgSupport.LANG-64ALIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux64/libm.a: HP-UX LP64 Math Library (libm) for Itanium(R)-based systems B.11.22, B.11.23 Mon Dec 15 22:32:13 2003 PST ProgSupport.LANG-MIN,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: /usr/lib/hpux32/libm.a: HP-UX ILP32 Math Library (libm) for Itanium(R)-based systems B.11.22, B.11.23 Mon Dec 15 22:13:4 9 2003 PST cksum(1) Output: OS-Core.CORE2-64SLIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: 2327875496 2114632 /usr/lib/hpux64/libm.so.1 OS-Core.CORE2-SHLIBS,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: 2283432667 2045096 /usr/lib/hpux32/libm.so.1 ProgSupport.C2-INC,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: 1847372516 10705 /usr/include/complex.h 3849891523 6727 /usr/include/fenv.h 884288470 3922 /usr/include/float.h 3092556854 56334 /usr/include/math.h 2256687310 5537 /usr/include/tgmath.h ProgSupport.LANG-64ALIB,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: 505950029 3052380 /usr/lib/hpux64/libm.a ProgSupport.LANG-MIN,fr=B.11.22,fa=HP-UX_B.11.22_IA,v=HP: 645379957 2676130 /usr/lib/hpux32/libm.a Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_27289 PHSS_28972 PHSS_29653 Equivalent Patches: PHSS_29678: s700: 11.23 s800: 11.23 Patch Package Size: 2850 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHSS_30212 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHSS_30212.depot By default swinstall will archive the original software in /var/adm/sw/save/PHSS_30212. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHSS_30212.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHSS_30212.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_30212.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None