bcmath-extended | Extends php BCMath lib for missing functions like floor | Math library

 by   krowinski PHP Version: 6.0.0 License: MIT

kandi X-RAY | bcmath-extended Summary

kandi X-RAY | bcmath-extended Summary

bcmath-extended is a PHP library typically used in Utilities, Math applications. bcmath-extended has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

[License] Extends php BCMath lib for missing functions like floor, ceil, round, abs, min, max, rand for big numbers. Also wraps existing BCMath functions. (more Features === - config - setTrimTrailingZeroes - disable|enable trailing zeros (default trimming is enabled) - new tool methods - convertScientificNotationToString - converts scientific notation to string - getScale - gets current global scale - getDecimalsLengthFromNumber - gets amount of decimals - hexdec - converting from hexadecimal to decimal - dechex - converting from decimal to hexadecimal - bin2dec - converting from binary to decimal - dec2bin - converting from decimal to binary - new math functions - round - abs - rand - max - min - roundDown - roundUp - roundHalfEven - ceil - exp - log - fact - pow (supports fractional) - mod (supports fractional + scale in php 5.6 <) - bitwise operators - bitXor - bitOr - bitAnd - proxy for original functions (- all functions supports scientific notation - all functions are static, so it can be easy replaced by this lib.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              bcmath-extended has a low active ecosystem.
              It has 56 star(s) with 10 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 16 have been closed. On average issues are closed in 20 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of bcmath-extended is 6.0.0

            kandi-Quality Quality

              bcmath-extended has 0 bugs and 0 code smells.

            kandi-Security Security

              bcmath-extended has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              bcmath-extended code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              bcmath-extended is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              bcmath-extended releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed bcmath-extended and discovered the below as its top functions. This is intended to give you an instant insight into bcmath-extended implemented functionality, and help decide if they suit your requirements.
            • Performs a bitwise operator .
            • Performs a power modulus operation .
            • Returns the log of a number .
            • Rounds a number .
            • Divide a dividend to a given dividend
            • Convert decimal number to binary
            • Rounds a number up .
            • Rounds a number down .
            • Calculates a fact
            • Adds trailing zeroes to a number .
            Get all kandi verified functions for this library.

            bcmath-extended Key Features

            No Key Features are available at this moment for bcmath-extended.

            bcmath-extended Examples and Code Snippets

            No Code Snippets are available at this moment for bcmath-extended.

            Community Discussions

            Trending Discussions on bcmath-extended

            QUESTION

            Getting the modulo of two real numbers with BCMath
            Asked 2017-Oct-10 at 23:49

            I would like to find out whether one real number is a multitude of the other one. I'm using BC-Math because the code is part of a larger system doing price calculations and using floats results in wrong results on multiple calculations due to the behaviour of floating point math.

            BC-Math has bcmod() to get the modulus of an arbitrary precision number. However, before PHP 7.2 this function does not work with non-integer numeric strings. E.g:

            ...

            ANSWER

            Answered 2017-Oct-10 at 23:49

            I think it can be done using some math:

            You can relate mod(a,b) to a and b with this equation:

            Source https://stackoverflow.com/questions/46669629

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install bcmath-extended

            You can download it from GitHub.
            PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/krowinski/bcmath-extended.git

          • CLI

            gh repo clone krowinski/bcmath-extended

          • sshUrl

            git@github.com:krowinski/bcmath-extended.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link