## Search found 5676 matches

### Re: Squares

I found a formula that seems to work , LTRIM( n1 , "1" ) =================================== n1 = bin( *ubp ) : ubp+=1 v1 = instr( 1 , n1 , "0" ) if v1 < 4 then map+= right( "00" + bin( v1 ) , 2 ) n1 = ltrim( n1 , "1" ) else map+= "00" end if outs1+=...

### Re: Squares

Richard said "The only way to compress data , is to look for patterns." A random string "AFETHUNIOPLKM" There are no patterns to search for... Each element , is different from the others , and their all jumbled together.. You can't look for patterns in random data.. You have to (...

### Re: Squares

@Richard I found a snafu of sorts... In my code.. if len( n1 ) = 8 then n2 = mid( n1 , 3 ) + left( n1 , 2 ) if left( n2 , 1 ) = "1" then map+= "1" n2 = bin( val( "&B" + n2 ) mod 128 ) map+= "11" end if Since 8 bit values happen 50% of the time.. it's possi...

### Re: Squares

@Richard The moderators didn't mind , my lack of understanding trigonometry.. When i posted 100's of fumbling trig doodles.. All the trig doodles i posted , were just an amature playing around with trig functions , i don't understand... I never took advanced math classes in high school , just genera...

### Re: Squares

@Richard if len( n1 ) = 8 then n2 = mid( n1 , 3 ) + left( n1 , 2 ) if left( n2 , 1 ) = "1" then map+= "1" n2 = bin( val( "&B" + n2 ) mod 128 ) map+= "11" end if Is there a way to undo the MOD 128 ?? ( I'm not understanding how the MOD works... ) The map &q...

### Re: Squares

!!~~OFF TOPIC~~!! With the whole world hopping on to the "Black Live Matter" protests.. For "Black Lives Matter" U.S.A. I've arrived at a solution.... Each county in every U.S. state , creates a non-police ( IG ) Inspector General office to investigate police misconduct... The IG...

### Re: Squares

@Richard n1 = bin( *ubp ) : ubp+=1 if len( n1 ) < 5 then n2 = n1 : map+= "0" if len( n1 ) > 4 and len( n1 ) < 8 then n2 = "1" + mid( n1 , 3 ) + left( n1 , 2 ) : map+= "1" , = ( 6 , 7 , 8 bits ) if len( n1 ) = 8 then n2 = "1" + mid( n1 , 3 ) + left( n1 , 2 ) , ...

### Re: Squares

@Richard

You told me that ( n2 OR 384 ) would return the number , and include the top 2 bits.. the 128 bit , and the 256 bit..

Now your saying , "it can't be done" ? "You can't undo destruction."

You told me that ( n2 OR 384 ) would return the number , and include the top 2 bits.. the 128 bit , and the 256 bit..

Now your saying , "it can't be done" ? "You can't undo destruction."

### Re: Squares

@Richard n1 = 8 bits input ( 1 byte ) n2 = "1" + mid( n1 , 3 ) + left( n1 , 2 ) , = 9 bits output ( 256 + ) n2 = bin( val( "&B" + n2 ) OR 384 ) The ( n2 OR 384 ) you mentioned , compressed by 100,000 bytes to 53% after 100 loops, The ( n2 AND 127 ) you mentioned , only compre...

### Re: Squares

@Richard with n1 = 8 bits.. = "1000-0000" n2 = "1" + mid( n1 , 3 ) + left( n1 , 2 ) = 9 bits = "1" + "00-0000" + "10" n2 = bin( val( "&B" + n2 ) and 256 ) , compresses by 99% How do you adjust the the second formula ( AND 256 ) , so the...

### Re: Squares

@Richard n2 = "1" + mid( n1 , 3 ) + left( n1 , 2 ) , compresses n2 = "1" + mid( n1 , 4 ) + left( n1 , 3 ) , expands n2 = "1" + mid( n1 , 2 ) + left( n1 , 1 ) , expands With the topmost formula , how do you turn the 9 bits , into something 8 or less bits long? MOD 256 do...

### Re: Squares

@Richard The 9'th bit , is the leftmost bit... with the rightmost bit being bit 1... If you mod it by 128 , how would you recover the value.. Knowing it's 9 bits and the leftmost bit is set.. Is there a way to recover the number?? And could you explain the and 127 ?? can you use it instead of mod to...

### Re: Squares

@Richard

If i have a 9 bit binary value and mod it by 128 , how would you recover the value , when you know the 9'th bit is set??

If i have a 9 bit binary value and mod it by 128 , how would you recover the value , when you know the 9'th bit is set??

### Re: Squares

I looked and looked and found a coding error ... After fixing the error , it expands by 500 bytes on the first loop..instead of compressing 87% I found the error while writing the decompression.. I was getting all "0's" for the output... so it compressed down to the size of the map 12,940 ...

### Re: Squares

@angros47 When i started programming , i had several first objectives... ========================================================================================================== My first code posted to the FB forum was about making circles...See "Circles" I had forgotten my Atari Formula...