CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
epsilon.hpp
Go to the documentation of this file.
1 // $Id$
2 # ifndef CPPAD_CORE_EPSILON_HPP
3 # define CPPAD_CORE_EPSILON_HPP
4 /* --------------------------------------------------------------------------
5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
6 
7 CppAD is distributed under multiple licenses. This distribution is under
8 the terms of the
9  Eclipse Public License Version 1.0.
10 
11 A copy of this license is included in the COPYING file of this distribution.
12 Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
13 -------------------------------------------------------------------------- */
14 
15 /*
16 ------------------------------------------------------------------------------
17 $begin epsilon$$
18 $spell
19  std
20  eps
21  CppAD
22  namespace
23  const
24 $$
25 
26 $section Machine Epsilon For AD Types$$
27 
28 $head Deprecated 2012-06-17$$
29 This routine has been deprecated.
30 You should use the $cref numeric_limits$$ $code epsilon$$ instead.
31 
32 $head Syntax$$
33 $icode%eps% = epsilon<%Float%>()%$$
34 
35 $head Purpose$$
36 Obtain the value of machine epsilon corresponding
37 to the type $icode%Float%$$.
38 
39 $head Float$$
40 this type can either be $codei%AD<%Base%>%$$,
41 or it can be $icode Base$$ for any $codei%AD<%Base%>%$$ type.
42 
43 $head eps$$
44 The result $icode eps$$ has prototype
45 $codei%
46  %Float% eps
47 %$$
48 
49 $end
50 ------------------------------------------------------------------------------
51 */
52 
53 namespace CppAD {
54 
55  template <class Type>
56  inline Type epsilon(void)
57  { return Type ( numeric_limits<Type>::epsilon() ); }
58 
59 }
60 # endif
All tthese defaults correspond to errors.
Type epsilon(void)
Definition: epsilon.hpp:56