blob: b8224599812e2c8a0d6c57822e9146393c5eab50 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001// Copyright John Maddock 2007.
2// Copyright Paul A. Bristow 2007.
3
4// Use, modification and distribution are subject to the
5// Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt
7// or copy at http://www.boost.org/LICENSE_1_0.txt)
8
Jeff Thompson3d613fd2013-10-15 15:39:04 -07009#ifndef NDNBOOST_MATH_TOOLS_USER_HPP
10#define NDNBOOST_MATH_TOOLS_USER_HPP
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070011
12#ifdef _MSC_VER
13#pragma once
14#endif
15
16// This file can be modified by the user to change the default policies.
17// See "Changing the Policy Defaults" in documentation.
18
19// define this if the platform has no long double functions,
20// or if the long double versions have only double precision:
21//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070022// #define NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070023//
24// Performance tuning options:
25//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026// #define NDNBOOST_MATH_POLY_METHOD 3
27// #define NDNBOOST_MATH_RATIONAL_METHOD 3
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070028//
29// The maximum order of polynomial that will be evaluated
30// via an unrolled specialisation:
31//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070032// #define NDNBOOST_MATH_MAX_POLY_ORDER 17
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070033//
34// decide whether to store constants as integers or reals:
35//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070036// #define NDNBOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070037
38//
39// Default policies follow:
40//
41// Domain errors:
42//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070043// #define NDNBOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070044//
45// Pole errors:
46//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070047// #define NDNBOOST_MATH_POLE_ERROR_POLICY throw_on_error
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070048//
49// Overflow Errors:
50//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070051// #define NDNBOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070052//
53// Internal Evaluation Errors:
54//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055// #define NDNBOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070056//
57// Underfow:
58//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070059// #define NDNBOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070060//
61// Denorms:
62//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070063// #define NDNBOOST_MATH_DENORM_ERROR_POLICY ignore_error
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070064//
65// Max digits to use for internal calculations:
66//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070067// #define NDNBOOST_MATH_DIGITS10_POLICY 0
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070068//
69// Promote floats to doubles internally?
70//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070071// #define NDNBOOST_MATH_PROMOTE_FLOAT_POLICY true
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070072//
73// Promote doubles to long double internally:
74//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070075// #define NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY true
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070076//
77// What do discrete quantiles return?
78//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070079// #define NDNBOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070080//
81// If a function is mathematically undefined
82// (for example the Cauchy distribution has no mean),
83// then do we stop the code from compiling?
84//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070085// #define NDNBOOST_MATH_ASSERT_UNDEFINED_POLICY true
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070086//
87// Maximum series iterstions permitted:
88//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070089// #define NDNBOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070090//
91// Maximum root finding steps permitted:
92//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070093// define NDNBOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070094
Jeff Thompson3d613fd2013-10-15 15:39:04 -070095#endif // NDNBOOST_MATH_TOOLS_USER_HPP
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070096
97