News for hackers. Stuff that matters.

vivekkannan

Re:Show HN: Calc, a simple command-line calulator in C on Tuesday June 09, 2015 @11:19AM (#9686426)
changed it. thanks.
Re:Show HN: Calc, a simple command-line calulator in C on Tuesday June 09, 2015 @07:46AM (#9685269)
I checked division by zero initially, but then realised that 1/0 causes double to represent inf. Thought that this could be useful(?) in some situations. For example, atan(1/0) --> 1.57... instead of error.
Re:Show HN: Calc, a simple command-line calulator in C on Tuesday June 09, 2015 @07:35AM (#9685221)
fixed both. thanks for pointing it out. I have just been told about wacky header files. will changing calc.h to calc.c make things less wackier?
Re:Show HN: Calc, a simple command-line calulator in C on Tuesday June 09, 2015 @07:25AM (#9685181)
duly noted. will change it ASAP.
Re:Show HN: Calc, a simple command-line calulator in C on Tuesday June 09, 2015 @07:15AM (#9685143)
Obviously, bc is much more capable than calc. However, calc was not created to replace or even compete with bc or any other awesome command-line calculators. calc is my way of learning a bunch of stuffs (shunting yard).