CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
language_c_float.hpp
1#ifndef CPPAD_CG_LANGUAGE_C_FLOAT_INCLUDED
2#define CPPAD_CG_LANGUAGE_C_FLOAT_INCLUDED
3/* --------------------------------------------------------------------------
4 * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5 * Copyright (C) 2015 Ciengis
6 *
7 * CppADCodeGen is distributed under multiple licenses:
8 *
9 * - Eclipse Public License Version 1.0 (EPL1), and
10 * - GNU General Public License Version 3 (GPL3).
11 *
12 * EPL1 terms and conditions can be found in the file "epl-v10.txt", while
13 * terms and conditions for the GPL3 can be found in the file "gpl3.txt".
14 * ----------------------------------------------------------------------------
15 * Author: Joao Leal
16 */
17
18namespace CppAD {
19namespace cg {
20
26template<>
27inline const std::string& LanguageC<float>::absFuncName() {
28 static const std::string name("fabsf"); // C99
29 return name;
30}
31
32template<>
33inline const std::string& LanguageC<float>::acosFuncName() {
34 static const std::string name("acosf"); // C99
35 return name;
36}
37
38template<>
39inline const std::string& LanguageC<float>::asinFuncName() {
40 static const std::string name("asinf"); // C99
41 return name;
42}
43
44template<>
45inline const std::string& LanguageC<float>::atanFuncName() {
46 static const std::string name("atanf"); // C99
47 return name;
48}
49
50template<>
51inline const std::string& LanguageC<float>::coshFuncName() {
52 static const std::string name("coshf"); // C99
53 return name;
54}
55
56template<>
57inline const std::string& LanguageC<float>::cosFuncName() {
58 static const std::string name("cosf"); // C99
59 return name;
60}
61
62template<>
63inline const std::string& LanguageC<float>::expFuncName() {
64 static const std::string name("expf"); // C99
65 return name;
66}
67
68template<>
69inline const std::string& LanguageC<float>::logFuncName() {
70 static const std::string name("logf"); // C99
71 return name;
72}
73
74template<>
75inline const std::string& LanguageC<float>::sinhFuncName() {
76 static const std::string name("sinhf"); // C99
77 return name;
78}
79
80template<>
81inline const std::string& LanguageC<float>::sinFuncName() {
82 static const std::string name("sinf"); // C99
83 return name;
84}
85
86template<>
87inline const std::string& LanguageC<float>::sqrtFuncName() {
88 static const std::string name("sqrtf"); // C99
89 return name;
90}
91
92template<>
93inline const std::string& LanguageC<float>::tanhFuncName() {
94 static const std::string name("tanhf"); // C99
95 return name;
96}
97
98template<>
99inline const std::string& LanguageC<float>::tanFuncName() {
100 static const std::string name("tanf"); // C99
101 return name;
102}
103
104#if CPPAD_USE_CPLUSPLUS_2011
105template<>
106inline const std::string& LanguageC<float>::erfFuncName() {
107 static const std::string name("erff"); // C99
108 return name;
109}
110
111template<>
112inline const std::string& LanguageC<float>::asinhFuncName() {
113 static const std::string name("asinhf"); // C99
114 return name;
115}
116
117template<>
118inline const std::string& LanguageC<float>::acoshFuncName() {
119 static const std::string name("acoshf"); // C99
120 return name;
121}
122
123template<>
124inline const std::string& LanguageC<float>::atanhFuncName() {
125 static const std::string name("atanhf"); // C99
126 return name;
127}
128
129template<>
130inline const std::string& LanguageC<float>::expm1FuncName() {
131 static const std::string name("expm1f"); // C99
132 return name;
133}
134
135template<>
136inline const std::string& LanguageC<float>::log1pFuncName() {
137 static const std::string name("log1pf"); // C99
138 return name;
139}
140
141#endif
142
143template<>
144inline const std::string& LanguageC<float>::getPrintfBaseFormat() {
145 static const std::string format("%f");
146 return format;
147}
148
149} // END cg namespace
150} // END CppAD namespace
151
152#endif