x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
details.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\math\complex\details.hpp
旋转
特效
属性
历史版本
// (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_MATH_COMPLEX_DETAILS_INCLUDED #define BOOST_MATH_COMPLEX_DETAILS_INCLUDED // // This header contains all the support code that is common to the // inverse trig complex functions, it also contains all the includes // that we need to implement all these functions. // #include
#include
#include
#include
#include
// isnan where available #include
#ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::sqrt; } #endif namespace boost{ namespace math{ namespace detail{ template
inline bool test_is_nan(T t) { // Comparisons with Nan's always fail: return std::numeric_limits
::has_infinity && (!(t <= std::numeric_limits
::infinity()) || !(t >= -std::numeric_limits
::infinity())); } #ifdef isnan template<> inline bool test_is_nan
(float t) { return isnan(t); } template<> inline bool test_is_nan
(double t) { return isnan(t); } template<> inline bool test_is_nan
(long double t) { return isnan(t); } #endif template
inline T mult_minus_one(const T& t) { return test_is_nan(t) ? t : -t; } template
inline std::complex
mult_i(const std::complex
& t) { return std::complex
(mult_minus_one(t.imag()), t.real()); } template
inline std::complex
mult_minus_i(const std::complex
& t) { return std::complex
(t.imag(), mult_minus_one(t.real())); } template
inline T safe_max(T t) { return std::sqrt((std::numeric_limits
::max)()) / t; } inline long double safe_max(long double t) { // long double sqrt often returns infinity due to // insufficient internal precision: return std::sqrt((std::numeric_limits
::max)()) / t; } #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // workaround for type deduction bug: inline float safe_max(float t) { return std::sqrt((std::numeric_limits
::max)()) / t; } inline double safe_max(double t) { return std::sqrt((std::numeric_limits
::max)()) / t; } #endif template
inline T safe_min(T t) { return std::sqrt((std::numeric_limits
::min)()) * t; } inline long double safe_min(long double t) { // long double sqrt often returns zero due to // insufficient internal precision: return std::sqrt((std::numeric_limits
::min)()) * t; } #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // type deduction workaround: inline double safe_min(double t) { return std::sqrt((std::numeric_limits
::min)()) * t; } inline float safe_min(float t) { return std::sqrt((std::numeric_limits
::min)()) * t; } #endif } } } // namespaces #endif // BOOST_MATH_COMPLEX_DETAILS_INCLUDED
details.hpp
网页地址
文件地址
上一页
7/8
下一页
下载
( 3 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.