Open
Conversation
Owner
|
Hi Sthefano,
Thanks for your interest in this library.
Adding support for complex numbers sounds like a great idea. I'm a little overwhelmed with work at the moment, so it might be a while before I get a chance to take a look at your proposals in detail. Actually, the project started off as a bit of a hack for something I needed in another library, but it looks as though it has garnered a lot of interest from the community and I've been thinking about starting again with a clean slate or at least a major version update. I'll certainly take a look at your proposals and implementations then, and maybe involve you if you're interested. It might be a few months, though!
Hey — I'd be interested in seeing your Fourier series app. Could you send me a link?
Thanks again!
Regards,
Richard
…________________________________
From: Sthefano Schiavon ***@***.***>
Sent: 24 January 2026 04:19
To: ram6ler/function-tree ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [External Sender][ram6ler/function-tree] Complex numbers support (PR #17)
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!
________________________________
You can view, comment on, or merge this pull request online at:
#17
Commit Summary
* 03fceaa<03fceaa> feat: add complex numbers
* efbd957<efbd957> refat: move all complex operations to complex math file
File Changes
(13 files<https://github.com/ram6ler/function-tree/pull/17/files>)
* M lib/function_tree.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-8e509e9d73e91f6521e7b2dedc1b077bf8c0718bad5ebd355a6a3658508b6240> (2)
* M lib/src/base.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-72801601d897772e6102480a666e1a57131dbad80c1a12479e210a98fff999ca> (4)
* M lib/src/branches.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-141f8c58f815ef35dfaa209265390eea59f39635adf8155c45011fdc17b91860> (18)
* A lib/src/complex.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-ccf1f6268689f2b7c73a5c91e69b2cb015d5181ae96a21d5f507a316dd7dff44> (75)
* A lib/src/complex_math.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-ec84d08732f6ce5357e3772f7aece4b614750aa12077dc67d330aad6f48d1ab7> (271)
* M lib/src/defs.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-cfb62384fd404670c026b4a7a04498ac8023fd0ab3872c4c77cdafa5f9c0da3f> (11)
* M lib/src/forks.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-1d73157c9893b41d013738f28aeb1483248f3220fba6cfb232cbe09adb805307> (36)
* M lib/src/interpreter.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-22a835167c64da96470ca835d636a5fee355c0e711164c89280f2df6bdb25cab> (9)
* M lib/src/leaves.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-c8b8f763c314609c85e2c3a88f48f13723fde5cbea1997550456d9fff85cfed2> (35)
* M lib/src/trees.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-eaf76cbe4555a3b84672f3c195a5f619cea9814fa421cb2186d2af66fa9c9a0a> (9)
* A test/complex_interpret.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-6eca93266ba64897925a3e073001303762c73d90f6e7cb56e9987dd3aeeb7353> (272)
* A test/complex_multi.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-d1ae097ca39378c4b8b4c64210513996b6b7e3cb01b40370d92ca6387e81cd62> (88)
* A test/complex_single.dart<https://github.com/ram6ler/function-tree/pull/17/files#diff-e2626f684b167932c1b8e912cc1e3a02121a0ff1779dd5796244e6d2494fa4bf> (44)
Patch Links:
* https://github.com/ram6ler/function-tree/pull/17.patch
* https://github.com/ram6ler/function-tree/pull/17.diff
—
Reply to this email directly, view it on GitHub<#17>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABXNP25ZMTENAPFRXPNYRXL4IJ66RAVCNFSM6AAAAACSWTTEPCVHI2DSMVQWIX3LMV43ASLTON2WKOZTHA2DSMBTHA3TKNI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
Warning: This email is from an external source. If you do not know the sender, then do not click any links in the email and report any concerns that you have to the school.
|
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 |
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
iconstant;Complexinstead ofnum;This PR implements all of the above.
To keep the existing API compatible, I introduced a new
.complexCallmethod, so the.callsignature continues to work withnumas before.I hope you’ll continue supporting this library and that you accept (and like) these changes.
Thanks again!