Comments (1)
The range is indeed the problem. It states what the valid range for the resulting polynomial is (it is impossible to create an approximation polynomial for arbitrarily large values). So if you want to be able to compute exp(5)
you will need to provide a larger range, e.g.:
lolremez -d 10 -r -5:5 "exp(x)" "exp(x)"
This will give the following value:
148.303891984497
Thatβs already closer. Another problem is that exp(x)
behaves very differently for positive and negative values, so I suggest only computing for the 0:5
range:
lolremez -d 10 -r -0:5 "exp(x)" "exp(x)"
And calling the function like this:
x >= 0 ? exp(x) : 1.0 / exp(x)
This is the value for exp(5)
:
148.413082305473
Also note that if you use exp(x)
as the error function, exp(5)
will be the less precise value. You may wish to distribute the error in a more homogeneous way:
lolremez -d 10 -r -0:5 "exp(x)"
Which gives for exp(5)
:
148.413150926903
from lolremez.
Related Issues (20)
- Dependencies broken for submodules HOT 3
- Error: Assertion `thread::has_threads()' failed. HOT 1
- invalid function sinh and others
- Same issue but for exp2 HOT 1
- Add License HOT 1
- Installation on windows HOT 2
- Add docker image
- SLN File no longer compiles HOT 2
- feature request: erfc() and expm1() HOT 4
- Using lolremez to find half precision polynomials or arbitrary bits precision fixed point HOT 1
- Higher precision for log(x) HOT 3
- Rational Approximation? HOT 1
- Doesn't build with clang
- Approximating erf HOT 2
- Nice! Very nice!
- Marvellous. A couple of small suggestions? HOT 1
- Problem with compilation in Mac OS HOT 1
- Lack of installation requirements HOT 2
- How to install HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lolremez.