Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BigNumber.php

function BigNumber::toFloat

Returns an approximation of this number as a floating-point value.

Note that this method can discard information as the precision of a floating-point value is inherently limited.

If the number is greater than the largest representable floating point number, positive infinity is returned. If the number is less than the smallest representable floating point number, negative infinity is returned.

3 methods override BigNumber::toFloat()
BigDecimal::toFloat in vendor/brick/math/src/BigDecimal.php
Returns an approximation of this number as a floating-point value.
BigInteger::toFloat in vendor/brick/math/src/BigInteger.php
Returns an approximation of this number as a floating-point value.
BigRational::toFloat in vendor/brick/math/src/BigRational.php
Returns an approximation of this number as a floating-point value.

File

vendor/brick/math/src/BigNumber.php, line 495

Class

BigNumber
Common interface for arbitrary-precision rational numbers.

Namespace

Brick\Math

Code

public abstract function toFloat() : float;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal