Skip to content

Complex numbers support #17

Open
sthefanoss wants to merge 3 commits intoram6ler:masterfrom
sthefanoss:master
Open

Complex numbers support #17
sthefanoss wants to merge 3 commits intoram6ler:masterfrom
sthefanoss:master

Conversation

@sthefanoss
Copy link

Hey dev!

Thanks for your awesome support in creating this library. I’ve been using it for years in my Fourier series app.

Now I’d like to add complex number functionality. To do that, the library needs to:

  1. Parse the i constant;
  2. Process values using Complex instead of num;
  3. Add all required complex number math;
  4. Include new tests.

This PR implements all of the above.

To keep the existing API compatible, I introduced a new .complexCall method, so the .call signature continues to work with num as before.

I hope you’ll continue supporting this library and that you accept (and like) these changes.

Thanks again!

@ram6ler
Copy link
Owner

ram6ler commented Feb 4, 2026 via email

@sthefanoss
Copy link
Author

Hi Richard,

My app uses numerical integration to calculate An and Bn therms of the fourier series. Now I'm updating it and your library to work with Cn therms.

ie.: It will be able to plot the fourier series of sqrt(t) from -pi to pi.

For now, it's available only for android here https://play.google.com/store/apps/details?id=com.sthefanoss.ifs

@sthefanoss
Copy link
Author

Feel free to contact me if needed.

I have a BSc in Electrical Engineering, so some of the terminology and equations may reflect that background.

For the mathematics I was not familiar with, I used AI to generate the initial code and then added extensive unit tests to validate the results against those provided by WolframAlpha (https://www.wolframalpha.com).

Regards,
Sthefano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants