-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library is broken #5
Comments
@sublimator thank you the report: this must be an issue that should be addressed. As I specified, this library is a port of Harmony's Math package, that I adapted for .NET (for the code and the style), integrating it with some contributions for the big math functions. It would be precious if you could help out fixing some things. Thank you for the support. |
I think this is a super useful project, but sadly there seems to be a few
quirks.
If I can get some time I'll happily help out :)
|
Thank you for acknowledging the importance: it's actually a missing piece in .NET (even after 4.0 the decimals and astronomical numbers are missing). I wish to thank you for any support you might give: I will try inspecting any case you will rise up |
Maybe we can somehow use a Java bridge / J# runtime or something and generate a heap of tests, to match up the implementations ? And expose issues |
It's a matter of licensing: I used Harmony's version of the Java Math package because it was licensed under MIT, while Java is not so lose on license. This allowed me to use the library also in loose (or commercial) projects. |
How did you do the code conversion? |
the old way: manually. :) once it was ported and tested according to the test suite provided, I changed the design a bit, to make it more .NET fashion (.Parse, .TryParse, properties, etc.) |
It fails, with the actual value being 17 ... Yikes! Something to do with StripTrailingZeros ...
I've also seen issues with unnecessary rounding, when Parsing strings with a MathContext with a precision of 16, and where there's only been 16 digits. Probably negative numbers, cause I've seen negative numbers created using a big integer constructor, with a Precision of 17 when there's clearly only 16 digits, and that when you Abs() the value the Precision is 16.
I'm using
<package id="dmath" version="1.5.66" targetFramework="net45" />
I feel like this package needs a lot more testing? I don't really have the time at the moment.
The text was updated successfully, but these errors were encountered: