minimum possible value of any number?

Discussion in 'Computer Science & Culture' started by suhailkaleem, Jan 27, 2003.

Thread Status:
Not open for further replies.
  1. suhailkaleem Registered Member

    Messages:
    1
    Hi !

    i have a number ( e.g : 128971109875( it can be any number ) )

    now i want formula , loop , methods or any thing that will convert this number to the possilbe lowest value and the revrse should also be possible !

    i thought and got a answer but there is also problem with it
    let me explain
    let say i have number 38
    now i will keep divind it by 2 if the number is odd i will add 1 and then divide it by 2 agian the loop will continuw and i will ave series of 1's and 2's

    38 /2 = 19 divide 2
    19+1 = 20 add 1(add number)
    20/2 = 10 divide 2
    10 /2 = 5 divide 2
    5+1 = 6 add 1 (add number)
    6/2= 3 divide 2
    3+1= 4 add 1 (add number)
    4/2= 2 divide 2
    2/2= 1 divide 2



    so i got 2 1 2 2 1 2 1 2 2
    and now i can also get the number 38
    but u see by this method i get more numebr than 38
    38 = 2 digits
    2 1 2 2 1 2 1 2 2 = 9 digits

    i was trying to make it compact but it grew larger

    so is there nay way i simly put the num 38( or any number) it will give me smallet walue possilbe and also i could convert it back to that nuber

    i currenlty have very long numbers inafct very very long number so that si why i ma saking for such a formaula
    Thanks
    in advance
    suhailkaleem
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. chroot Crackpot killer Registered Senior Member

    Messages:
    2,350
  4. Google AdSense Guest Advertisement



    to hide all adverts.
Thread Status:
Not open for further replies.

Share This Page