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

Last change on this file since 2297 was 2297, checked in by sam, 9 years ago

base: implement UNUSED() macro and put it here and there.

  • Property svn:keywords set to Id
File size: 836 bytes
RevLine 
[985]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
[2183]8//   http://www.wtfpl.net/ for more details.
[985]9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
[1650]15#include "core.h"
[985]16
[1651]17#include "lol/math/real.h"
18#include "lol/math/remez.h"
19
[1091]20using lol::real;
[1117]21using lol::RemezSolver;
[985]22
[1119]23/* See the tutorial at http://lol.zoy.org/wiki/doc/maths/remez */
24real f(real const &x) { return exp(x); }
[1126]25real g(real const &x) { return exp(x); }
[989]26
[1050]27int main(int argc, char **argv)
[991]28{
[2297]29    UNUSED(argc, argv);
30
[1119]31    RemezSolver<4, real> solver;
[1127]32    solver.Run(-1, 1, f, g, 40);
[1119]33    return 0;
[985]34}
35
Note: See TracBrowser for help on using the repository browser.