# Thread: Autolisp code for working with Imaginary numbers

1. ## Autolisp code for working with Imaginary numbers

Registered forum members do not see this ad.

Hello
I am searching for good auto lisp code for doing algebra with imaginary numbers. Will be very grateful for any efficient answer.
Thank you

2. Its in the imaginary lisp code library

3. Untested: -

Code:
``` .

)```

4. In case anyone think the original post flippant:
https://en.wikipedia.org/wiki/Imaginary_number

5. Originally Posted by SEANT
In case anyone think the original post flippant:
https://en.wikipedia.org/wiki/Imaginary_number
I am indeed guilty of showing a lack of seriousness.
For that I sincerely apologise to the OP.

6. Thank you for your answer, Does anyone have a link for the imaginary lisp code library, I found one but seems obsolete. It seems the best way is to treat them as vectors and define every operation. I am not looking for information on imaginary numbers, In fact I use autocad and auto lisp to generate patterns from mathematical expressions to study Integers.
Just discovered thanks to autocad that every integer belongs to one and only one of the two expressions :Z1 = x^2 + 2x(y+1) + y^2 + y +1 and Z2 = x^2 + 2x(y+1) + y^2 + 3y +2 when x,y > 0 or = 0
When x,y take negative values, Z1 and Z2 take similar values . But it's when they take imaginary values and when Z1 and Z2 are integers that I am studying now. From these two relations I discovered that there are many ways to factorise integers. Doing math with autocad seems a bit crazy as there are many math programs, but I am an artist and I love integers. I'm working on a exhibition I would like to do, . If you have any interesting links for me. Thank you all and have a good day.

7. Have you looked at Lee Mac's lisps for creating fractals in Autocad?
They use imaginaries.

http://www.lee-mac.com/fractals.html

8. I have also published a small library for working with complex numbers.

9. Thank you so much, this is what I was looking for.

10. Registered forum members do not see this ad.

Originally Posted by symysgames
Thank you so much, this is what I was looking for.
Excellent - you're welcome.