-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from SpM-lab/terasaki/minor-fix
Minor fix
- Loading branch information
Showing
5 changed files
with
110 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#pragma once | ||
|
||
#include "xprec/ddouble.hpp" | ||
|
||
|
||
namespace sparseir { | ||
// General case | ||
template<typename T> | ||
inline T sqrt_impl(const T& x) { | ||
return std::sqrt(x); | ||
} | ||
|
||
// Specialization for DDouble | ||
template<> | ||
inline xprec::DDouble sqrt_impl(const xprec::DDouble& x) { | ||
return xprec::sqrt(x); | ||
} | ||
|
||
template<typename T > | ||
inline T cosh_impl(const T& x) { | ||
return std::cosh(x); | ||
} | ||
|
||
template<> | ||
inline xprec::DDouble cosh_impl(const xprec::DDouble& x) { | ||
return xprec::cosh(x); | ||
} | ||
|
||
template<typename T> | ||
inline T sinh_impl(const T& x) { | ||
return std::sinh(x); | ||
} | ||
|
||
template<> | ||
inline xprec::DDouble sinh_impl(const xprec::DDouble& x) { | ||
return xprec::sinh(x); | ||
} | ||
|
||
template<typename T> | ||
inline T exp_impl(const T& x) { | ||
return std::exp(x); | ||
} | ||
|
||
template<> | ||
inline xprec::DDouble exp_impl(const xprec::DDouble& x) { | ||
return xprec::exp(x); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
|
||
#include "./_impl.hpp" | ||
#include "./_linalg.hpp" | ||
#include "./_root.hpp" | ||
#include "./_specfuncs.hpp" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.