Esempio n. 1
0
        public static ADouble operator /(double K, ADouble x)
        {
            ADouble temp = new MasterThesis.ADouble();

            temp.Value           = K / x.Value;
            temp.PlacementInTape = AADTape._tapeCounter;
            AADTape.AddEntry((int)AADUtility.AADCalculationType.ConsDiv, x.PlacementInTape, 0, 0, temp.Value, K);
            return(temp);
        }
Esempio n. 2
0
        public static ADouble operator /(ADouble x, double K)
        {
            // Note that we store this as a "ConsMul" on the tape
            ADouble temp = new MasterThesis.ADouble();

            temp.Value           = x.Value / K;
            temp.PlacementInTape = AADTape._tapeCounter;
            AADTape.AddEntry((int)AADUtility.AADCalculationType.ConsMul, x.PlacementInTape, 0, 0, temp.Value, 1 / K);
            return(temp);
        }