DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TR1_COMPLEX_HPP_INCLUDED # define BOOST_TR1_COMPLEX_HPP_INCLUDED # include
# include
#ifndef BOOST_HAS_TR1_COMPLEX_OVERLOADS #include
#include
#include
#include
namespace std{ #ifdef BOOST_NO_STDC_NAMESPACE using :: atan2; #endif #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template
inline BOOST_TR1_MATH_RETURN(double) arg(const T& t) { return ::std::atan2(0.0, static_cast
(t)); } #else inline double arg(const double& t) { return ::std::atan2(0.0, t); } #endif inline long double arg(const long double& t) { return ::std::atan2(0.0L, static_cast
(t)); } inline float arg(const float& t) { return ::std::atan2(0.0F, static_cast
(t)); } #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template
inline BOOST_TR1_MATH_RETURN(double) norm(const T& t) { double r = static_cast
(t); return r*r; } #else inline double norm(const double& t) { return t*t; } #endif inline long double norm(const long double& t) { long double l = t; return l*l; } inline float norm(const float& t) { float f = t; return f*f; } #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template
inline BOOST_TR1_MATH_RETURN(std::complex
) conj(const T& t) { return ::std::conj(std::complex
(static_cast
(t))); } #else inline std::complex
conj(const double& t) { return ::std::conj(std::complex
(t)); } #endif inline std::complex
conj(const long double& t) { return ::std::conj(std::complex
(t)); } inline std::complex
conj(const float& t) { std::complex
ct(t); ct = ::std::conj(ct); return ct; } #if !BOOST_WORKAROUND(__BORLANDC__, <=0x570) && !BOOST_WORKAROUND(BOOST_MSVC, < 1310) inline complex
polar(const char& rho, const char& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const unsigned char& rho, const unsigned char& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const signed char& rho, const signed char& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const short& rho, const short& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const unsigned short& rho, const unsigned short& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const int& rho, const int& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const unsigned int& rho, const unsigned int& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const long& rho, const long& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const unsigned long& rho, const unsigned long& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } #ifdef BOOST_HAS_LONG_LONG inline complex
polar(const long long& rho, const long long& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const unsigned long long& rho, const unsigned long long& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } #elif defined(BOOST_HAS_MS_INT64) inline complex
polar(const __int64& rho, const __int64& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } inline complex
polar(const unsigned __int64& rho, const unsigned __int64& theta = 0) { return ::std::polar(static_cast
(rho), static_cast
(theta)); } #endif template
inline complex
::type> polar(const T& rho, const U& theta) { typedef typename boost::tr1_detail::promote_to_real
::type real_type; return std::polar(static_cast
(rho), static_cast
(theta)); } #endif #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template
inline BOOST_TR1_MATH_RETURN(double) imag(const T& ) { return 0; } #else inline double imag(const double& ) { return 0; } #endif inline long double imag(const long double& ) { return 0; } inline float imag(const float& ) { return 0; } #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template
inline BOOST_TR1_MATH_RETURN(double) real(const T& t) { return static_cast
(t); } #else inline double real(const double& t) { return t; } #endif inline long double real(const long double& t) { return t; } inline float real(const float& t) { return t; } template
inline complex
::type> pow(const complex
& x, const complex
& y) { typedef complex
::type> result_type; typedef typename boost::mpl::if_
>, result_type const&, result_type>::type cast1_type; typedef typename boost::mpl::if_
>, result_type const&, result_type>::type cast2_type; cast1_type x1(x); cast2_type y1(y); return std::pow(x1, y1); } template
inline complex
::type> pow (const complex
& x, const U& y) { typedef typename boost::tr1_detail::promote_to_real
::type real_type; typedef complex
::type> result_type; typedef typename boost::mpl::if_
>, result_type const&, result_type>::type cast1_type; real_type r = y; cast1_type x1(x); std::complex
y1(r); return std::pow(x1, y1); } template
inline complex
::type> pow (const T& x, const complex
& y) { typedef typename boost::tr1_detail::promote_to_real
::type real_type; typedef complex
::type> result_type; typedef typename boost::mpl::if_
>, result_type const&, result_type>::type cast_type; real_type r = x; std::complex
x1(r); cast_type y1(y); return std::pow(x1, y1); } } #endif #ifndef BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG #include
namespace std { namespace tr1 { using boost::math::acos; using boost::math::asin; using boost::math::atan; using boost::math::acosh; using boost::math::asinh; using boost::math::atanh; using boost::math::fabs; } } #else # ifdef BOOST_HAS_INCLUDE_NEXT # include_next BOOST_TR1_HEADER(complex) # else # include
# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(complex)) # endif #endif #endif
complex.hpp
Page URL
File URL
Prev
2/9
Next
Download
( 7 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.