Math is hard and many struggles with it especially those who never had a proper education. Math is considered a universal language because it is the same regardless if you speak Chinese or Arabic. Scientists are planning to use math to communicate with other alien life forms in outer space if they ever existed because math is the only true universal language.
Therefore, you would expect the Quran to be free from mathematical errors if a divine God wrote it.
Sadly, that is not the case.
Surah 4 of the Quran, which contains Allah's mathematics on dividing the inheritance, is rife with errors.
Quran(4,11-12) God instructs you regarding your children: The male receives the equivalent of the share of two females. If they are daughters, more than two, they get two-thirds of what he leaves. If there is only one, she gets one-half. As for the parents, each gets one-sixth of what he leaves, if he had children. If he had no children, and his parents inherit from him, his mother gets one-third. If he has siblings, his mother gets one-sixth. After fulfilling any bequest and paying off debts. Your parents and your children—you do not know which are closer to you in welfare. This is God's Law. God is Knowing and Judicious.
You get one-half of what your wives leave behind, if they had no children. If they had children, you get one-fourth of what they leave. After fulfilling any bequest and paying off debts. They get one-fourth of what you leave behind, if you have no children. If you have children, they get one-eighth of what you leave. After fulfilling any bequest and paying off debts. If a man or woman leaves neither parents nor children, but has a brother or sister, each of them gets one-sixth. If there are more siblings, they share one-third. After fulfilling any bequest and paying off debts, without any prejudice. This is a will from God. God is Knowing and Clement.
Consider just two of the examples: (A) a man died and his inheritors are his parents, wives and two daughters, Quran's mathematics require 113% of his estate to be divided; and, (B) if a man died his inheritors are his mother, wives and two sisters, Quran requires 108% of his estate to be divided, as follows:
66.7% = 2/3 for daughters 16.7% = 1/6 for mother
33.3% = 2 x (1/6) for parents 25.0% = 1/4 for wives
12.5% = 1/8 for wives 66.7% = 2/3 for sisters
112.5% = total for case (A) 108.4% = total for case (B)
And pi is implied to be exactly 3 in the Hebrew Scriptures and the Christian Bible (1 Kings 7:23, where a Temple vessel is described as being 10 cubits in diameter and 30 cubits in circumference).
Anyway, what happens in practice when families voluntarily follow Islamic law/teachings (I know, there are undoubtedly many versions!) and the person who died didn't leave a will?
What happens under civil law when a will specifies shares that don't add up? I Am Not A Lawyer, but I'd expect that everything could be scaled up or down to add up to 100%, to conform as much as possible to the deceased person's intentions.
It's like the old riddle about the man who left his 17 horses to his three sons, with the will specifying that the oldest son gets 1/2 of them, the middle son gets 1/3, and the youngest son gets 1/9. They're chagrined to realize they can't do it (while keeping all the horses alive and whole), and in some tellings this reawakens bad blood between the sons, who feel cheated, and they're about to fight physically; a friend or executor or wandering mathematician saves the day by [highlight to reveal] adding his own horse. The oldest gets 9 horses (1/2 of 18), the middle son gets 6, the youngest gets 2, and the mathematician gets his own horse back.