Comments (4)
I understand the ugliness of the result but as long as its within the bounds of
the expected floating point accuracy there is not much i can do. Normally you
should be able to change the floating point data type to long double but i
havn't tried it in a while so it will likely not work without minor
modifications.
The only thing i can do is ensure the next release will compile with long
double as its datatype. I'm not sure about "truncating" the result due to
performance reasons but won't rule out implementing it either as i already do
it for bogus imaginary parts of the result in some places of the code.
Original comment by [email protected]
on 27 Jan 2013 at 2:27
from muparserx.
What about trying to make muparserx usable with gmp? It would amazing because i
believe that numerical correctness is the last thing missing in muparserx, i
did not findy any other major problems.
http://gmplib.org/
Original comment by [email protected]
on 27 Jan 2013 at 8:32
from muparserx.
I'm about to close this issue as it is more of a feature request than a bug. As
long as the result is within the bounds of the floating point accuracy i don't
consider it a parser issue. googling for the problem shows even matlab having
(had?) this issue. I would argue against needlessly "snapping" the result to
zero as it is basically hiding the fact that i can't define pi with sufficient
accuracy and i can't compute with absolute accuracy either.
Your suggestion of using gmplib is interesting but there are some obstacles:
1.) gmplib is licences under the LGPL. Interfacing it would require changing
the muparserx licence to LGPL. This is something i object to.
2.) I'm not entirely sure whether gmplib, respectively its C++ wrapper could
work with std::complex and whether it has the necessary functions to support
most of the muparserx functionality.
3.) I don't want any additional dependencies in muparser. The archive should
compile without the need to install any additional library.
In general i think this is actually a good idea but i don't see this happening
in the near future due to the issues mentioned above and a lack of time on my
side. The good thing is that muparserx is open source and if anyone wants to
take the initiative with a fork i would be willing to assist.
Original comment by [email protected]
on 29 Jan 2013 at 10:32
from muparserx.
Original comment by [email protected]
on 4 Feb 2013 at 1:38
- Changed state: Done
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from muparserx.
Related Issues (20)
- Tag for release 4.0.9 HOT 2
- Missing header HOT 1
- README says that the version is 4.0.9 but the last tag is 4.0.8 HOT 2
- how to switch rad or gra when use trigonometric function HOT 2
- Incorrect Assignment Multiplication HOT 1
- Inconsistent Use of Signedness for Binary and Hex Numbers
- Feature Request: Add an Octal Value Reader
- logic operator lack shor-circuit feature
- 4.0.10 FTBFS HOT 1
- constant starting with letter 'o' HOT 5
- Example fails on macOS HOT 7
- int to bool conversion HOT 3
- type checking HOT 1
- xor is listed in the documentation but not implemented HOT 3
- Is it possible to directly represent a matrix instead of using many lines to define it? HOT 4
- FunTan and FunSin error HOT 2
- Is matrix algebra in SetExpr possible? HOT 2
- UnknownException when defining variables with dot (.) HOT 3
- Integer test causes floating point exceptions? HOT 1
- Assuming clang as the only compiler on Apple plaform. HOT 1
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 muparserx.