[pixel shader]
float4 main() : SV_TARGET
{
    float x = 0.05;
    float y = 0.15;

    return float4(x + y, x - y, x * y, x / y);
}

[test]
draw quad
probe (0, 0) rgba (0.20, -0.10, 0.0075, 0.33333333) 1

[pixel shader]
float4 main() : SV_TARGET
{
    float x = 0.05;
    float y = 0.15;

    return float4(x % y, +x, -x, y % x);
}

[test]
draw quad
probe (0, 0) rgba (0.05, 0.05, -0.05, 0.0) 1

[pixel shader]
float4 main() : SV_TARGET
{
    float x = 0.42;
    float y = 0.05;

    return float4(x % y, -x % y, x % -y, -x % -y);
}

[test]
draw quad
probe (0, 0) rgba (0.02, -0.02, 0.02, -0.02) 16

[pixel shader]
float4 main() : SV_TARGET
{
    float x = 45;
    float y = 5;

    return float4(x % y, -x % y, x % -y, -x % -y);
}

[test]
draw quad
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)

[pixel shader]
float4 main() : sv_target
{
    float4 x = {0.5, -4.21, 0.4, 45.0};
    float4 y = {1.5, -0.5, 0.41, 5.0};

    return x % y;
}

[test]
draw quad
probe (0, 0) rgba (0.5, -0.21, 0.4, 0.0) 6

[pixel shader fail(sm>=2&sm<4)]
float4 main() : SV_TARGET
{
    float x = 1;
    float y = 0;

    return x / y;
}

[test]
draw quad
if(sm<2)  probe (0, 0) f32(0, 0, 0, 0)
if(sm>=4) probe (0, 0) f32(inf, inf, inf, inf)
