![]() |
|
#22
|
|||
|
|||
|
I think, programmer, should write calculator himself
![]() First of all, it is interesting and you can add features, required by your calculation style (e.g. reverse notation, if you love it), second, it is not a very difficult task. p.s. surely, I wrote my favorite myself, here is list of features, maybe someone will find them useful to implement in their programs: - almost any number lengths are supported, i.e. 128-bit numbers, 256-bit, etc. - floating point numbers can be with different mantissa and exponent size, so one can just get 128-bit floating point compatible with IEEE-754, or play with 256-bit floats to see if they will help. - all bit operations are supported, including popcount and cyclic shift even through carry bit (to emulate CPU instructions), but one can cyclic shift even 256-bit number too - surely, hex, oct, bin radixes are supported, including limiting representation size, so one can always know how many bytes will be required to represent current number in memory (including floating point format) - binary complement format is supported, one can change signed and unsigned representation on the fly, this is usefull to check, that e.g. -16=240 in byte types. - full SNaN, QNaN, machine zero, epsilon, +Inf, -Inf and rounding schemes support for IEEE-754. - some exotic functionality also presents: e.g. representing floating point number as a continuos fraction, checking for primeness, finding gcd/lcm, etc. and so on... even if I missed smth required for my work, I just edit sources and add this functionality ![]() p.p.s. not attached here, since calculator is a bit ugly and has no built-in help, and one should remember all its commands. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| kernel-based keylogger for Linux | nimaarek | Source Code | 7 | 10-30-2017 14:51 |