Ak5hayPathak/ComplexLibrary ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple Java library for working with complex numbers.
I want it to make it easy to create complex values, do the basic math on them, and print them in a clean readable way. Please include the usual operations like add, subtract, multiply, divide, conjugate, magnitude, and maybe a way to compare values sensibly. It would be nice if the library also handles parsing a complex number from a string and gives helpful errors when the input is bad.
Please keep it straightforward and easy to use from other Java code, with a small example showing how to use it. If it helps, add a few tests so I can see it works as expected. Use current Java best practices, and if you need to check anything, look up the latest docs online.
Are you gonna build this?
make sure you review the code using arcumet