def gc_skew(dna):
    """
    Calculate the GC skew of a nucleotide sequence.

    s = (G - C) / (G + C)
    """
    gcount = dna.count('G') + dna.count('g')
    ccount = dna.count('C') + dna.count('c')
    if gcount + ccount == 0:
        return 0.0
    return float(gcount - ccount) / float(gcount + ccount)