Categories Here are each of the full logs (effective Apr 5, 2005, these may open in a new window.)

Summary section.

Entries from each log submitted during the last 30 days.

news - 2008-Dec-30

programming - 2008-Dec-24

  • Dec_24_2008

    Alternate formulation is something like... Need to verify "Average" and
    simplify (if possible).
    Let
       r = radix
       n = number of bits
    
    And
       i - log_2 (r)
       j = the number of bytes needed to make a character
    
    Then
       Best = ceil(i)/jn
       Average = (ceil(i) + 2 - 2^(1 + ceil(i))/r))/jn
       Worst = floor(i)/jn
    

    Link for this entry: http://home.ccil.org/~remlaps/weblog_2008/programming_index.html#ThesisFormula24Dec08

  • Dec_22_2008

    All representations of all numbers stored in a 3D matrix.
    X axis = base
    Y axis = numeral
    Z axis = digits (index 0 = ones place)

    scp44@tux64-07:~/programming/cpp$ cat dnum.cpp
    #include "NumSpace.h"
    #include 
    #include 
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
    
             int MB=atoi(argv[1]);
             int MN=atoi(argv[2]);
    
             NumSpace abc(MB,MN);
             abc.Print();
             abc.AllReps(47);
             for (int lcv=1;lcv<5;lcv++)
                     cout << abc.GetDigit(13,2,lcv);
             cout <
    #include 
    #include "NumSpace.h"
    
    int NumSpace::DigitMatrix[MAXBASE][MAXNUM][MAXLEN];
    
    NumSpace::NumSpace(int X, int Y)
    {
             // log_2(N) = log(N)/log(2)
        int Z=(int) ceil(log(Y+1) / log(2));
        Xs = X;
        Ys = Y;
        Zs = Z;
    
       for (int Dig=0; Dig<=Z; Dig++)
       {
               // std::cout << "Digit: " << Dig << std::endl;
             for (int Base=2; Base<=Xs; Base++)
             {
                     int DigVal=0, DigInd=1;
                     if ( Dig >0 ) DigVal = 1;
                     int length=pow(Base,Dig);
                     int Top=Dig+1;
                     if ( Dig > 0 ) Top--;
    
                     for (int Num=0; Num = Base ) DigVal = 0;
                             }
                     }
            }
       }
    };
    
    void NumSpace::Print()
    {
    for (int Base=2; Base<=Xs; Base++)
    {
             std::cout << std::endl << "Base " << Base << std::endl;
    
             for (int Num=2; Num<=Ys; Num++)
             {
                     std::cout << Num << ": ";
                     for (int Dig=Zs; Dig>=0; Dig--)
                             std::cout << DigitMatrix[Base][Num][Dig] << ", ";
                     std::cout << std::endl;
             }
    }
    };
    
    void NumSpace::AllReps(int N)
    {
             std::cout << "All reps for " << N << std::endl;
             for (int B = 2; B < Xs; B++ )
             {
                     std::cout << "Base " << B << ": ";
                     for (int Dig=Zs; Dig>=0; Dig--)
                             std::cout << DigitMatrix[B][N][Dig] << ", ";
                     std::cout << std::endl;
             }
    }
    
    int NumSpace::GetDigit(int N, int B, int D)
    {
             int nd=log(N+1)/log(B);
             return DigitMatrix[B][N][nd-D+1];
    }
    

    Link for this entry: http://home.ccil.org/~remlaps/weblog_2008/programming_index.html#NumberSpace22Dec08

  • Dec_13_2008

    Read later. From December's Journal of the ACM...

    "Linear-time disk-based implicit graph search" - Richard E. Korf
    http://doi.acm.org/10.1145/1455248.1455250

    Link for this entry: http://home.ccil.org/~remlaps/weblog_2008/programming_index.html#DiskGraphSearch12Dec08

science - 2009-May-13

  • Dec_24_2008

    http://www.sciam.com/article.cfm?id=oymyakon-the-coldest-town
    OK. They're putting the cart before the horse with "is expected" here...
    > "But if you want cold, visit Oymyakon, which this winter is expected to
    > reach (or perhaps exceed) its record low temperature: a bone-chilling
    > minus 90 degrees Fahrenheit (minus 68 degrees Celsius) reached on Feb.
    > 6, 1933. It is a record matched only by nearby Verkhoyansk, Siberia,
    > which endured minus 90 degrees Fahrenheit on Feb. 7, 1892."

    But if they turn out to be right, I think we can put the global warming
    idea to bed once and for all. An 1892 record, matched in 1933, then not
    matched again until 2008/2009. It's kind of hard to explain global
    warming when you're seeing record low temperatures of the once in 50 years
    variety.

    If they tie (or exceed) the record, it would seem that either the warming
    is not global or Oymyakon isn't part of the globe.

    Catastrophy cancelled. Phew.

    Link for this entry: http://home.ccil.org/~remlaps/weblog_2008/science_index.html#ColdWeather24Dec08