Am 07.10.19 um 09:50 schrieb John Erling Blad:
Found a few references to bcmath, but some weirdness made me wonder if it really was bcmath after all. I wonder if the weirdness is the juggling with double when bcmath is missing.
I haven't looked at the code in five years or so, but when I wrote it, Number was indeed bcmath with fallback to float. The limit of 127 characters sounds right, though I'm not sure without looking at the code.
Quantity is based on Number, with quite a bit of added complexity for converting between units while considering the value's precision. e.g. "3 meters" should not turn into "118,11 inch", but "118 inch" or even "120 inch", if it's the default +/- 0.5 meter = 19,685 inch, which means the last digit is insignificant. Had lots of fun and confusion with that. I also implemented rounding on decimal strings for that. And initially screwed up some edge cases, which I only realized when helping my daughter with her homework ;)