I'm trying to implement an algorithm to solve conversion of base, and I'm stuck.
I want to express value in this form: $ v = a×b^e$ . How can I solve this problem? If a $\epsilon \ I_{\ne 0}\ , e \ \epsilon \ I$ and v and b are given.
An example:
$v = 0.02 ;\ b = 10;$
Which smallest value of a and e must have to meet the conditions?
Foreword, I apologize if there's misunderstood, it's my first time posting here in MathStackExchange.
I Assume that $I$ is supposed to the integers. (Commonly we denote the integers by $\Bbb Z$ - when I is used to represent a set of numbers, most commonly that set will be $[0,1]$, all numbers $\ge 0$ and $\le 1$. But there is no standard meaning for $I$. If you do not already know - for certain - that some notation you are using is a widely practiced standard, it is best to define/explain the notation instead of just assuming everyone will understand.)
There are two cases you have to consider:
Even when you restrict to numbers representable on a computer, unless $b$ is even, the vast majority of representable numbers will not have a terminating base $b$ expansion. I.e., they cannot be expressed as $a\times b^e$ for integer $a, e$.