Module Name:    src
Committed By:   riastradh
Date:           Wed May  8 02:08:11 UTC 2024

Modified Files:
        src/lib/libm: m.vax.expsym
        src/lib/libm/noieee_src: n_floor.c

Log Message:
libm: Add rintl, rintf to non-IEEE754 architectures.

While here, delete #ifdef to handle ns32k -- I don't think that's
gonna be relevant any time soon; in case you hadn't noticed, the
world has moved on from ns32k to vax by now.

PR 57881


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/m.vax.expsym
cvs rdiff -u -r1.8 -r1.9 src/lib/libm/noieee_src/n_floor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/m.vax.expsym
diff -u src/lib/libm/m.vax.expsym:1.2 src/lib/libm/m.vax.expsym:1.3
--- src/lib/libm/m.vax.expsym:1.2	Wed May  8 01:04:24 2024
+++ src/lib/libm/m.vax.expsym	Wed May  8 02:08:11 2024
@@ -229,6 +229,8 @@ pow
 powf
 powl
 rint
+rintf
+rintl
 round
 roundf
 roundl

Index: src/lib/libm/noieee_src/n_floor.c
diff -u src/lib/libm/noieee_src/n_floor.c:1.8 src/lib/libm/noieee_src/n_floor.c:1.9
--- src/lib/libm/noieee_src/n_floor.c:1.8	Sun Mar 16 09:51:39 2014
+++ src/lib/libm/noieee_src/n_floor.c	Wed May  8 02:08:11 2024
@@ -1,4 +1,4 @@
-/*      $NetBSD: n_floor.c,v 1.8 2014/03/16 09:51:39 martin Exp $ */
+/*      $NetBSD: n_floor.c,v 1.9 2024/05/08 02:08:11 riastradh Exp $ */
 /*
  * Copyright (c) 1985, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -45,11 +45,10 @@ ic(L, 4503599627370496.0E0, 52, 1.0)			 
 #define	L	vccast(L)
 #endif
 
-#ifdef __weak_alias
-__weak_alias(ceill, ceil);
-__weak_alias(floorl, floor);
-__weak_alias(truncl, trunc);
-#endif
+__weak_alias(ceill, ceil)
+__weak_alias(floorl, floor)
+__weak_alias(truncl, trunc)
+__weak_alias(rintl, rint)
 
 /*
  * floor(x) := the largest integer no larger than x;
@@ -110,7 +109,6 @@ ceilf(float x)
 	return ceil((double)x);
 }
 
-#ifndef ns32000			/* rint() is in ./NATIONAL/support.s */
 /*
  * algorithm for rint(x) in pseudo-pascal form ...
  *
@@ -149,7 +147,12 @@ rint(double x)
 	t = x + s;				/* x+s rounded to integer */
 	return (t - s);
 }
-#endif	/* not national */
+
+float
+rintf(float x)
+{
+	return rint((double)x);
+}
 
 long
 lrint(double x)

Reply via email to