Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
9f5f9175
There was an error fetching the commit references. Please try again later.
Commit
9f5f9175
authored
7 years ago
by
Daniel Simon
Browse files
Options
Downloads
Patches
Plain Diff
Operator for comparing MultiPrecision and mpf_t added. Needed for Google Test.
parent
fcf2287c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TNL/Experimental/Arithmetics/MultiPrecision.cpp
+10
-0
10 additions, 0 deletions
src/TNL/Experimental/Arithmetics/MultiPrecision.cpp
src/TNL/Experimental/Arithmetics/MultiPrecision.h
+3
-0
3 additions, 0 deletions
src/TNL/Experimental/Arithmetics/MultiPrecision.h
with
13 additions
and
0 deletions
src/TNL/Experimental/Arithmetics/MultiPrecision.cpp
+
10
−
0
View file @
9f5f9175
...
...
@@ -123,6 +123,16 @@ bool MultiPrecision::operator<=(const MultiPrecision &mp) const{
return
false
;
}
/* OPERATORS FOR GOOGLE TEST */
bool
MultiPrecision
::
operator
==
(
const
mpf_t
&
GMPnumber
)
const
{
MultiPrecision
m
(
*
this
);
if
(
mpf_cmp
(
m
.
number
,
GMPnumber
)
==
0
)
return
true
;
else
return
false
;
}
/* METHODS */
void
MultiPrecision
::
printMP
(){
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Experimental/Arithmetics/MultiPrecision.h
+
3
−
0
View file @
9f5f9175
...
...
@@ -48,6 +48,9 @@ public:
MultiPrecision
operator
++
(
int
);
MultiPrecision
operator
--
(
int
);
/* OPERATORS FOR GOOGLE TEST*/
bool
operator
==
(
const
mpf_t
&
GMPnumber
)
const
;
/* METHODS */
void
printMP
();
/// TODO void printNumber(int digits, ostream& str = std::cout );
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment