Conversion functions between numeric bases
Framework for numerical computations, data analysis and visualisation
Brought to you by:
numere
Implement conversion functions to convert numbers between multiple bases. Either via implicit conversion by entering prefixes like
b101001
0x23A4F
o215714
or by adding explicit conversion functions, which will enforce using strings
basetodec("0xFF", "hex") -> 255
dectobase(255, "hex") -> "0xFF"
Obviously, the used parser library does not support using prefixes on non-numeric expressions. Therefore it is needed that we implement the functionality as string functions using std::stringstream for example.
Added to the SW tests. Tests run without any deviation.
Anonymous
Diff:
Diff:
Diff:
Related
Commit: [r806]
Diff: