source: trunk/test/math/remez.cpp @ 1651

Last change on this file since 1651 was 1651, checked in by sam, 7 years ago

test: damn, re-add an include I mistakenly removed.

  • Property svn:keywords set to Id
File size: 831 bytes
Line 
1//
2// Lol Engine - Sample math program: Chebyshev polynomials
3//
4// Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#include "core.h"
16
17#include "lol/math/real.h"
18#include "lol/math/remez.h"
19
20using lol::real;
21using lol::RemezSolver;
22
23/* See the tutorial at http://lol.zoy.org/wiki/doc/maths/remez */
24real f(real const &x) { return exp(x); }
25real g(real const &x) { return exp(x); }
26
27int main(int argc, char **argv)
28{
29    RemezSolver<4, real> solver;
30    solver.Run(-1, 1, f, g, 40);
31    return 0;
32}
33
Note: See TracBrowser for help on using the repository browser.