Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
b6ba3cfa
Commit
b6ba3cfa
authored
1 year ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Create a header of fundamental files
parent
b5cbabcb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/include/types.h
+28
-0
28 additions, 0 deletions
src/include/types.h
with
28 additions
and
0 deletions
src/include/types.h
0 → 100644
+
28
−
0
View file @
b6ba3cfa
/* Distributed under the terms of GPLv3 or later. See COPYING for details. */
/*! \file types.h
*
* \brief Definition of fundamental types in use.
*/
#ifndef INCLUDE_TYPES_H_
#define INCLUDE_TYPES_H_
#include
<complex.h>
typedef
__complex__
double
dcomplex
;
/*! \brief Get the real part of a complex number.
*
* \param z: `complex double` The argument of the function.
* \return rz: `double` The real part of the argument.
*/
double
real
(
dcomplex
z
)
{
return
__real__
z
;
}
/*! \brief Get the imaginary part of a complex number.
*
* \param z: `complex double` The argument of the function.
* \return iz: `double` The imaginary part of the argument.
*/
double
imag
(
dcomplex
z
)
{
return
__imag__
z
;
}
#endif
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