public function testPointDouble() { $point = Util::PointDouble(new Point('89565891926547004231252920425935692360644145829622209833684329913297188986597', '-103633689937622365100603176395974509217114616778598935862658712053120463017733')); $expectedpoint = new Point("103388573995635080359749164254216598308788835304023601477803095234286494993683", "37057141145242123013015316630864329550140216928701153669873286428255828810018"); $this->assertEquals($expectedpoint, $point); $point = Util::PointDouble(new Point(1, 1)); $expectedpoint = new Point("28948022309329048855892746252171976963317496166410141009864396001977208667916", "14474011154664524427946373126085988481658748083205070504932198000988604333958"); $this->assertEquals($expectedpoint, $point); $point = Util::PointDouble(new Point(0, 0)); $expectedpoint = new Point("0", "0"); $this->assertEquals($expectedpoint, $point); $point = Util::PointDouble(new Point("0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", "0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8")); $expectedpoint = new Point("89565891926547004231252920425935692360644145829622209833684329913297188986597", "12158399299693830322967808612713398636155367887041628176798871954788371653930"); $this->assertEquals($expectedpoint, $point); }