Den lördag 4 april 2015 kl. 09:35:04 UTC+2 skrev jonas.t...@gmail.com:
> After i managed to write some functions actually doing arithmetic in bignumbers, basicly by handling them as strings where digit places read into an array.
>
> I decided to try change a previously written basechanger into also handling bignumbs. And it proved to be a much harder task than i origially thought.
>
>
> How do you go from compare size of integers to compare size of stored digitplaces in arrays?
>
> Also the bignumb multiplication assume that the two arrays passed to it is already parsed in the order bigger, smaller. Should i really have to move the parsing code into the multiplication, or make a function call from multiplication changing the order?
>
> I had not expect much of the code needed to be changed, except for the actual arithmetic operands with operators, interchanged with function calls. But it is alot more things like comparissons that would need to change.
This is probably why bignumb should be supported right out of the box in programming languages. Because it is not just the actual code dealing with the arithmetic operators that has to change, the whole approach when writing code has to change, since every comparisson is affected (well at least though incorporating possible bignumbs).