All pastes #510259 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-25 20:33 UTC
rendered paste body
    {    
        int testIn = -100;    
        uint32_t resultIn = CFSwapInt32LittleToHost(testIn);    
        int testOut = CFSwapInt32HostToLittle(resultIn);
        printf("testIn=%d resultIn=%d testOut=%d\n", testIn, resultIn, testOut);
    }
    
    {
        Float32 testIn = 10.01;
    
        CFSwappedFloat32 resultIn = CFConvertFloat32HostToSwapped(testIn);
        Float32 testOut = CFConvertFloat32SwappedToHost(resultIn);

        printf("testIn=%f resultIn=%f testOut=%f\n", testIn, resultIn, testOut);
    }

    {
        Float64 testIn = 10.01;
    
        CFSwappedFloat64 resultIn = CFConvertFloat64HostToSwapped(testIn);
        Float64 testOut = CFConvertFloat64SwappedToHost(resultIn);

        printf("testIn=%f resultIn=%f testOut=%f\n", testIn, resultIn, testOut);
    }