summaryrefslogtreecommitdiff
path: root/src/number.h (follow)
AgeCommit message (Collapse)Author
2013-05-09Added Number::toRadix & Number::set( int32_t ).Mike Buland
Both very handy. I'll add other numeric setters later, it was very easy.
2013-04-23Added == operator to compare Numbers & stringsMike Buland
We may be able to go even a step further, but it actually parses the string as a number with the same radix and scale as the left hand side of the equation and then compares them as Numbers. This means that it's actually more resiliant to minor formatting differences.
2013-04-22Fixed bug in multiply, added toInt32 function.Mike Buland
Multiply was ignoring the zero column, which was odd. I fixed this other places but apparently missed multiply.
2013-04-19Added routines to get/set scale.Mike Buland
2013-04-19Fractional divisoin works.Mike Buland
It doesn't round yet, and there's a chance I should be increasing the precision, right now it keeps the precision of the left hand side number.
2013-04-16Broke the string parser.Mike Buland
2013-04-16Cleaned up some naming.0.01Mike Buland
iOrd is now iScale (places to the right of the decimal. And iOrder is now iIdx, since it was just an index.
2013-04-16Added formatter for Number.Mike Buland
I'm a little embarassed that I didn't do this from the start, made the code so much easier to read.
2013-04-16Full support for arbitrary radixes is in place.Mike Buland
It computes the radix and bitwidth dynamically, we could probably speed that up another step by simply having a table of common ones, but for now it'll work for anything.
2013-04-16The divide function is public now.Mike Buland
2013-04-16Added /, %, and = operators.Mike Buland
Division now works just fine, but by long division. There are apparently much faster ways of doing division, but as long as it works I feel like that's a great start :)
2013-04-16Added operators: -, ==, !=, <, >, <=, >=Mike Buland
Still working on division, needed some other operators to make it work.
2013-04-15Addition, subtraction, and multiplication work nowMike Buland
Division isn't working yet, there are too many options, I'll figure out something eventually :-P
2013-04-15Initial checkin.Mike Buland
This project will most likely just be stuck into libbu++, but I didn't want to deal with building it all in windows.