For some days I'm trying to convert a double from any base to another ( tipically 2, 10 or 16), but with no luck. I thought it will be easy to find a library or some kind of an api.
I only could find convert Integer valueas or BigInteger but they had no fractional part so it is pointless. Unfortunately the Double class or the BigDecimal does not have the base convertion.
I have thought about dividing 2 numbers in that particular base, but again the BigDecimal does not have this feature like BigInteger does.
Wich is the apropiate way to this as I'm thinking about it for a couple of days and manually I'm losing way too much precision (or I implemented it poorly)?
Can you please teach me how to do this?
Sent from my Nexus 5 using XDA Free mobile app