Skip to content
Snippets Groups Projects
Commit b6ba3cfa authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Create a header of fundamental files

parent b5cbabcb
No related branches found
No related tags found
No related merge requests found
/* 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment