Esempio n. 1
0
        //****************************************************************************************************
		public override NumVar mul(NumVar b) {
			try {
				return new RealVar(this.m_val*((NumVar) b).ToDouble());
			}
			catch (Exception) {
				throw new CalcException("Ошибка в вычислениях.");
			}
		}
Esempio n. 2
0
        //****************************************************************************************************
		public virtual NumVar div(NumVar b) {
			try {
				return new RealVar(this.ToDouble()/b.ToDouble());
			}
			catch {
				throw new CalcException("ќшибка в вычислени¤х");
			}
		}
Esempio n. 3
0
        //****************************************************************************************************
		public override NumVar sub(NumVar b) {
			if (b.IsInt())
				return new IntVar(this.m_val - ((IntVar) b).Val);
			else if (b.IsReal()) {
				try {
					return new RealVar((double) this.m_val - ((RealVar) b).Val);
				}
				catch (System.SystemException) {
					throw new CalcException("ќшибка в вычислени¤х.");
				}
			}
			else
				return null;
		}
Esempio n. 4
0
        //****************************************************************************************************
		public abstract NumVar mul(NumVar b);
Esempio n. 5
0
        //****************************************************************************************************
		public abstract NumVar sub(NumVar b);