Skip to content

Add math library for calculating big numbers#156

Merged
m3m0r7 merged 1 commit into
masterfrom
add-new-math-library
May 13, 2019
Merged

Add math library for calculating big numbers#156
m3m0r7 merged 1 commit into
masterfrom
add-new-math-library

Conversation

@m3m0r7
Copy link
Copy Markdown
Member

@m3m0r7 m3m0r7 commented May 12, 2019

  • Optimize add/sub/multiply/divide calculations (int, long, float, double, short and so on).
  • Optimize and/or/xor calculations.
  • Optimize negate calculation.
  • Optimize left shift, right shift and unsigned right shift calculation.
  • Remove BinaryTool class.

@m3m0r7
Copy link
Copy Markdown
Member Author

m3m0r7 commented May 12, 2019

Related: #153

@m3m0r7
Copy link
Copy Markdown
Member Author

m3m0r7 commented May 12, 2019

TODO

  • Add long type shift calculations test into BinaryOperatorTest.
  • Add big number calculating test with long type.

@m3m0r7 m3m0r7 changed the title Add math library for calculating big numbers WIP: Add math library for calculating big numbers May 12, 2019
@m3m0r7 m3m0r7 force-pushed the add-new-math-library branch from a383ebe to 7f29c9c Compare May 13, 2019 03:47
@m3m0r7 m3m0r7 force-pushed the add-new-math-library branch from 7f29c9c to 81fd390 Compare May 13, 2019 03:48
@m3m0r7 m3m0r7 changed the title WIP: Add math library for calculating big numbers Add math library for calculating big numbers May 13, 2019
@m3m0r7 m3m0r7 merged commit 8366cb8 into master May 13, 2019
@m3m0r7 m3m0r7 deleted the add-new-math-library branch May 13, 2019 03:56
Comment thread README.md
And, PHPJava to use Java's type as below comparison table.
Therefore, we recommend to cast them to `string` on PHPJava.
And, if it can be calculated with 64-bitPHP, PHPJava uses PHP's arithmetic operations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally, PHP cannot calculate big numbers such as long and double types but PHPJava uses an external Math library to cover this issue as shown in the comparison table below. For this reason, we recommend you to cast those types to string in PHPJava. Additionally, if it . . .

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

Successfully merging this pull request may close these issues.

2 participants