1. Complex Number Calculator for the console by Shawn Pringle
- Posted by K_D_R Dec 03, 2015
- 1415 views
I noticed Shawn's Complex Number Calculator program posted here: http://rapideuphoria.com/calculator.tar.xz
I am mostly clueless about how the program works, so forgive me if this suggestion is off the mark.
printf(1, "Welcome to the calculator program. So far, real numbers and operators ", {}) -- change: for i = 1 to length(binary_operators)-1 to: for i = 1 to length(operators)-1 do -- puts(1, binary_operators[i] & ", ") puts(1, operators[i] & ", ") end for -- change: puts(1, "and " & binary_operators[$] & " are supported. \n") to: puts(1, "and " & operators[$] & " are supported. \n")
resulting new prompt:
Welcome to the calculator program. So far, real numbers and operators (, /, *, -, +, and ) are supported.
>
original prompt:
Welcome to the calculator program. So far, real numbers and operators /, *, -, and + are supported.
>
Thanks to Shawn for making the program available to us.
Ken
2. Re: Complex Number Calculator for the console by Shawn Pringle
- Posted by SDPringle Dec 05, 2015
- 1277 views
You're right. Also the word 'real' is wrong. It should be 'complex'. As I developed it, I started with +, - with reals and grew it from there. Always encoding the numbers as complex values.
Try: nodebug
and try: (3+4i)*(5+6i)
Shawn