projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove trailing spaces
[gnulib.git]
/
tests
/
test-truncl.c
diff --git
a/tests/test-truncl.c
b/tests/test-truncl.c
index
dd2a9c1
..
3ea856a
100644
(file)
--- a/
tests/test-truncl.c
+++ b/
tests/test-truncl.c
@@
-38,6
+38,10
@@
} \
while (0)
} \
while (0)
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0L.
+ So we use -zero instead. */
+long double zero = 0.0L;
+
int
main ()
{
int
main ()
{
@@
-47,7
+51,7
@@
main ()
/* Zero. */
ASSERT (truncl (0.0L) == 0.0L);
/* Zero. */
ASSERT (truncl (0.0L) == 0.0L);
- ASSERT (truncl (-
0.0L
) == 0.0L);
+ ASSERT (truncl (-
zero
) == 0.0L);
/* Positive numbers. */
ASSERT (truncl (0.3L) == 0.0L);
ASSERT (truncl (0.7L) == 0.0L);
/* Positive numbers. */
ASSERT (truncl (0.3L) == 0.0L);
ASSERT (truncl (0.7L) == 0.0L);