Skip to content
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

Questions about the big-math library: Capabilities and Future. #60

Open
PowerUser1234 opened this issue Oct 15, 2022 · 12 comments
Open

Comments

@PowerUser1234
Copy link

PowerUser1234 commented Oct 15, 2022

-In terms of base 10 positive intetgers, is there a maximum positive integer that your library can load into memory and operate with?

-In terms of base 10 positive decimals (only), is there a minimum minute value that your library can load into memory and operate with?

-Full completion of the project Valhalla for Java along with OpenJDK promises value types and primitive types. I have gathered that it is possible to set up mathematics with the big-math library so that every operation does not require the precision to be submitted along as well, but that can be managed from one place within scope before the beginning of mathematics. If Valhalla allows operator inclusion with its new primitive types and other new advantages, are the big-math project developers likely going to be persuaded to incorporated into big-math? Operators like +,-,*, both modes of /, %, i++, i--, --i, ++i, +=, -=, *=, /= both modes, %= ?

@eobermuhlner
Copy link
Owner

The big-math library is built on top of the standard Java BigDecimal and has the same memory limitations.

Yes - I would probably provide Valhalla operators as soon as they are available. Depending on the details of Valhalla I would consider providing them in a separate library.

@PowerUser1234
Copy link
Author

The way that the Java OpenJDK original BigInteger and Bigdecimal method arithmetic methods presently work, every time you want to do an arithmetic operation, you need to include the MathContext, containing precision, each time. Admittedly, it should be easy to create a Factory class to mask and once submit a MathContext object so that arithmetic methods could be called more easily.

Does your library include the ability to just create and submit the Mathcontent/precision just once, at the top of a codespace, inside a "Factory" class, to generate BigIntegers and BigDecimals from there, so that you don't have to submit two parameters for every arithmetic call every time?

@eobermuhlner
Copy link
Owner

Yes, there is a DefaultBigDecimalMath that does not need to pass a MathContext with every call.
This class is used in the kotlin-big-math library: https://github.com/eobermuhlner/kotlin-big-math for the operators.

@PowerUser1234
Copy link
Author

Is there one of those for BigInteger as well?

@eobermuhlner
Copy link
Owner

eobermuhlner commented Nov 16, 2022 via email

@PowerUser1234
Copy link
Author

Why does the big-math library's BigInteger not need a MathContext? What does it use to specify the maximum number of figures?

@eobermuhlner
Copy link
Owner

eobermuhlner commented Nov 17, 2022 via email

@eobermuhlner
Copy link
Owner

Also just make it clear:
BigDecimal and BigInteger and standard Java classes.

The big-math library adds basically only static methods for mathematical operations on BigDecimal (none for BigInteger).

  • BigDecimalMath and DefaultBigDecimalMath

Additionally it provides the classes

  • BigComplex for complex numbers
  • BigRational for rational numbers

@PowerUser1234
Copy link
Author

PowerUser1234 commented Nov 20, 2022

If I wish to use the big-math library for OpenJDK Java, I need a High Precision Integer class, a Decimal class, and a Calculator class that may take either of the previous two, even after type conversion. What are the names of these 3 (three) classes?

@eobermuhlner
Copy link
Owner

eobermuhlner commented Nov 20, 2022 via email

@PowerUser1234
Copy link
Author

I have not mentioned classes, I have mentioned types of Numbers. What classes does big-math have that corresponds to an integer number, decimal number, and a calculator class for these two types of numbers?

@eobermuhlner
Copy link
Owner

eobermuhlner commented Nov 21, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants