Exemplo n.º 1
0
        public FloatingPointLiteralValue(string mantissaSign, string mantissaIntegerPart, string mantissaDecimalPart, string exponentSign, string exponentNumber) : base(LiteralValueType.FloatingPoint)
        {
            Mantissa = new DecimalLiteralValue(mantissaSign, mantissaIntegerPart, mantissaDecimalPart);
            Exponent = new IntegerLiteralValue(exponentSign, exponentNumber);

            Number = Mantissa.Number * Math.Pow(10, Exponent.Number);
        }
Exemplo n.º 2
0
        public FloatingPointLiteralValue(string mantissaSign, string mantissaIntegerPart, string mantissaDecimalPart, string exponentSign, string exponentNumber)
            : base(LiteralValueType.FloatingPoint)
        {
            Mantissa = new DecimalLiteralValue(mantissaSign, mantissaIntegerPart, mantissaDecimalPart);
            Exponent = new IntegerLiteralValue(exponentSign, exponentNumber);

            Number = Mantissa.Number * Math.Pow(10, Exponent.Number);
        }