-
Notifications
You must be signed in to change notification settings - Fork 752
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
base: master
Are you sure you want to change the base?
Conversation
a75b307
to
f50378d
Compare
f50378d
to
3a9547b
Compare
There was a problem hiding this 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.
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>
@Girgias |
Hmm. I don't understand why CI turns red... edit: |
c919793
to
6899586
Compare
There was a problem hiding this 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.
</methodsynopsis> | ||
<simpara> | ||
Compare two arbitrary precision numbers. | ||
This method behaves similar to the spaceship operator. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
</simpara> | ||
<example> | ||
<title>Example of <property>BcMath\Number::scale</property> of result object</title> | ||
<programlisting role="php"> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved in 57d7592
<!-- 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])" /> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
<term><parameter>exponent</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The exponent, as an non-negative and integral (i.e. the scale has to be zero). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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>
I thought I'd commented, but it seems I didn't.... I've fixed everything that needed to be fixed. |
RFCs:
https://wiki.php.net/rfc/support_object_type_in_bcmath
https://wiki.php.net/rfc/fix_up_bcmath_number_class
stub:
https://github.com/php/php-src/blob/master/ext/bcmath/bcmath.stub.php