Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Issue with multiplication of decimal amounts #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Brekeke
Copy link

@Brekeke Brekeke commented May 16, 2022

In PHP 7.4 is need round for sure entire result, in other case there are possible small differences for some decimal values after multiplication, concrete example: 69.85 * 100 = 6984.999999999999 => intval() => 6984. It's caused with some decimal amounts, which can't be represented accurately.

In PHP 7.4 is need round entire result, in other case there are small differences for some float values after multiplication, example: 69.85 * 100 = 6984.999999999999). It's caused with some float amounts, which can't be represented accurately.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant