microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/complex_arithmetic/complex_modulus/index.md
12lines · modecode
| 1 | **Input:** A complex number $x = a + bi$. |
| 2 | |
| 3 | **Goal:** Return the modulus of this number, $|x|$. |
| 4 | |
| 5 | <details> |
| 6 | <summary><b>Need a hint?</b></summary> |
| 7 | |
| 8 | A video explanation of absolute value and complex numbers can be found [here](https://www.youtube.com/watch?v=FwuPXchH2rA). |
| 9 | |
| 10 | </details> |
| 11 | |
| 12 | > Q# function `AbsComplex` from `Std.Math` namespace gets the absolute value of a complex number. For educational purposes, try to do this task by hand. |
| 13 | |