Search found 2878 matches

by Richard
May 19, 2019 20:30
Forum: General
Topic: Need faster Exponentiate
Replies: 19
Views: 531

Re: Need faster Exponentiate

I'm happy that you find them useful. You can credit me as “Richard Freebasic”. I am interested in the particular n-gram techniques you are using for the solution of substitution ciphers. Do you have any references to papers or books that cover n-gram based solution. These routines were written as “p...
by Richard
May 19, 2019 5:51
Forum: General
Topic: Need faster Exponentiate
Replies: 19
Views: 531

Re: Need faster Exponentiate

@Provoni The 12% errors in the above crude approximation can be reduced by taking the log2 of the mantissa and the antilog2 of the result. That can be done with simple polynomials faster than the intrinsic function calls. It is important to use only primitive +, –, * and bitwise operators. Avoid div...
by Richard
May 18, 2019 1:46
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

Albert wrote:I got lossless compression working...
Albert wrote:The compressor works. I just can't figure out how to decompress it.
Then it is simply another a "hash function". It is not "lossless compression".
by Richard
May 17, 2019 15:02
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

@albert.
I believe in the science of information theory which says that you cannot compress truly random data.
I think you have tricked yourself, not Zlib.
by Richard
May 16, 2019 22:16
Forum: General
Topic: Need faster Exponentiate
Replies: 19
Views: 531

Re: Need faster Exponentiate

'======================================================================= ' approximate a ^ b Function approx_power( Byval a As Double, Byval b As Double ) As Double Dim As Long Ptr fp = 1 + Cptr( Long Ptr, @a ) Dim As Long tmp = ( *fp - 1072632447 ) * b *fp = tmp + 1072632447 Return a End Function ...
by Richard
May 13, 2019 1:48
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

Now you need to find out how CUshort is supposed to work. Screen 19 Do cls ' make a string of bytes Dim As String v, s = "0123456789" Dim as integer i For i = 0 To len(s) - 1 s[ i ] = Int( Rnd * 256 ) Next i Dim As Short ts Dim As Ushort tus ' extract pairs of bytes Print "..." F...
by Richard
May 13, 2019 1:03
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

@Albert.
You are using Short integers, so half the time you should expect a minus sign as the first digit.
Use Ushort integers instead.
by Richard
May 09, 2019 0:49
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

@Albert MKI will output an integer for your platform, 32 or 64 bits. Use MKL to force 4 bytes. “ MKI supports an optional <bits> parameter before the argument. If bits is 16, MKShort will be called instead; if bits is 32, MKL will be called; if bits is 64, MKLongInt will be called. The length of the...
by Richard
Apr 01, 2019 20:05
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

Richard has been a downer on the compression idea , but I've used so much of his code in my programs, i thought I'd include him anyways. @Albert. Please don't include or associate me with your data compression ideas. I would really like to maintain some distance between myself and the liability. I ...
by Richard
Mar 24, 2019 23:09
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

I think i got the compressor working.. There's no way to decompress yet.. @Albert. There is no way your grid approach is going to be reversible. You need to stop posting hash functions and get back to us when you have a package that will compress to 50% or more, and will decompress to the original ...
by Richard
Mar 24, 2019 2:23
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

Albert wrote:I found an algorithm that works!!
Albert wrote:The compression and decompression are extremely fast... I still need to run some tests , to see if it decompresses properly..
How do you know it works if you have not thoroughly tested it.
Your compression factor is subject to the Dunning-Kruger effect.
by Richard
Mar 24, 2019 0:43
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

It would be easier to give the compressor away for free... And then charge a monthly fee when a connection tries to decompress. Then the company records all the credit and debit card numbers.. You are dreaming. To give it away requires you must first write a compressor that actually works. What i'm...
by Richard
Mar 23, 2019 4:32
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

A pre-decided compression will work only for a known redundant data type such as strings of only decimal digits. Compression cannot be done efficiently on a general bitfield by a pre-decided algorithm. To compress general data you must look for and find repeated sequences. That requires pattern reco...
by Richard
Mar 19, 2019 18:30
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

So with the grid idea: You can probably cancel all the values with 1 to 8 1's in the entire grid. Likewise you can probably cancel all the values of 1 to 8 0's in the entire grid. Most of the possible grids never occur in real life file data.. When you compress data you must keep a record of the pr...
by Richard
Mar 19, 2019 3:15
Forum: General
Topic: Squares
Replies: 6384
Views: 365809

Re: Squares

Compress the universe to a 1 x 1 grid and you have your singularity! The interesting question there is the size of the dictionary needed to regenerate the universe from 1 bit. Many string theory physicists believe that the content of a volume of the universe is fully expressed as a hologram on the ...

Go to advanced search