Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b433da3c
Commit
b433da3c
authored
Sep 19, 2002
by
Loren J. Rittle
Committed by
Loren J. Rittle
Sep 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* testsuite/18_support/numeric_limits.cc (test_epsilon): New.
From-SVN: r57295
parent
bf3d27e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
libstdc++-v3/ChangeLog
+4
-0
libstdc++-v3/testsuite/18_support/numeric_limits.cc
+14
-0
No files found.
libstdc++-v3/ChangeLog
View file @
b433da3c
2002-09-18 Loren J. Rittle <ljrittle@acm.org>
* testsuite/18_support/numeric_limits.cc (test_epsilon): New.
2002-09-18 Richard Henderson <rth@redhat.com>
* testsuite/18_support/numeric_limits.cc: Add -mieee for alpha.
...
...
libstdc++-v3/testsuite/18_support/numeric_limits.cc
View file @
b433da3c
...
...
@@ -94,6 +94,16 @@ void test_extrema<long double>()
}
#endif
template
<
typename
T
>
void
test_epsilon
()
{
bool
test
=
true
;
T
epsilon
=
std
::
numeric_limits
<
T
>::
epsilon
();
T
one
=
1
;
VERIFY
(
one
!=
(
one
+
epsilon
)
);
}
#ifdef __CHAR_UNSIGNED__
#define char_is_signed false
#else
...
...
@@ -314,6 +324,10 @@ int main()
test_extrema
<
double
>
();
test_extrema
<
long
double
>
();
test_epsilon
<
float
>
();
test_epsilon
<
double
>
();
test_epsilon
<
long
double
>
();
test_sign
();
test_infinity
<
float
>
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment