Name: Anonymous 2011-01-29 4:05
What is a good way of doing multiplication function in C++ for a unit list-based numeric system?
Example: 105 = [1][2][3]
I was thinking something like this:
>LHS * RHS
>set iterators to least significant digit (LSD)
>for(RHS; RHS != end (MSD); ++RHS)
>----for(LHS; LHS != end (MSD); ++LHS)
>---------A * B
any better thoughts?
Example: 105 = [1][2][3]
I was thinking something like this:
>LHS * RHS
>set iterators to least significant digit (LSD)
>for(RHS; RHS != end (MSD); ++RHS)
>----for(LHS; LHS != end (MSD); ++LHS)
>---------A * B
any better thoughts?