public SemanticRec[] gen_cast_division(SemanticRec left, SemanticRec right)
    {
        Type leftType = getTypeFromSR(left);
        Type rightType = getTypeFromSR(right);

        SemanticRec[] arrRec = new SemanticRec[2];
        boolean properCastL = false;
        boolean properCastR = false;

        if (leftType == Type.FLOAT)
        {
            //no cast needed
            arrRec[0] = left;
            properCastL = true;
        }
        else if (leftType == Type.INTEGER)
        {
            //cast left to float
            /*
             * The following cast works because of the way the stack in the VM is initialized
             * when the stack pointer is moved back the value that use to be on top is not lost just not currently in "scope"
             * once the cast happens on the new "top" the pointer is moved back and it was like nothing happened to the value
             */
            comment("start cast left to float");
            sub("SP", "#1", "SP"); //move to the left var on the stack
            castStackToF();
            add("SP", "#1", "SP"); //move back to original place
            comment("end cast left to float");
            arrRec[0] = new SemanticRec(RecordType.LITERAL, Type.FLOAT.toString());
            properCastL = true;
        }
        else
        {
            properCastL = false; //left not an Int or Float
        }

        if (rightType == Type.FLOAT)
        {
            //no cast needed
            arrRec[1] = right;
            properCastR = true;
        }
        else if (rightType == Type.INTEGER)
        {
            //cast right to float
            castStackToF(); //top value
            arrRec[1] = new SemanticRec(RecordType.LITERAL, Type.FLOAT.toString());
            properCastR = true;
        }
        else
        {
            properCastR = false; //Right type was not an integer or float
        }

        if (!properCastL || !properCastR)
        {
            //invalid cast
            Parser.semanticError("Invalid cast from " + rightType + " to " + leftType);
            return null;
        }
        return arrRec;
    }