Results 1 to 3 of 3

Thread: [RESOLVED] Express big integers into smallest possible values

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2018
    Posts
    276

    Resolved [RESOLVED] Express big integers into smallest possible values

    I´d like to ask you if there´s the simplest way how to express big integers into smaller values. for example: 445222542222100000222333333225554 Maybe with factorization?

    Thanks a lot.

    VB.NET Developer
    Last edited by VB.NET Developer; Sep 24th, 2019 at 01:08 PM. Reason: duplicate infos

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: Express big integers into smallest possible values

    The numbers you are showing are in base 10 I assume. If you change to base 16 the same number would take less characters to express. If you changed to a higher base (say base 26) you could express the same value with even less characters. You could then extend that to base 256 which would compress the value significantly. Essentially each character in the displayed value would actually be a value from 0-255.

    For example the base 10 value = "t4~" would be

    (ASC("t") * 265^2) + (ASC("4") * 256) + ASC("~") = (116 * 256^2) + (52 * 256) + 126 = 7,615,614

    Of course if you need all of the values to be visible you would need to get tricky and use base 95 with a 32 offset so your characters would be ascii values 32-127.

    If you went this route, you would probably want to write you own random generator that wraps the Random class.
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2018
    Posts
    276

    Re: Express big integers into smallest possible values

    Of course if you need all of the values to be visible
    No, I dont need that.

    Thanks. My problem is sloved now.
    VB.NET Developer
    Last edited by VB.NET Developer; Jan 12th, 2021 at 01:50 PM. Reason: added more info

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width