BC Math Binary Calculator

suggest change

Introduction

The Binary Calculator can be used to calculate with numbers of any size and precision up to 2147483647-1 decimals, in string format. The Binary Calculator is more precise than the float calculation of PHP.

Syntax

Parameters

bcadd | Add two arbitrary precision numbers. | — | — |left_operand | The left operand, as a string. |right_operand | The right operand, as a string. |scale | A optional parameter to set the number of digits after the decimal place in the result. |bccomp | Compare two arbitrary precision numbers. |left_operand | The left operand, as a string. |right_operand | The right operand, as a string. |scale | A optional parameter to set the number of digits after the decimal place which will be used in the comparison.|bcdiv | Divide two arbitrary precision numbers. |left_operand | The left operand, as a string. |right_operand | The right operand, as a string. |scale | A optional parameter to set the number of digits after the decimal place in the result. |bcmod | Get modulus of an arbitrary precision number. |left_operand | The left operand, as a string. |modulus | The modulus, as a string. |bcmul | Multiply two arbitrary precision numbers. |left_operand | The left operand, as a string. |right_operand | The right operand, as a string. |scale | A optional parameter to set the number of digits after the decimal place in the result. |bcpow | Raise an arbitrary precision number to another. |left_operand | The left operand, as a string. |right_operand | The right operand, as a string. |scale | A optional parameter to set the number of digits after the decimal place in the result. |bcpowmod | Raise an arbitrary precision number to another, reduced by a specified modulus. |left_operand | The left operand, as a string. |right_operand | The right operand, as a string. |modulus | The modulus, as a string. |scale | A optional parameter to set the number of digits after the decimal place in the result. |bcscale | Set default scale parameter for all bc math functions. |scale | The scale factor. |bcsqrt | Get the square root of an arbitrary precision number. |operand | The operand, as a string. |scale | A optional parameter to set the number of digits after the decimal place in the result. |bcsub | Subtract one arbitrary precision number from another. |left_operand | The left operand, as a string.|right_operand |The right operand, as a string. |scale | A optional parameter to set the number of digits after the decimal place in the result. |

Remarks

For all BC functions, if the scale parameter is not set, it defaults to 0, which will make all operations integer operations.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


BC Math Binary Calculator:
* BC Math Binary Calculator

Table Of Contents
2 Arrays
4 Types
10 Cookies
14 JSON
15 SOAP
17 cURL
19 XML
21 Traits
35 UTF-8
36 URLs
38 PHPDoc
41 Loops
44 Closur
72 YAML
77 Cache
78 Streams
81 PDO
82 SQLite3
83 Sockets
87 MongoDB
93 IMAP
94 Redis
95 Imagick
99 BC Math Binary Calculator
102 APCu
108 PSR