CRUDUI PHP API

Numbers
in package

FinalYes

Decimal display of binary64 values.

Table of Contents

Methods

fixed()  : string
Truncate the precision and round the exact binary value; ties increase magnitude.
string()  : string
Format a number with decimal and exponent thresholds matching the form model.
divideTwo()  : array<string|int, mixed>
increment()  : string
multiply()  : string

Methods

fixed()

Truncate the precision and round the exact binary value; ties increase magnitude.

public static fixed(float $number, int|float $decimals) : string
Parameters
$number : float
$decimals : int|float
Return values
string

string()

Format a number with decimal and exponent thresholds matching the form model.

public static string(int|float $number) : string
Parameters
$number : int|float
Return values
string

divideTwo()

private static divideTwo(string $digits) : array<string|int, mixed>
Parameters
$digits : string
Return values
array<string|int, mixed>

increment()

private static increment(string $digits) : string
Parameters
$digits : string
Return values
string

multiply()

private static multiply(string $digits, int $factor) : string
Parameters
$digits : string
$factor : int
Return values
string
On this page

Search results