git: 10ac6c48a3e4 - main - msun/ld80/e_powl.c: add const qualifiers to the static immutable values

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 07 Aug 2024 09:56:17 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=10ac6c48a3e4ec6bb6f09d9c93e6ce5eb3381251

commit 10ac6c48a3e4ec6bb6f09d9c93e6ce5eb3381251
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-08-06 14:49:09 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-08-07 08:46:48 +0000

    msun/ld80/e_powl.c: add const qualifiers to the static immutable values
    
    Reviewed by:    imp
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D46237
---
 lib/msun/ld80/e_powl.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/msun/ld80/e_powl.c b/lib/msun/ld80/e_powl.c
index b028d3cb7ff2..34978b964559 100644
--- a/lib/msun/ld80/e_powl.c
+++ b/lib/msun/ld80/e_powl.c
@@ -23,10 +23,10 @@
  *  P[0] x^n  +  P[1] x^(n-1)  +  ...  +  P[n]
  */
 static inline long double
-__polevll(long double x, long double *PP, int n)
+__polevll(long double x, const long double *PP, int n)
 {
 	long double y;
-	long double *P;
+	const long double *P;
 
 	P = PP;
 	y = *P++;
@@ -42,10 +42,10 @@ __polevll(long double x, long double *PP, int n)
  *  x^n  +  P[0] x^(n-1)  +  P[1] x^(n-2)  +  ...  +  P[n]
  */
 static inline long double
-__p1evll(long double x, long double *PP, int n)
+__p1evll(long double x, const long double *PP, int n)
 {
 	long double y;
-	long double *P;
+	const long double *P;
 
 	P = PP;
 	n -= 1;
@@ -126,13 +126,13 @@ __p1evll(long double x, long double *PP, int n)
 /* log(1+x) =  x - .5x^2 + x^3 *  P(z)/Q(z)
  * on the domain  2^(-1/32) - 1  <=  x  <=  2^(1/32) - 1
  */
-static long double P[] = {
+static const long double P[] = {
  8.3319510773868690346226E-4L,
  4.9000050881978028599627E-1L,
  1.7500123722550302671919E0L,
  1.4000100839971580279335E0L,
 };
-static long double Q[] = {
+static const long double Q[] = {
 /* 1.0000000000000000000000E0L,*/
  5.2500282295834889175431E0L,
  8.4000598057587009834666E0L,
@@ -141,7 +141,7 @@ static long double Q[] = {
 /* A[i] = 2^(-i/32), rounded to IEEE long double precision.
  * If i is even, A[i] + B[i/2] gives additional accuracy.
  */
-static long double A[33] = {
+static const long double A[33] = {
  1.0000000000000000000000E0L,
  9.7857206208770013448287E-1L,
  9.5760328069857364691013E-1L,
@@ -176,7 +176,7 @@ static long double A[33] = {
  5.1094857432705833910408E-1L,
  5.0000000000000000000000E-1L,
 };
-static long double B[17] = {
+static const long double B[17] = {
  0.0000000000000000000000E0L,
  2.6176170809902549338711E-20L,
 -1.0126791927256478897086E-20L,
@@ -199,7 +199,7 @@ static long double B[17] = {
 /* 2^x = 1 + x P(x),
  * on the interval -1/32 <= x <= 0
  */
-static long double R[] = {
+static const long double R[] = {
  1.5089970579127659901157E-5L,
  1.5402715328927013076125E-4L,
  1.3333556028915671091390E-3L,