eva icon indicating copy to clipboard operation
eva copied to clipboard

Suggestion: Complex numbers

Open KSXGitHub opened this issue 5 years ago • 9 comments

complex numbers would really complete the calculator idea, but i will be giving this a lower priority, simply because i dont quite see complex numbers being used in everyday calculations, and functions such as ln would have to be rewritten to support complex numbers.

(-1_f64.ln() returns 0)

oppiliappan avatar Mar 29 '19 14:03 oppiliappan

functions such as ln would have to be rewritten to support complex numbers.

You may not have to. Have you ever heard of nalgebra?

KSXGitHub avatar Mar 29 '19 14:03 KSXGitHub

wew thats a lot more detailed than i imagined! i will look into it an try implementing complex numbers.

i hope it isint too hard to figure out :^)

oppiliappan avatar Mar 29 '19 17:03 oppiliappan

i will look into it an try implementing complex numbers.

i hope it isint too hard to figure out :^)

Why would you want to implement complex numbers yourself? The crate that I pointed you to already has it. You only need to use it.

KSXGitHub avatar Mar 29 '19 17:03 KSXGitHub

A lot of the lexing logic would have to be modified to accept complex inputs. currently alphabetical inputs only contribute to alphabets used in functions. this would have to be changed to detect iota etc.

once again, i have only taken a glance at the library and its capabilities, ill get to work when i get some time on my hands!

oppiliappan avatar Mar 29 '19 17:03 oppiliappan

A lot of the lexing logic would have to be modified to accept complex inputs

You don't have to accept complex inputs now. What I asked is to display complex output.

KSXGitHub avatar Mar 29 '19 17:03 KSXGitHub

You're being a bit pushy, this guy is developing the project in his own time out of his own free will and you're kind of coming across a bit aggressively.

Jackojc avatar Mar 31 '19 12:03 Jackojc

@Jackojc You think you know what others think?

KSXGitHub avatar Mar 31 '19 12:03 KSXGitHub

ahaha slow down a bit friendos!

this thread is for discussions related to the program. do not make personal jabs, or instigate other users / contributors.

that being said, i request @KSXGitHub to be more polite. Let all further discussion be constructive!

oppiliappan avatar Mar 31 '19 12:03 oppiliappan