Skip to content

Broken super strict on precision/scale policy #13

@DannyMeyer

Description

@DannyMeyer

With every calculation operation where $scale can be provided, the super strict on precision/scale policy is beeing softened.

For example:

$decimal = new Decimal('123.123456');
$value = $decimal->add(0, 2);
var_dump($value->toString());

will result in

string(6) "123.12"

With the strict policy i would expect the InvalidArgumentException with the message: Loss of precision detected. Detected scale 6>2 as defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions