A secret of 《The Tai Chi Master》

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 3598
64-bit integer IO format: %I64d      Java class name: Main

Description

Do you remember a TV play called “The Tai Chi Master” in 1990s. In this play, the leading role Yang Yuqian (actor is Wu Jing) is fond of Tai Ji and becomes a great master at last. However, the Chen Style Taiji was only open to family Chen. So Yang Yuqian decides to steal the skill with the help from a teenager called Chen Shaoqi. They are best friends, and Shaoqi is the “son” of Chen family leader. But one day, Chen Zhenying, Shaoqi’s father, found Yang Yuqian and decided to drive him away. Chen Zhenying is interested in math. So he gives Yang Yuqian a chance: if Yang can solve his problem, then Yang can be his new apprentice.


The problem is that : C is a circle of Taiji in figure-1. In figure-2, the C is a circle and its centre is (0, 0). Its radius is R.is a line integral in plural plane according to the circle C and its direction is anti-clockwise. We define The Yang Yuqian’s dream will come true only if  I  is calculated.

Input

Multiply cases. First line is number of test cases.
Each test case consisted of 7 integers. a,b,c,d,x,y,R represent the a,b,c,d,R in description and x,y represent the real part and imaginary part of Z0. a,b,c,x,y∈(-10000,10000);d∈(-10000,0)∪(0,10000);R∈(0,10000)

Output

Each test case is printed one line. If the answer is plural, the output format is a±bi . If the answer is real number, output it as writing habits. All real numbers are round to 4 decimals.

Sample Input

2
0 0 0 1 0 0 1
1 2 1 1 1 0 1

Sample Output

0.0000
-18.8496i

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .