## Search found 2878 matches

- 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...

- 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...

### Re: Squares

Albert wrote:I got lossless compression working...

Then it is simply another a "hash function". It is not "lossless compression".Albert wrote:The compressor works. I just can't figure out how to decompress it.

### 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.

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.

- 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 ...

### 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...

### 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.

You are using Short integers, so half the time you should expect a minus sign as the first digit.

Use Ushort integers instead.

### 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...

### 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 ...

### 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 ...

### Re: Squares

Albert wrote:I found an algorithm that works!!

How do you know it works if you have not thoroughly tested it.Albert wrote:The compression and decompression are extremely fast... I still need to run some tests , to see if it decompresses properly..

Your compression factor is subject to the Dunning-Kruger effect.

### 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...

### 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...

### 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...

### 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 ...