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

ext/bcmath: BcMath\Number class #4187

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

SakiTakamachi
Copy link
Member

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Partial review as there is already a bunch that needs fixing across the board.

reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
reference/bc/bcmath/number/construct.xml Outdated Show resolved Hide resolved
reference/bc/bcmath/number/add.xml Outdated Show resolved Hide resolved
reference/bc/bcmath/number/add.xml Outdated Show resolved Hide resolved
reference/bc/bcmath/number/tostring.xml Outdated Show resolved Hide resolved
reference/bc/bcmath/number/sub.xml Outdated Show resolved Hide resolved
SakiTakamachi and others added 7 commits December 2, 2024 12:08
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
@SakiTakamachi
Copy link
Member Author

@Girgias
Fixed!

@SakiTakamachi SakiTakamachi requested a review from Girgias December 2, 2024 04:16
@SakiTakamachi
Copy link
Member Author

SakiTakamachi commented Dec 2, 2024

Hmm. I don't understand why CI turns red...
No problems occur in my local

edit:
I wanted to change the explanation a little, so I stopped including on the part where the error occurred.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Some comments, the only concern is with the XIncludes, where I think waiting for @alfsb's PR to be merged might make more sense.

language-snippets.ent Outdated Show resolved Hide resolved
reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
reference/bc/bcmath.number.xml Outdated Show resolved Hide resolved
</methodsynopsis>
<simpara>
Compare two arbitrary precision numbers.
This method behaves similar to the spaceship operator.
Copy link
Member

Choose a reason for hiding this comment

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

Add a link to it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a link in 10b03c4

reference/bc/bcmath/number/div.xml Outdated Show resolved Hide resolved
Comment on lines 58 to 61
</simpara>
<example>
<title>Example of <property>BcMath\Number::scale</property> of result object</title>
<programlisting role="php">
Copy link
Member

Choose a reason for hiding this comment

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

Move the example to the corresponding section, if you want to point it out in the return value you can add an xml:id and link tag

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved in 57d7592

Comment on lines +40 to +43
<!-- ValueError cases -->
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('bcmath-number.add')/db:refsect1[@role='errors']/db:para[1])" />
<!-- The DivisionByZeroError case -->
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('bcmath-number.div')/db:refsect1[@role='errors']/db:simpara[1])" />
Copy link
Member

Choose a reason for hiding this comment

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

It might be better to wait for php/doc-base#198 to be merged than using XIncludes with indices

Copy link
Member

Choose a reason for hiding this comment

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

It was merged a few days ago, and I think there are already published manuals under it. So it's probably safe to start using it now.

reference/bc/bcmath/number/pow.xml Outdated Show resolved Hide resolved
<term><parameter>exponent</parameter></term>
<listitem>
<simpara>
The exponent, as an non-negative and integral (i.e. the scale has to be zero).
Copy link
Member

Choose a reason for hiding this comment

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

Use the same wording as in the pow method?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, pow accepts the negative exponent

SakiTakamachi and others added 11 commits December 17, 2024 00:21
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Gina Peter Banyard <girgias@php.net>
@SakiTakamachi
Copy link
Member Author

I thought I'd commented, but it seems I didn't....

I've fixed everything that needed to be fixed.

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.

3 participants