1 #ifndef SYMENGINE_CODEGEN_H
2 #define SYMENGINE_CODEGEN_H
4 #include <symengine/printers.h>
6 #include <symengine/printers/strprinter.h>
7 #include <symengine/symengine_exception.h>
16 = CodePrinterPrecision::Double);
17 using StrPrinter::apply;
18 using StrPrinter::bvisit;
19 using StrPrinter::str_;
20 void bvisit(
const Basic &x);
22 void bvisit(
const Dummy &x);
27 void bvisit(
const And &x);
28 void bvisit(
const Or &x);
29 void bvisit(
const Xor &x);
30 void bvisit(
const Not &x);
35 void bvisit(
const Reals &x);
39 void bvisit(
const Abs &x);
42 void bvisit(
const Max &x);
43 void bvisit(
const Min &x);
45 void bvisit(
const NaN &x);
50 void bvisit(
const Sign &x);
54 void bvisit(
const Subs &x);
58 #ifdef HAVE_SYMENGINE_MPFR
63 CodePrinterPrecision precision_;
64 std::string print_scalar_literal(
double d)
const;
65 std::string print_math_function(
const std::string &name)
const;
66 std::string print_binary_reduction(
const vec_basic &args,
67 const std::string &func_name);
68 std::string print_binary_reduction_impl(vec_basic::const_iterator begin,
69 vec_basic::const_iterator end,
70 const std::string &func_name);
77 = CodePrinterPrecision::Double);
78 using CodePrinter::apply;
79 using CodePrinter::bvisit;
80 using CodePrinter::str_;
81 void bvisit(
const Infty &x);
82 void _print_pow(std::ostringstream &o,
const RCP<const Basic> &a,
83 const RCP<const Basic> &b)
override;
90 = CodePrinterPrecision::Double);
91 using C89CodePrinter::apply;
92 using C89CodePrinter::bvisit;
93 using C89CodePrinter::str_;
94 void bvisit(
const Infty &x);
95 void _print_pow(std::ostringstream &o,
const RCP<const Basic> &a,
96 const RCP<const Basic> &b)
override;
97 void bvisit(
const Gamma &x);
105 = CodePrinterPrecision::Double);
106 using C99CodePrinter::apply;
107 using C99CodePrinter::bvisit;
108 using C99CodePrinter::str_;
111 void bvisit(
const NaN &x);
112 void bvisit(
const Infty &x);
119 = CodePrinterPrecision::Float);
120 using CodePrinter::apply;
121 using CodePrinter::bvisit;
122 using CodePrinter::str_;
124 void bvisit(
const NaN &x);
125 void bvisit(
const Infty &x);
126 void bvisit(
const Abs &x);
129 void bvisit(
const Max &x);
130 void bvisit(
const Min &x);
132 void _print_pow(std::ostringstream &o,
const RCP<const Basic> &a,
133 const RCP<const Basic> &b)
override;
139 using CodePrinter::apply;
140 using CodePrinter::bvisit;
141 using CodePrinter::str_;
143 void _print_pow(std::ostringstream &o,
const RCP<const Basic> &a,
144 const RCP<const Basic> &b)
override;
145 void bvisit(
const Abs &x);
146 void bvisit(
const Sin &x);
147 void bvisit(
const Cos &x);
148 void bvisit(
const Max &x);
149 void bvisit(
const Min &x);
The lowest unit of symbolic representation.
RealDouble Class to hold double values.
Main namespace for SymEngine package.