-
Notifications
You must be signed in to change notification settings - Fork 814
ext/bcmath: BcMath\Number
class
#4187
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
Merged
Merged
Changes from 18 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
32868b6
created common part
SakiTakamachi 78d52d4
created class
SakiTakamachi 0d4e68e
edit book, ini
SakiTakamachi 824d901
Added the class into versions
SakiTakamachi 44f5092
Created construct, serialize, unserialize, toString
SakiTakamachi df9d597
Created add()
SakiTakamachi 5a711ab
Created sub()
SakiTakamachi 5a2b677
Created div()
SakiTakamachi 64e3458
Created mul()
SakiTakamachi 3ee4949
Created mod()
SakiTakamachi 34f4a6d
Created pow()
SakiTakamachi e348369
Created divmod()
SakiTakamachi be8b29d
Created powmod()
SakiTakamachi 8619f4c
Created ceil()
SakiTakamachi de38dc7
Created floor()
SakiTakamachi 23ef913
Created round()
SakiTakamachi 67ad21f
Created compare()
SakiTakamachi 3a9547b
Created sqrt()
SakiTakamachi 7b51ff8
address a comment
SakiTakamachi 19d38dd
address a comment
SakiTakamachi 88ca28e
address a comment
SakiTakamachi 1917ae3
address a comment
SakiTakamachi 646fe01
address a comment
SakiTakamachi 228cba8
address a comment
SakiTakamachi 3ffc207
address a comment
SakiTakamachi 22792d5
Address comments and more
SakiTakamachi 10e1602
changed "larger" to "greater" and "smaller than" to "less than"
SakiTakamachi cafb7ff
typo
SakiTakamachi 3a7ed30
Changed the scale param desctiption
SakiTakamachi cd6f8d7
Deleted unnecessary descriptions
SakiTakamachi 6899586
Avoid nesting includes
SakiTakamachi c860c08
address a comment
SakiTakamachi 043e7e2
address a comment
SakiTakamachi 5b1228f
address a comment
SakiTakamachi d2e7031
address a comment
SakiTakamachi d480231
address a comment
SakiTakamachi cb0d697
address a comment
SakiTakamachi 6a35375
address a comment
SakiTakamachi 60a76f1
Moved varlistentry of scale parameter to add()
SakiTakamachi 10b03c4
Added a link to "spaceship operator"
SakiTakamachi 6411e68
fixed "+<literal>10" to "<literal>+10"
SakiTakamachi 57d7592
Moded a example code
SakiTakamachi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- $Revision$ --> | ||
<reference xml:id="class.bcmath-number" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
|
||
<title>The BcMath\Number class</title> | ||
<titleabbrev>BcMath\Number</titleabbrev> | ||
|
||
<partintro> | ||
<section xml:id="bcmath-number.intro"> | ||
&reftitle.intro; | ||
<para> | ||
A class for an arbitrary precision number. These objects support overloaded | ||
<link linkend="language.operators.arithmetic">arithmetic</link> and | ||
<link linkend="language.operators.comparison">comparison</link> operators. | ||
</para> | ||
SakiTakamachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<note> | ||
<simpara>This class is not affected by <parameter>bcmath.scale</parameter> in &php.ini;.</simpara> | ||
</note> | ||
SakiTakamachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<note> | ||
<simpara> | ||
For more information about calculations with operators, see the documentation | ||
for the methods that correspond to the operators. | ||
</simpara> | ||
SakiTakamachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</note> | ||
</section> | ||
|
||
<section xml:id="bcmath-number.synopsis"> | ||
&reftitle.classsynopsis; | ||
|
||
<classsynopsis class="class"> | ||
<ooclass> | ||
<modifier>final</modifier> | ||
<modifier>readonly</modifier> | ||
<classname>BcMath\Number</classname> | ||
</ooclass> | ||
|
||
<oointerface> | ||
<modifier>implements</modifier> | ||
<interfacename>Stringable</interfacename> | ||
</oointerface> | ||
|
||
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo> | ||
<fieldsynopsis> | ||
<modifier>public</modifier> | ||
<type>string</type> | ||
<varname linkend="bcmath-number.props.value">value</varname> | ||
</fieldsynopsis> | ||
<fieldsynopsis> | ||
<modifier>public</modifier> | ||
<type>int</type> | ||
<varname linkend="bcmath-number.props.scale">scale</varname> | ||
</fieldsynopsis> | ||
|
||
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> | ||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.bcmath-number')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='BcMath\\Number'])"> | ||
<xi:fallback/> | ||
</xi:include> | ||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.bcmath-number')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='BcMath\\Number'])"> | ||
<xi:fallback/> | ||
</xi:include> | ||
</classsynopsis> | ||
</section> | ||
|
||
<section xml:id="bcmath-number.props"> | ||
&reftitle.properties; | ||
<variablelist> | ||
<varlistentry xml:id="bcmath-number.props.value"> | ||
<term><varname>value</varname></term> | ||
<listitem> | ||
<para> | ||
A string representation of an arbitrary precision number. | ||
</para> | ||
</listitem> | ||
SakiTakamachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</varlistentry> | ||
<varlistentry xml:id="bcmath-number.props.scale"> | ||
<term><varname>scale</varname></term> | ||
<listitem> | ||
<para> | ||
The scale value currently set on the object. | ||
</para> | ||
</listitem> | ||
SakiTakamachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</varlistentry> | ||
</variablelist> | ||
</section> | ||
|
||
</partintro> | ||
|
||
&reference.bc.bcmath.entities.number; | ||
|
||
</reference> | ||
<!-- Keep this comment at the end of the file | ||
Local variables: | ||
mode: sgml | ||
sgml-omittag:t | ||
sgml-shorttag:t | ||
sgml-minimize-attributes:nil | ||
sgml-always-quote-attributes:t | ||
sgml-indent-step:1 | ||
sgml-indent-data:t | ||
indent-tabs-mode:nil | ||
sgml-parent-document:nil | ||
sgml-default-dtd-file:"~/.phpdoc/manual.ced" | ||
sgml-exposed-tags:nil | ||
sgml-local-catalogs:nil | ||
sgml-local-ecat-files:nil | ||
End: | ||
vim600: syn=xml fen fdm=syntax fdl=2 si | ||
vim: et tw=78 syn=sgml | ||
vi: ts=1 sw=1 | ||
--> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.