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

Last change on this file since 1647 was 1647, checked in by sam, 8 years ago

build: hide the SDL_main.h inclusion in core.h, and only activate it
on Windows if using Visual Studio; if using MinGW, try to stick to the
original main() entry point.

  • Property svn:keywords set to Id
File size: 812 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 "lol/math/real.h"
16#include "lol/math/remez.h"
17
18using lol::real;
19using lol::RemezSolver;
20
21/* See the tutorial at http://lol.zoy.org/wiki/doc/maths/remez */
22real f(real const &x) { return exp(x); }
23real g(real const &x) { return exp(x); }
24
25int main(int argc, char **argv)
26{
27    RemezSolver<4, real> solver;
28    solver.Run(-1, 1, f, g, 40);
29    return 0;
30}
31
Note: See TracBrowser for help on using the repository browser.