flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Calculator project

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
code_grinder



Joined: 02 Aug 2007
Posts: 12
Location: Moldova, Kishinev
code_grinder 02 Aug 2007, 21:14
Hi everyone.
I decided to write small calculator of my own, that could be replacement for windows one. The project is near to completion, however I'd like to have some feedback on it, what is good, what is bad, what else can be done, what can be done better. If someone is interested I could post the sources too.
To use write an expression in the input field.


Description: Calculator
Download
Filename: calc.zip
Filesize: 2.53 KB
Downloaded: 1343 Time(s)

Post 02 Aug 2007, 21:14
View user's profile Send private message ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 02 Aug 2007, 22:55
very nice, i wanted to write such things myself

bug:
- extra ending parenthesis are not considered as error

more ideas:
- ignore spaces and tabs in expression
- add more detailed info about error, not just blank box (division by zero, missing end parenthesis, ...)
- in case when result is not whole number, do not display Hex representation - it's confusing
- later, add support for custom-defined variables, and saving them to disk. That would be nice to prepare few values if you are going to use them multiple times in expression, or in more expression (like PI)
Post 02 Aug 2007, 22:55
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 03 Aug 2007, 08:59
extra ending... bug? I consider it a feature or at maximum a warning. I love features like 'computer-understands-my-error-and-doesn't-whine-about-it' Very Happy
Of course then it should be generalized for left too.

Your ideas are great though...
the extra expressions might be saved to M1,2,3... slots so you can reuse them and also redefine them. More like a scientific calculator Razz

Idea (i) : hex can be more helpful with floats. Now its showing only integer results. One should be able to enable/disable float as a T/Q/DWORD. Just a thought.
Post 03 Aug 2007, 08:59
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1 03 Aug 2007, 09:22
code_grinder wrote:
If someone is interested I could post the sources too.

Yeah please!

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 03 Aug 2007, 09:22
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 03 Aug 2007, 12:14
Hello,

You only convert the result to hex. It would be good to have octal and most of all binary. I often use Windows calc for such conversions.

Since you have a combo box instead of an edit box, it would be handy to save the most recently used equations there.

Add "logical expressions" support.

Quote:
in case when result is not whole number, do not display Hex representation - it's confusing

Why not display a hex representation of the float? ex: 1.6847 = 0x0000000040a4d73f
Post 03 Aug 2007, 12:14
View user's profile Send private message Reply with quote
code_grinder



Joined: 02 Aug 2007
Posts: 12
Location: Moldova, Kishinev
code_grinder 03 Aug 2007, 13:03
Thanks everyone for feed back, I'll post project again when it is completed.
Here are sources.


Description: Calculator + sources
Download
Filename: calc.zip
Filesize: 8.1 KB
Downloaded: 1292 Time(s)

Post 03 Aug 2007, 13:03
View user's profile Send private message ICQ Number Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 03 Aug 2007, 14:22
Very nice!
I like coding small but usefull tools like this.
Very usefull tool.
Thanks for sharing!

PS: What IDE/Editor do you use for coding?
Post 03 Aug 2007, 14:22
View user's profile Send private message Reply with quote
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body 03 Aug 2007, 14:32
Wonderful! Thanks, for example.
Post 03 Aug 2007, 14:32
View user's profile Send private message Reply with quote
code_grinder



Joined: 02 Aug 2007
Posts: 12
Location: Moldova, Kishinev
code_grinder 03 Aug 2007, 22:01
OzzY wrote:
PS: What IDE/Editor do you use for coding?

Flat assembler IDE for now.
Post 03 Aug 2007, 22:01
View user's profile Send private message ICQ Number Reply with quote
rCX



Joined: 29 Jul 2007
Posts: 172
Location: Maryland, USA
rCX 06 Aug 2007, 02:28
I like how it automatically displays the hex answer.
Post 06 Aug 2007, 02:28
View user's profile Send private message Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 06 Aug 2007, 15:29
Try 0x02*0x02_`= Smile
Post 06 Aug 2007, 15:29
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1900
DOS386 08 Aug 2007, 05:56
> decided to write small calculator of my own, that could be replacement for windows one. The project is near to completion, however I'd like to have some feedback

- [almost done] Undocumented feature pi Wink

- [sugg] Accept hex prefixed with $

- [sugg] Bin support (in and out)

- [sugg] Optionally split numbers: 1048576 -> 1'048'576 | $FFFF0FFF -> $FFFF'0FFF | 01010101'11110000'11100011'00000001
Post 08 Aug 2007, 05:56
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4332
Location: Now
edfed 02 Oct 2007, 09:34
very nice the real time calculation
can you add a graphic plug in like TI82?
Post 02 Oct 2007, 09:34
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1389
Location: Piraeus, Greece
Picnic 08 Oct 2007, 19:23
very handy code_grinder, i like it, thanks for sharing source.
Post 08 Oct 2007, 19:23
View user's profile Send private message Visit poster's website Reply with quote
code_grinder



Joined: 02 Aug 2007
Posts: 12
Location: Moldova, Kishinev
code_grinder 17 Dec 2007, 20:32
thimis wrote:
very handy code_grinder, i like it, thanks for sharing source.


I have little spare time now, maybe after New Year.
Post 17 Dec 2007, 20:32
View user's profile Send private message ICQ Number Reply with quote
codegrinder



Joined: 12 Dec 2005
Posts: 20
Location: Moldova
codegrinder 16 Jan 2008, 04:56
Hi!

Here is next version. Evaluation have been rewritten (because I didn't like how I did it in previous version) and more functions coming soon. Feedback is appreciated.


Description:
Download
Filename: calculator.zip
Filesize: 13.9 KB
Downloaded: 1003 Time(s)

Post 16 Jan 2008, 04:56
View user's profile Send private message ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4332
Location: Now
edfed 16 Jan 2008, 05:09
feedback

a key grid is appreciated, to edit formula with the mouse
and a scrolling promt like in TI8x can be very usefull.

Wink
Post 16 Jan 2008, 05:09
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 16 Jan 2008, 05:21
Really nice job. I think i'll start to use it.

I am afraid it is a bit imprecise, like with "cos(pi/2) = 0.99962421...". I quess conversion routine you use is poor in this manner (lot of operations causing loss of precision). For fun, when next FASMLIB is out, we could try to use FASMLIB conversion function for this. It is very slow and precise (use same conversion algo as FASM)

And next step would imho be ability to save custom contants somehow...

Minor:
- "-1e-5" doesn't work...
- is "sin(pi)" supposed to be "0.049327995502523812" ? not sure, it's been some time...
- add description of function arguments
- Add this: http://en.wikipedia.org/wiki/E_(mathematical_constant)
Post 16 Jan 2008, 05:21
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
codegrinder



Joined: 12 Dec 2005
Posts: 20
Location: Moldova
codegrinder 16 Jan 2008, 05:24
edfed wrote:
a key grid is appreciated, to edit formula with the mouse
and a scrolling promt like in TI8x can be very usefull.


Pardon me, but I'm not familiar with TI8x calculators, so I didn't understand what is key grid and scrolling prompt. Maybe some screenshots (or links) can make these clear? I googled on TI calculator, but found nothing useful.
Post 16 Jan 2008, 05:24
View user's profile Send private message ICQ Number Reply with quote
codegrinder



Joined: 12 Dec 2005
Posts: 20
Location: Moldova
codegrinder 16 Jan 2008, 05:31
vid wrote:
I am afraid it is a bit imprecise, like with "cos(pi/2) = 0.99962421...".

You probably didn't switch to radians angles mode. Degrees is default, if this is not good please let me know.
vid wrote:
And next step would imho be ability to save custom contants somehow...

Text file? Or you mean support from program?
vid wrote:
- "-1e-5" doesn't work...

I'll look into this.
vid wrote:
- is "sin(pi)" supposed to be "0.049327995502523812" ? not sure, it's been some time...

Switch to radians and it will be ok, or use sin(180).
vid wrote:
- add description of function arguments

Ok.
vid wrote:
- Add this: http://en.wikipedia.org/wiki/E_(mathematical_constant)

Ok, no question.
Post 16 Jan 2008, 05:31
View user's profile Send private message ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.