138 symbol_table_t symbol_table;
139 symbol_table.add_constants();
140 symbol_table.add_variable(
"x",x);
142 expression_t expression;
143 expression.register_symbol_table(symbol_table);
152 const std::string file_name = std::string(
"data.dat") + (char)(
'0' + index);
154 std::ofstream stream(file_name.c_str());
161 curve.
min_y_ = +std::numeric_limits<double>::max();
162 curve.
max_y_ = -std::numeric_limits<double>::max();
164 stream << std::setprecision(10);
166 const double increment = std::min(0.00005,std::abs(curve.
max_x_ - curve.
min_x_) / 1000.0);
168 for (x = curve.
min_x_; x <= curve.
max_x_; x += increment)
170 const double y = expression.value();
175 stream << x <<
"\t" << y <<
"\n";
178 const double diff_y = std::abs(curve.
max_y_ - curve.
min_y_);
179 const double perc7_5 = diff_y * 0.075;