Exemple #1
0
        public IPNumber Sqr()
        {
            IPNumber tmp = new IPNumber(this);

            tmp.n = this.n * this.n;
            return(tmp);
        }
Exemple #2
0
        public IPNumber Revers()
        {
            IPNumber tmp = new IPNumber(this);

            tmp.n = 1 / this.n;
            return(tmp);
        }
Exemple #3
0
        public IPNumber Mult(IPNumber d)
        {
            IPNumber tmp = new IPNumber(d);

            if (d.b != this.b || d.c != this.c)
            {
                tmp.n = 0.0;
                return(tmp);
            }
            tmp.n = this.n * d.n;
            return(tmp);
        }
Exemple #4
0
 public IPNumber(IPNumber d)
 {
     n = d.n;
     b = d.b;
     c = d.c;
 }