All pastes #498114 Raw Edit

Chao7

public cpp v1 · immutable
·published 2007-05-20 06:17 UTC
rendered paste body
const float cPi = 3.14159265; // 3.14159274const float4 ePi = float4(	3.14159e-00,	2.65358e-06,	9.79323e-12,	8.46264e-18);const float getPi_dp24() {    float rPi;    rPi = ePi[3] +          ePi[2] +          ePi[1] +          ePi[0] ;    return rPi;}const float getPi_dp18() {    float rPi;    rPi = ePi[2] +          ePi[1] +          ePi[0] ;    return rPi;}const float getPi_dp12() {    volatile float rPi;    rPi = ePi[1] +          ePi[0] ;    return rPi;}float4 main( ) : COLOR0 {    return float4( cPi, cPi, cPi, cPi ); // ~0.5 instructions :P    return float4( getPi_dp12(), getPi_dp12(), getPi_dp12(), getPi_dp12() ); // 1 instructions    return float4( getPi_dp18(), getPi_dp18(), getPi_dp18(), getPi_dp18() ); // 2 instructions    return float4( getPi_dp24(), getPi_dp24(), getPi_dp24(), getPi_dp24() ); // 3 instructions}